...
|
...
|
@@ -162,7 +162,7 @@ exports.processProductList = (list, options) => { |
|
|
thumb: product.defaultImages
|
|
|
});
|
|
|
|
|
|
product.isSoonSoldOut = product.isSoonSoldOut === 'Y';
|
|
|
product.isFew = product.isSoonSoldOut === 'Y';
|
|
|
product.url = helpers.urlFormat(`/product/pro_${product.productId}_${product.goodsList[0].goodsId}/${product.cnAlphabet}.html`); // eslint-disable-line
|
|
|
|
|
|
// tar add 1606071146 品牌链接处理
|
...
|
...
|
@@ -178,7 +178,8 @@ exports.processProductList = (list, options) => { |
|
|
product.tags = {};
|
|
|
|
|
|
product.tags.isNew = options.showNew && product.isNew === 'Y'; // 新品
|
|
|
product.tags.isDiscount = options.showSale && product.isDiscount === 'Y'; // 在售
|
|
|
//product.tags.isDiscount = options.showSale && product.isDiscount === 'Y'; // 在售
|
|
|
product.tags.isSale = options.showSale && product.isDiscount === 'Y' && product.salesPrice && (product.marketPrice / product.salesPrice > 2);
|
|
|
product.tags.isLimited = product.isLimited === 'Y'; // 限量
|
|
|
product.tags.isYohood = product.isYohood === 'Y'; // YOHOOD
|
|
|
product.tags.midYear = product.midYear === 'Y'; // 年中
|
...
|
...
|
@@ -186,15 +187,19 @@ exports.processProductList = (list, options) => { |
|
|
product.tags.isAdvance = product.isAdvance === 'Y'; // 再到着
|
|
|
|
|
|
// 打折与即将售完组合显示打折
|
|
|
if (product.isSoonSoldOut && product.tags.isDiscount) {
|
|
|
product.tags.isFew = false;
|
|
|
} else if (product.tags.isDiscount &&
|
|
|
(product.tags.isFew || product.tags.isLimited || product.tags.isYohood || product.tags.isAdvance)) {
|
|
|
/*if (product.isFew && product.tags.isDiscount) {
|
|
|
product.isFew = false;
|
|
|
} else*/
|
|
|
if(product.tags.isNew) {
|
|
|
product.tags.isSale = false;
|
|
|
}
|
|
|
if (product.tags.isSale &&
|
|
|
(product.isFew || product.tags.isLimited || product.tags.isYohood || product.tags.isAdvance)) {
|
|
|
// 打折与其它组合则隐藏打折
|
|
|
product.tags.isDiscount = false;
|
|
|
} else if (product.tags.isYohood && product.tags.isFew) {
|
|
|
product.tags.isSale = false;
|
|
|
} else if (product.tags.isYohood && product.isFew) {
|
|
|
// YOHOOD和新品组合显示YOHOOD
|
|
|
product.tags.isFew = false;
|
|
|
product.isFew = false;
|
|
|
}
|
|
|
}
|
|
|
|
...
|
...
|
|