...
|
...
|
@@ -86,19 +86,27 @@ exports.getSaleGoodsData = (params) => { |
|
|
|
|
|
switch (userInfo.curLevel) {
|
|
|
case '1':
|
|
|
finalResult.goods[key].salePrice = value.vip1Price;
|
|
|
finalResult.goods[key].vip1 = true;
|
|
|
finalResult.goods[key] = {
|
|
|
salePrice: value.vip1Price,
|
|
|
vip1: true
|
|
|
};
|
|
|
break;
|
|
|
case '2':
|
|
|
finalResult.goods[key].salePrice = value.vip2Price;
|
|
|
finalResult.goods[key].vip2 = true;
|
|
|
finalResult.goods[key] = {
|
|
|
salePrice: value.vip2Price,
|
|
|
vip2: true
|
|
|
};
|
|
|
break;
|
|
|
case '3':
|
|
|
finalResult.goods[key].salePrice = value.vip3Price;
|
|
|
finalResult.goods[key].vip3 = true;
|
|
|
finalResult.goods[key] = {
|
|
|
salePrice: value.vip3Price,
|
|
|
vip3: true
|
|
|
};
|
|
|
break;
|
|
|
default:
|
|
|
finalResult.goods[key].vip = true;
|
|
|
finalResult.goods[key] = {
|
|
|
vip: true
|
|
|
};
|
|
|
delete finalResult.goods[key].salesPrice;
|
|
|
break;
|
|
|
}
|
...
|
...
|
@@ -285,6 +293,8 @@ exports.getSaleOthersData = (params, channel) => { |
|
|
delete finalResult.goods[key].tags.isSale;// 屏蔽 sale 标签
|
|
|
delete finalResult.goods[key].discount; // 屏蔽折扣信息
|
|
|
});
|
|
|
} else {
|
|
|
logger.error('goods list api code no 200');
|
|
|
}
|
|
|
|
|
|
// 获取焦点图数据
|
...
|
...
|
@@ -317,19 +327,27 @@ exports.getSaleOthersData = (params, channel) => { |
|
|
|
|
|
switch (userInfo.curLevel) {
|
|
|
case '1':
|
|
|
finalResult.goods[key].salePrice = value.vip1_price;
|
|
|
finalResult.goods[key].vip1 = true;
|
|
|
finalResult.goods[key] = {
|
|
|
salePrice: value.vip1_price,
|
|
|
vip1: true
|
|
|
};
|
|
|
break;
|
|
|
case '2':
|
|
|
finalResult.goods[key].salePrice = value.vip2_price;
|
|
|
finalResult.goods[key].vip2 = true;
|
|
|
finalResult.goods[key] = {
|
|
|
salePrice: value.vip2_price,
|
|
|
vip2: true
|
|
|
};
|
|
|
break;
|
|
|
case '3':
|
|
|
finalResult.goods[key].salePrice = value.vip3_price;
|
|
|
finalResult.goods[key].vip3 = true;
|
|
|
finalResult.goods[key] = {
|
|
|
salePrice: value.vip3_price,
|
|
|
vip3: true
|
|
|
};
|
|
|
break;
|
|
|
default:
|
|
|
finalResult.goods[key].vip = true;
|
|
|
finalResult.goods[key] = {
|
|
|
vip: true
|
|
|
};
|
|
|
delete finalResult.goods[key].salesPrice;
|
|
|
break;
|
|
|
}
|
...
|
...
|
@@ -378,10 +396,11 @@ exports.getSaleDiscountData = (params, channel) => { |
|
|
finalResult.saleTitle = saleHandler.handleDiscountTitleData(result[2].data[0]);
|
|
|
if (result[2].data[0].web_url) {
|
|
|
finalResult.topBanner = {
|
|
|
list: []
|
|
|
};
|
|
|
finalResult.topBanner.list[0] = {
|
|
|
img: result[2].data[0].web_url
|
|
|
list: [
|
|
|
{
|
|
|
img: result[2].data[0].web_url
|
|
|
}
|
|
|
]
|
|
|
};
|
|
|
} else {
|
|
|
logger.error('discount activity data[0] web_url empty');
|
...
|
...
|
|