tick-tock-twice-bug-fixed
Showing
1 changed file
with
6 additions
and
6 deletions
@@ -18,7 +18,7 @@ var nowTime = 0; | @@ -18,7 +18,7 @@ var nowTime = 0; | ||
18 | var startTime = 0; | 18 | var startTime = 0; |
19 | 19 | ||
20 | var endTime = 0, | 20 | var endTime = 0, |
21 | - diffTime = 0;// 误差时间 | 21 | + diffTime = 0; // 误差时间 |
22 | 22 | ||
23 | var dateText = 0, | 23 | var dateText = 0, |
24 | newDate = 0, | 24 | newDate = 0, |
@@ -74,7 +74,7 @@ seckillObj = { | @@ -74,7 +74,7 @@ seckillObj = { | ||
74 | 74 | ||
75 | $( | 75 | $( |
76 | function() { | 76 | function() { |
77 | - $('#goodsDiscount').hide();// 隐藏折扣楼层 | 77 | + $('#goodsDiscount').hide(); // 隐藏折扣楼层 |
78 | $('.cart-bar').hide(); | 78 | $('.cart-bar').hide(); |
79 | $('.current-price').hide(); | 79 | $('.current-price').hide(); |
80 | var ajaxUrl = '/product/seckillDetail/seckillData/' + $('#productSkn').val(); | 80 | var ajaxUrl = '/product/seckillDetail/seckillData/' + $('#productSkn').val(); |
@@ -109,7 +109,7 @@ $( | @@ -109,7 +109,7 @@ $( | ||
109 | '</div>' | 109 | '</div>' |
110 | ); | 110 | ); |
111 | $('.current-price').text('¥' + data.secKillPrice).show(); | 111 | $('.current-price').text('¥' + data.secKillPrice).show(); |
112 | - $('.price-date').append( | 112 | + $('.price-date').eq(0).append( |
113 | '<div class="seckill-time notStart">' + | 113 | '<div class="seckill-time notStart">' + |
114 | '<span class="seckill-time-pic">秒杀预告</span>' + | 114 | '<span class="seckill-time-pic">秒杀预告</span>' + |
115 | '<span class="seckill-time-c">月日</span>' + | 115 | '<span class="seckill-time-c">月日</span>' + |
@@ -154,10 +154,10 @@ $( | @@ -154,10 +154,10 @@ $( | ||
154 | } | 154 | } |
155 | ); | 155 | ); |
156 | 156 | ||
157 | - seckHide();// 非秒杀库存置灰 | 157 | + seckHide(); // 非秒杀库存置灰 |
158 | 158 | ||
159 | // 插入倒计时 | 159 | // 插入倒计时 |
160 | - addTimeout($('.price-date')); | 160 | + addTimeout($('.price-date').eq(0)); |
161 | addTimeout($('.text-info')); | 161 | addTimeout($('.text-info')); |
162 | secKillPrice = toDecimal2(data.secKillPrice); | 162 | secKillPrice = toDecimal2(data.secKillPrice); |
163 | $('.current-price').text('¥' + secKillPrice).show(); | 163 | $('.current-price').text('¥' + secKillPrice).show(); |
@@ -191,7 +191,7 @@ $( | @@ -191,7 +191,7 @@ $( | ||
191 | 191 | ||
192 | // nowTime = Date.parse(new Date()) / 1000; | 192 | // nowTime = Date.parse(new Date()) / 1000; |
193 | 193 | ||
194 | - nowTime = diffTime;// 使用请求服务器时间作为当前时间 | 194 | + nowTime = diffTime; // 使用请求服务器时间作为当前时间 |
195 | 195 | ||
196 | if (startTime > nowTime) { | 196 | if (startTime > nowTime) { |
197 | offsetTime = startTime - nowTime; | 197 | offsetTime = startTime - nowTime; |
-
Please register or login to post a comment