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