Authored by yyq

empty status

... ... @@ -26,4 +26,7 @@
{{/ coupons}}
</div>
{{/ unusableCoupon}}
{{#unless unusableCoupon}}
<p class="empty"><span>暂无优惠券</span></p>
{{/unless}}
</div>
... ...
... ... @@ -50,4 +50,7 @@
{{/each}}
</div>
{{/each}}
{{#unless usableCoupon}}
<p class="empty"><span>暂无优惠券</span></p>
{{/unless}}
</div>
... ...
... ... @@ -572,7 +572,7 @@ coupon = {
that.$couponUnusableList = $('.list-content', that.$couponUnusableWrap);
}
usedText = data.usableNum ? `${data.usableNum}张可用` : '';
usedText = `${data.usableNum}张可用`;
// 更新使用数量
usedNum = that.$couponWrap.find('.coupon-item.active').length;
... ... @@ -624,7 +624,15 @@ coupon = {
this[key] = $('.tab-item.' + name + ' > span', this.$couponWrap);
}
this[key].text(`(${num > 99 ? '99+' : num})`);
if (num > 99) {
num = '(99+)';
} else if (num > 0) {
num = `(${num})`;
} else {
num = '';
}
this[key].text(num);
},
showCodeUseTip: function(tip) {
tip = tip || '';
... ...
... ... @@ -1104,6 +1104,30 @@
position: relative;
}
.empty {
width: 100%;
height: 100%;
text-align: center;
color: #b0b0b0;
position: relative;
> span {
width: 100%;
position: absolute;
left: 0;
top: 36%;
}
> span:before {
content: "";
width: 104px;
height: 65px;
background: resolve(home/coupon-empty.png);
display: block;
margin: 0 auto 20px;
}
}
.unusable-wrap .list-content {
height: 486px;
}
... ...