bobo 3 rokov pred
rodič
commit
094148caf1
1 zmenil súbory, kde vykonal 4 pridanie a 4 odobranie
  1. 4 4
      pages/luckDraw/detail.js

+ 4 - 4
pages/luckDraw/detail.js

@@ -185,7 +185,7 @@ Page({
         this.setData({ remainNum })
         this.setRemainNumSplits()
         // 开始动画,开始是快阶段
-        this.data.duration = 80
+        this.data.duration = 50
         this.data.hitPos = -1
         this.data.hitTime = 0
         this.data.isHit = null;
@@ -195,7 +195,7 @@ Page({
         setTimeout(_ => {
             this.data.hitTime = new Date().getTime()
             this.requestDrawPrize()
-        }, 2000)
+        }, (Math.random() + 1)*1000)
     },
     
     requestDrawPrize: function() {
@@ -313,7 +313,7 @@ Page({
                 this.startTurnAnimationFast()
             } else {
                 // 收到抽中信号了,依然需要跑一段时间
-                if (endTime - this.data.hitTime < 3000) {
+                if (endTime - this.data.hitTime < (Math.random() + 1)*1000) {
                     this.data.duration += step
                     this.nextPos()
                     this.startTurnAnimationFast()
@@ -359,7 +359,7 @@ Page({
                 })
             }
             this.isLock = false
-        }, 300)
+        }, 500)
 
         // 刷新一下中奖名单
         this.getHitRecord()