Authored by 陈轩

秒杀列表错误

... ... @@ -91,7 +91,7 @@ const index = (req, res, next) => {
return res.render('seckill', {
title: '秒杀活动',
pageHeader: headerData,
error: '来晚啦~秒杀已结束_(:з」∠)_'
error: '来晚啦~秒杀已结束'
});
}
... ...
<div class="seckill-list yoho-page">
<div class="seckill-list yoho-page {{#if error}}seckill-list-error{{/if}}">
{{#unless error}}
{{> seckill/nav}}
<div class="product-list">
... ...
... ... @@ -250,16 +250,16 @@ seckillObj = {
minute = parseInt(offsetTime % (60 * 60) / 60, 10),
second = offsetTime % 60;
$(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 <= 0) { // 结束倒计时刷新状态
that.refreshList(elem);
} else {
$el.currentTick = setTimeout(function() {
that.startTick(elem, --offsetTime);
}, 1000);
}
$(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 <= 0) { // 结束倒计时刷新状态
that.refreshList(elem);
} else {
$el.currentTick = setTimeout(function() {
that.startTick(elem, --offsetTime);
}, 1000);
}
},
bindEvents: function() {
... ... @@ -348,7 +348,7 @@ seckillObj = {
$(function() {
seckillObj.init();
!$('.seckill-list').hasClass('seckill-list-error') && seckillObj.init();
});
window.seckillRefresh = function() {
... ...
.seckill-list {
background-color: #f0f0f0;
background-color: #f0f0f0;
.tips {
font-size: 24px;
line-height: 1.4;
color: #b0b0b0;
padding: 40px 30px 185px;
.tips {
font-size: 24px;
line-height: 1.4;
color: #b0b0b0;
padding: 40px 30px 185px;
h5 {
font-size: 25px;
font-weight: bold;
}
ol {
list-style: decimal inside;
}
}
h5 {
font-size: 25px;
font-weight: bold;
}
ol {
list-style: decimal inside;
}
}
}
.seckill-list-error {
background-color: #fff;
}
.seckill-error {
text-align: center;
margin-top: 150px;
}
\ No newline at end of file
text-align: center;
padding-top: 150px;
padding-bottom: 150px;
}
... ...