Commit 69b3b3342db3cb6253dd0e771c53ffd2ab878727
1 parent
1a978504
团购列表倒计时修改
Showing
2 changed files
with
14 additions
and
18 deletions
packageC/pages/group_list/group_list.js
... | ... | @@ -12,7 +12,7 @@ Page({ |
12 | 12 | // type:1, |
13 | 13 | // goodlist: null, |
14 | 14 | |
15 | - | |
15 | + isLogin: false, | |
16 | 16 | list: null, |
17 | 17 | isLoading: false, // 检测是否已经发送请求,防止重复发送请求 |
18 | 18 | noMore: false, // 检测是否有更多数据,true为没有更多数据,false为还有数据 |
... | ... | @@ -72,22 +72,19 @@ Page({ |
72 | 72 | }); |
73 | 73 | }); |
74 | 74 | |
75 | - // this.data.is_timer=1; | |
76 | - // this.data.ismore=1; | |
77 | - // this.data.is_timer=1; | |
78 | - // this.data.currentPage=1; | |
79 | - var th=this; | |
80 | - // th.setData({goodlist:null,}) | |
81 | - // this.requestSalelist(); | |
82 | - | |
83 | - //设置全局定时器 | |
84 | - th.data.timer = setInterval(function () { | |
85 | - th.countDown(); | |
86 | - },1000); | |
87 | - | |
88 | - | |
75 | + this.data.is_timer=1; | |
76 | + | |
89 | 77 | }; |
78 | + | |
79 | + | |
80 | + //设置全局定时器 | |
81 | + this.data.timer = setInterval(function () { | |
82 | + self.countDown(); | |
83 | + },1000); | |
84 | + | |
85 | + | |
90 | 86 | }; |
87 | + | |
91 | 88 | }, |
92 | 89 | |
93 | 90 | /** |
... | ... | @@ -204,7 +201,7 @@ Page({ |
204 | 201 | |
205 | 202 | //----倒计时函数----- |
206 | 203 | countDown() { |
207 | - // if(!this.data.is_timer) return false; | |
204 | + if(!this.data.is_timer) return false; | |
208 | 205 | var th=this; |
209 | 206 | // 获取当前时间,同时得到活动结束时间数组 |
210 | 207 | let newTime = ut.gettimestamp(); |
... | ... | @@ -251,7 +248,6 @@ Page({ |
251 | 248 | |
252 | 249 | goto(e) { |
253 | 250 | let url = e.target.dataset.url; |
254 | - // console.log('999999',e); | |
255 | 251 | app.goto(url); |
256 | 252 | }, |
257 | 253 | ... | ... |