活动bug
This commit is contained in:
parent
8d5e030157
commit
bd3266779c
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
</view>
|
||||
<view class="flex_start flex_items mr20" style="color: #eb5e42">
|
||||
<view class="f24">¥</view>
|
||||
<text class="f48 bolder one">{{ item.show_price }}</text>
|
||||
<text class="f48 bolder one">{{ item.product_amount }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt40 flex_between flex_items">
|
||||
|
|
Loading…
Reference in New Issue