Authored by lijing

倒计时bug

... ... @@ -50,7 +50,7 @@ seckillObj = {
minute = parseInt(offsetTime % (60 * 60) / 60, 10),
second = offsetTime % 60;
if (offsetTime) {
if (offsetTime >= -1) {
if (day <= 0) {
$('.day-c').addClass('hide');
}
... ... @@ -58,12 +58,14 @@ seckillObj = {
$(elem).find('.tick.hour').text(hour < 0 ? '00' : (hour < 10 ? ('0' + hour) : hour));
$(elem).find('.tick.minute').text(minute < 0 ? '00' : (minute < 10 ? ('0' + minute) : minute));
$(elem).find('.tick.second').text(second < 0 ? '00' : (second < 10 ? ('0' + second) : second));
if (offsetTime <= 1) { // 结束倒计时刷新状态
if (offsetTime <= -1) { // 结束倒计时刷新状态
window.location.reload();
} else {
$el.currentTick = setTimeout(function() {
that.startTick(elem, --offsetTime);
}, 1000);
$('.seckill-time-c').text(offsetTime);
}
}
... ... @@ -275,7 +277,7 @@ function getMarketPrice() {
productSkn: productSkn
},
success: function(data) {
$('.previous-price').text(data.goodsPrice.currentPrice);
$('.previous-price').text(data.goodsPrice.previousPrice);
}
});
}
... ...