Authored by lijing

倒计时bug

@@ -50,7 +50,7 @@ seckillObj = { @@ -50,7 +50,7 @@ seckillObj = {
50 minute = parseInt(offsetTime % (60 * 60) / 60, 10), 50 minute = parseInt(offsetTime % (60 * 60) / 60, 10),
51 second = offsetTime % 60; 51 second = offsetTime % 60;
52 52
53 - if (offsetTime) { 53 + if (offsetTime >= -1) {
54 if (day <= 0) { 54 if (day <= 0) {
55 $('.day-c').addClass('hide'); 55 $('.day-c').addClass('hide');
56 } 56 }
@@ -58,12 +58,14 @@ seckillObj = { @@ -58,12 +58,14 @@ seckillObj = {
58 $(elem).find('.tick.hour').text(hour < 0 ? '00' : (hour < 10 ? ('0' + hour) : hour)); 58 $(elem).find('.tick.hour').text(hour < 0 ? '00' : (hour < 10 ? ('0' + hour) : hour));
59 $(elem).find('.tick.minute').text(minute < 0 ? '00' : (minute < 10 ? ('0' + minute) : minute)); 59 $(elem).find('.tick.minute').text(minute < 0 ? '00' : (minute < 10 ? ('0' + minute) : minute));
60 $(elem).find('.tick.second').text(second < 0 ? '00' : (second < 10 ? ('0' + second) : second)); 60 $(elem).find('.tick.second').text(second < 0 ? '00' : (second < 10 ? ('0' + second) : second));
61 - if (offsetTime <= 1) { // 结束倒计时刷新状态 61 +
  62 + if (offsetTime <= -1) { // 结束倒计时刷新状态
62 window.location.reload(); 63 window.location.reload();
63 } else { 64 } else {
64 $el.currentTick = setTimeout(function() { 65 $el.currentTick = setTimeout(function() {
65 that.startTick(elem, --offsetTime); 66 that.startTick(elem, --offsetTime);
66 }, 1000); 67 }, 1000);
  68 + $('.seckill-time-c').text(offsetTime);
67 } 69 }
68 } 70 }
69 71
@@ -275,7 +277,7 @@ function getMarketPrice() { @@ -275,7 +277,7 @@ function getMarketPrice() {
275 productSkn: productSkn 277 productSkn: productSkn
276 }, 278 },
277 success: function(data) { 279 success: function(data) {
278 - $('.previous-price').text(data.goodsPrice.currentPrice); 280 + $('.previous-price').text(data.goodsPrice.previousPrice);
279 } 281 }
280 }); 282 });
281 } 283 }