diff --git a/packageB/miniprogram_npm/mini-luck-draw/lucky-wheel/index.js b/packageB/miniprogram_npm/mini-luck-draw/lucky-wheel/index.js index 8621c98..fb42855 100644 --- a/packageB/miniprogram_npm/mini-luck-draw/lucky-wheel/index.js +++ b/packageB/miniprogram_npm/mini-luck-draw/lucky-wheel/index.js @@ -314,15 +314,18 @@ Component({ this.toPlay(x, y); }, toPlay: function toPlay(x, y) { - var ctx = this.ctx; - ctx.beginPath(); - ctx.arc(0, 0, this.$lucky.maxBtnRadius, 0, Math.PI * 2, false); - if (!ctx.isPointInPath(x * this.dpr, y * this.dpr)) return; - // 隐藏图片并显示canvas - this.showCanvas = true; - this.setData({ luckyImg: '' }); - // 触发 lucky-canvas 的抽奖逻辑 - this.$lucky.startCallback(); + var th=this; + setTimeout(function () { + var ctx = th.ctx; + ctx.beginPath(); + ctx.arc(0, 0, th.$lucky.maxBtnRadius, 0, Math.PI * 2, false); + if (!ctx.isPointInPath(x * th.dpr, y * th.dpr)) return; + // 隐藏图片并显示canvas + th.showCanvas = true; + th.setData({ luckyImg: '' }); + // 触发 lucky-canvas 的抽奖逻辑 + th.$lucky.startCallback(); + },400) }, play: function play() { var _$lucky;