Showing
1 changed file
with
4 additions
and
1 deletions
@@ -13,7 +13,7 @@ var timeObj = ''; | @@ -13,7 +13,7 @@ var timeObj = ''; | ||
13 | 13 | ||
14 | var offsetTime = 0; | 14 | var offsetTime = 0; |
15 | 15 | ||
16 | -var nowTime = Date.parse(new Date()) / 1000; | 16 | +var nowTime = 0; |
17 | 17 | ||
18 | var startTime = 0; | 18 | var startTime = 0; |
19 | 19 | ||
@@ -190,6 +190,8 @@ $( | @@ -190,6 +190,8 @@ $( | ||
190 | 190 | ||
191 | endTime = data.endTime; | 191 | endTime = data.endTime; |
192 | 192 | ||
193 | + nowTime = Date.parse(new Date()) / 1000; | ||
194 | + | ||
193 | if (startTime > nowTime) { | 195 | if (startTime > nowTime) { |
194 | offsetTime = startTime - nowTime; | 196 | offsetTime = startTime - nowTime; |
195 | timeObj = $('.seckill-count-num'); | 197 | timeObj = $('.seckill-count-num'); |
@@ -197,6 +199,7 @@ $( | @@ -197,6 +199,7 @@ $( | ||
197 | offsetTime = endTime - nowTime; | 199 | offsetTime = endTime - nowTime; |
198 | timeObj = $('.end-time'); | 200 | timeObj = $('.end-time'); |
199 | } | 201 | } |
202 | + | ||
200 | dateText = Number(data.startTime * 1000); | 203 | dateText = Number(data.startTime * 1000); |
201 | newDate = new Date(dateText); | 204 | newDate = new Date(dateText); |
202 | newMonth = newDate.getMonth() + 1; | 205 | newMonth = newDate.getMonth() + 1; |
-
Please register or login to post a comment