Commit f5b4a91e53ba8db6374db8fd619a83cd87c0a092
1 parent
f122a22d
幸运大转盘定时器修改
Showing
1 changed file
with
5 additions
and
11 deletions
packageB/pages/luckactivity/luckinfo/luckinfo.js
| @@ -619,16 +619,7 @@ Page({ | @@ -619,16 +619,7 @@ Page({ | ||
| 619 | currentLbtype: lbtype, | 619 | currentLbtype: lbtype, |
| 620 | }); | 620 | }); |
| 621 | 621 | ||
| 622 | - let num = this.data.num; | ||
| 623 | - let timer = setInterval(function() { | ||
| 624 | - if(num == 0) { | ||
| 625 | - clearInterval(); | ||
| 626 | - } else { | ||
| 627 | - self.setData({ | ||
| 628 | - num: --num, | ||
| 629 | - }); | ||
| 630 | - } | ||
| 631 | - }, 1000); | 622 | + |
| 632 | 623 | ||
| 633 | 624 | ||
| 634 | if(no_luck_urltype == 1) { | 625 | if(no_luck_urltype == 1) { |
| @@ -638,8 +629,11 @@ Page({ | @@ -638,8 +629,11 @@ Page({ | ||
| 638 | let url = this.data.luckInfo.no_luck_weappurl; | 629 | let url = this.data.luckInfo.no_luck_weappurl; |
| 639 | self.timer = setInterval(function() { | 630 | self.timer = setInterval(function() { |
| 640 | if(num == 0) { | 631 | if(num == 0) { |
| 641 | - clearInterval(); | 632 | + clearInterval(self.timer); |
| 642 | app.goto(url); | 633 | app.goto(url); |
| 634 | + // wx.reLaunch({ | ||
| 635 | + // url: url, | ||
| 636 | + // }) | ||
| 643 | } else { | 637 | } else { |
| 644 | self.setData({ | 638 | self.setData({ |
| 645 | num: --num, | 639 | num: --num, |