Authored by zhangxiaoru

标签

... ... @@ -30,6 +30,12 @@
{{# is_soon_sold_out}}
<p class="few-tag">即将售罄</p>
{{/ is_soon_sold_out}}
{{# is_solded}}
<p class="out-tag">已售罄</p>
{{/ is_solded}}
</div>
<div class="good-detail-text">
<div class="name">
... ...
... ... @@ -53,8 +53,15 @@ const getPreferenceData = (data) => {
_.forEach(value.tags, tag => {
tags[tag] = true;
});
// tags.is_solded = true;
goods.tags = tags;
if (tags.is_solded === true) {
goods.is_solded = true;
}
dest.goods.push(goods);
});
... ...
... ... @@ -16,10 +16,10 @@ module.exports = {
siteUrl: '//m.yohobuy.com',
assetUrl: '//localhost:5001',
domains: {
// api: 'http://api.yoho.cn/',
// service: 'http://service.yoho.cn/',
// liveApi: 'http://api.live.yoho.cn/',
// singleApi: 'http://single.yoho.cn/'
api: 'http://api.yoho.cn/',
service: 'http://service.yoho.cn/',
liveApi: 'http://api.live.yoho.cn/',
singleApi: 'http://single.yoho.cn/'
// api: 'http://api-test3.yohops.com:9999/',
// service: 'http://service-test3.yohops.com:9999/',
... ...
... ... @@ -37,6 +37,10 @@
{{# is_soon_sold_out}}
<p class="few-tag">即将售罄</p>
{{/ is_soon_sold_out}}
{{# is_solded}}
<p class="out-tag">已售罄</p>
{{/ is_solded}}
{{# noStorage}}
<div class="no-storage">
... ...
... ... @@ -111,6 +111,18 @@
line-height: 28px;
}
.out-tag {
position: absolute;
bottom: 0;
width: 100%;
height: 32px;
background: #b0b0b0;
color: #fff;
text-align: center;
font-size: 18px;
line-height: 32px;
}
.no-storage {
width: 100%;
height: 100%;
... ...
... ... @@ -142,7 +142,14 @@ exports.processProductList = (list, options) => {
_.forEach(product.tags, tag => {
tags[tag] = true;
});
product.tags = tags;
tags.is_solded = true;
// product.tags = tags;
if (tags.is_solded === true) {
product.is_solded = true;
}
// 商品标签不再自行处理,直接使用接口返回的 is_yohood,is_new,is_discount,is_limited,is_soon_sold_out,mid-year,year-end
// product.tags = {};
... ...