Authored by 郭成尧

屏蔽最新降价下的 new 标签

... ... @@ -2,7 +2,7 @@
* @Author: Targaryen
* @Date: 2016-05-19 10:20:08
* @Last Modified by: Targaryen
* @Last Modified time: 2016-06-08 15:36:50
* @Last Modified time: 2016-06-08 15:53:18
*/
'use strict';
... ... @@ -64,28 +64,35 @@ exports.getSaleGoodsData = (params) => {
}
// 处理 VIP 商品数据
if (result[1].code === 200 && parseInt(params.saleType, 10) === 2) {
_.forEach(finalResult.goods, (value, key) => {
if (result[1].code === 200) {
if (params.saleType === '2') {
_.forEach(finalResult.goods, (value, key) => {
switch (result[1].curLevel) {
case '1':
finalResult.goods[key].vipPrice = value.vip1Price;
finalResult.goods[key].vip1 = true;
break;
case '2':
finalResult.goods[key].vipPrice = value.vip2Price;
finalResult.goods[key].vip2 = true;
break;
case '3':
finalResult.goods[key].vipPrice = value.vip3Price;
finalResult.goods[key].vip3 = true;
break;
default:
finalResult.goods[key].vip = true;
break;
}
switch (result[1].curLevel) {
case '1':
finalResult.goods[key].vipPrice = value.vip1Price;
finalResult.goods[key].vip1 = true;
break;
case '2':
finalResult.goods[key].vipPrice = value.vip2Price;
finalResult.goods[key].vip2 = true;
break;
case '3':
finalResult.goods[key].vipPrice = value.vip3Price;
finalResult.goods[key].vip3 = true;
break;
default:
finalResult.goods[key].vip = true;
break;
}
});
});
}
if (params.saleType === '3') {
_.forEach(finalResult.goods, (value, key) => {
finalResult.goods[key].tags.isNew = false; // 屏蔽 new 标签
});
}
}
// 需要判断是否为今日推荐,今日推荐需要添加最后的全部商品图片
... ...