Commit 3de1828fef73391485a97c9aad8ab53de9ea1f91

Authored by yvan.ni
1 parent a47cb52b

在滑动加载的时候,要暂停一下定时器,避免卡顿

pages/activity/seckill_list/seckill_list.js
... ... @@ -176,6 +176,9 @@ Page({
176 176 }
177 177 }
178 178 var txt = "timer_js[" + idx + "]";
  179 +
  180 + if (!th.data.is_timer) return;
  181 +
179 182 th.setData({
180 183 [txt]: obj
181 184 });
... ... @@ -194,6 +197,7 @@ Page({
194 197 if (!this.data.ismore) return false;
195 198 if(this.data.lding) return false;
196 199 this.data.lding=1;
  200 + this.data.is_timer=0; //暂停一下定时器
197 201  
198 202  
199 203 var e = this,
... ... @@ -227,6 +231,7 @@ Page({
227 231 wx.hideLoading();
228 232  
229 233 th.data.ismore = 0;
  234 + this.data.is_timer=1;
230 235 if (e.data.currentPage == 1 && this.data.type == 1) {
231 236  
232 237 //-- 弄到即将开始 --
... ... @@ -261,6 +266,7 @@ Page({
261 266 }
262 267  
263 268 this.data.lding=0;
  269 + this.data.is_timer=1;
264 270 return false;
265 271 }
266 272  
... ... @@ -307,6 +313,7 @@ Page({
307 313 },200)
308 314  
309 315 this.data.lding=0;
  316 + this.data.is_timer=1;
310 317  
311 318  
312 319  
... ...