Authored by Rock Zhang

修复新品标签的显示,如果既有new又有sale标签,只显示new标签

... ... @@ -2,10 +2,9 @@
<div class="good-detail-page yoho-page">
<div class="banner-container">
<div class="tag-container">
<p class="good-tag new-tag">NEW</p>
{{# tags}}
{{# is_new}}
<!-- <p class="good-tag new-tag">NEW</p> -->
<p class="good-tag new-tag">NEW</p>
{{/ is_new}}
{{# is_advance}}
<p class="good-tag renew-tag">再到着</p>
... ...
... ... @@ -50,10 +50,10 @@ class DetailModel
case 'is_soon_sold_out': // 即将售磬
$result['tags']['is_soon_sold_out'] = true;
break;
case 'is_new': // 新品
case 'is_new': // 新品NEW
$result['tags']['is_new'] = true;
break;
case 'is_discount': // 在售
case 'is_discount': // SALE
$result['tags']['is_discount'] = true;
break;
case 'is_limited': // 限量
... ... @@ -68,7 +68,17 @@ class DetailModel
}
}
}
// 新品标签
if (isset($baseInfo['isNew']) && $baseInfo['isNew'] === 'Y') {
$result['tags']['is_new'] = true;
}
// NEW和SALE只显示一个
if (isset($result['tags']['is_new']) && isset($result['tags']['is_discount'])) {
unset($result['tags']['is_discount']);
}
// 商品价格
if (isset($baseInfo['productPriceBo'])) {
$result['goodsPrice'] = array();
... ...