diff --git a/pkg-video/views/lottery.vue b/pkg-video/views/lottery.vue index 548bd43..93b0863 100644 --- a/pkg-video/views/lottery.vue +++ b/pkg-video/views/lottery.vue @@ -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 }) },