diff --git a/src/pages/activity/index.vue b/src/pages/activity/index.vue index dcbe1aa..b389202 100644 --- a/src/pages/activity/index.vue +++ b/src/pages/activity/index.vue @@ -316,6 +316,13 @@ const flip = debounce(function (index) { }) return } + if (status.value !== 2) { + uni.showToast({ + title: '活动异常', + icon: 'error', + }) + return + } if ( // eslint-disable-next-line camelcase receive_num.value > 0 || @@ -364,7 +371,7 @@ function getAccountInfo() { } Api.getCode(params).then((res: any) => { if (res.code === 200) { - status.value = res.data.status + status.value = res.data.activity_info?.status || 0 // eslint-disable-next-line camelcase receive_num.value = res.data.lottery_count - res.data.use_lottery_count // eslint-disable-next-line camelcase diff --git a/src/pages/tt-activity/index.vue b/src/pages/tt-activity/index.vue index 7960d99..8b90ddb 100644 --- a/src/pages/tt-activity/index.vue +++ b/src/pages/tt-activity/index.vue @@ -237,9 +237,9 @@ export default { }, // 活动活动配置信息 getConfig() { - uni.showLoading({ - title: '加载中...', - }) + // uni.showLoading({ + // title: '加载中...', + // }) const params = { activity_code: this.activity_code, } @@ -250,7 +250,8 @@ export default { const { activity_info, status, lottery_code, lottery_count, use_lottery_count } = res.data // eslint-disable-next-line camelcase this.freeNum = lottery_count - use_lottery_count - this.status = status + // eslint-disable-next-line camelcase + this.status = activity_info?.status || 0 // eslint-disable-next-line camelcase this.lottery_code = lottery_code // eslint-disable-next-line camelcase @@ -330,6 +331,7 @@ export default { lottery_code: this.lottery_code, } if (this.status === 1 || this.status === 5) { + this.prizeing = false uni.showToast({ title: '活动未开始', icon: 'error', @@ -337,12 +339,21 @@ export default { return } if (this.status === 3 || this.status === 4) { + this.prizeing = false uni.showToast({ title: '活动已结束', icon: 'error', }) return } + if (this.status !== 2) { + this.prizeing = false + uni.showToast({ + title: '活动异常', + icon: 'error', + }) + return + } Api.lottery(params) .then((res) => { this.freeNum = res.data.lottery_count diff --git a/src/pages/tt-coupon/index.vue b/src/pages/tt-coupon/index.vue index 2d9bce3..cd4e5b2 100644 --- a/src/pages/tt-coupon/index.vue +++ b/src/pages/tt-coupon/index.vue @@ -46,7 +46,7 @@ - {{ item.show_price }} + {{ item.product_amount }}