Authored by OF1706

商品售罄延迟显示

... ... @@ -39,6 +39,10 @@
<p class="few-tag">即将售罄</p>
{{/ is_few}}
{{# is_solded}}
<p class="none-tag">已售罄</p>
{{/ is_solded}}
{{#if is_sale_out}}
<a class="sale-out" href="{{url}}">
<span class="sale-out-tip">已抢光</span>
... ...
... ... @@ -30,6 +30,19 @@
bottom: 0;
}
.none-tag{
width: 100%;
position: absolute;
left: 0;
height: 16px;
line-height: 16px;
background: #bebebe;
color: #fff;
font-size: 12px;
text-align: center;
bottom: 0;
}
.sale-out {
width: 100%;
height: 100%;
... ...
... ... @@ -222,6 +222,9 @@ exports.processProductList = (list, options) => {
case 'is_soon_sold_out': // 即将售磬
options.showFew && (tag.is_few = true, isfew = true);
break;
case 'is_solded': // 已售磬
product.is_solded = true;
break;
case 'is_new': // 新品NEW
options.showNew && (tag.is_new = true);
break;
... ...