Commit 69b3b3342db3cb6253dd0e771c53ffd2ab878727

Authored by taiyuan
1 parent 1a978504

团购列表倒计时修改

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  
... ...
packageC/pages/group_list/group_list.wxss
... ... @@ -53,6 +53,6 @@ page {
53 53 font-size: 24rpx;
54 54 line-height: 2;
55 55 text-align: center;
56   - margin-top: 10rpx;
  56 + /* margin-top: 10rpx; */
57 57 color: #ccc;
58 58 }
59 59 \ No newline at end of file
... ...