Fix:2604 【商城小程序】抽奖--双击“立即抽奖”,获得奖品两个,只弹出一个抽奖结果,应该限制快速多次点击时只抽一次奖,抽奖动画完成之前不管点多少次,都不能快速触发下一次抽奖
This commit is contained in:
@@ -117,7 +117,8 @@ export default {
|
||||
},
|
||||
imgData: [],
|
||||
shareAppImg: '',
|
||||
pageKeyId: Object.freeze('lotteryIndex')
|
||||
pageKeyId: Object.freeze('lotteryIndex'),
|
||||
isDisabled: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -155,6 +156,8 @@ export default {
|
||||
},
|
||||
|
||||
onSubmit() {
|
||||
if(this.isDisabled) return
|
||||
this.isDisabled = true
|
||||
getPrize().then(res => {
|
||||
if (res.success) {
|
||||
this.diceResult = res.data
|
||||
@@ -163,12 +166,15 @@ export default {
|
||||
setTimeout(() => {
|
||||
this.showDialog = true
|
||||
this.showResult = true
|
||||
this.isDisabled = false
|
||||
this.diceImg = this.lotteryDetail.diceConfig['diceValues'][diceIndex]['diceValueImage']
|
||||
setTimeout(() => {
|
||||
this.init()
|
||||
}, 1000)
|
||||
}, 2800)
|
||||
}
|
||||
}).catch(() => {
|
||||
this.isDisabled = false
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user