wxd
/
MShopWeApp
Toggle navigation
Sign in
Sign in
Project
Files
Commits
Network
Graphs
Milestones
Issues
0
Merge Requests
0
Labels
Wiki
Download as
Email Patches
Plain Diff
Browse Code »
Commit
c54581745c053e12f0269d85c18b16f7c5a94a56
Authored by
yvan.ni
2021-12-15 10:09:04 +0800
1 parent
397e0899
秒杀,拼团清理定时器
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletions
components/diy_pingd_buy/diy_pingd_buy.js
components/diy_seckill/diy_seckill.js
components/diy_pingd_buy/diy_pingd_buy.js
View file @
c545817
...
...
@@ -47,7 +47,12 @@ Component({
47
47
th.countDown2(th);
48
48
}, 1000);
49
49
}
50
- }
50
+ },
51
+
52
+ hide:function () {
53
+ // 页面被被销毁的时候,清除定时器
54
+ clearInterval(this.data.timer);
55
+ }
51
56
},
52
57
53
58
...
...
components/diy_seckill/diy_seckill.js
View file @
c545817
...
...
@@ -51,6 +51,11 @@ Component({
51
51
}, 1000);
52
52
}
53
53
},600)
54
+ },
55
+
56
+ hide:function () {
57
+ // 页面被被销毁的时候,清除定时器
58
+ clearInterval(this.data.timer);
54
59
}
55
60
},
56
61
...
...