Authored by 郭成尧

'商品数目'

... ... @@ -217,6 +217,11 @@ exports.getSaleOthersData = (params, channel) => {
// 获取商品数据
if (result[1].code === 200) {
finalResult.goods = productProcess.processProductList(result[1].data.product_list);
// 处理所有商品标题数据
finalResult.saleTitle = {};
finalResult.saleTitle.name = '所有商品';
finalResult.saleTitle.count = result[1].data.total;
}
// 获取焦点图数据
... ... @@ -237,12 +242,6 @@ exports.getSaleOthersData = (params, channel) => {
finalResult.opts = saleHandler.handleSaleOptsData(params, result[3].data.total);
finalResult.totalCount = result[3].data.total;
finalResult.pager = saleHandler.handleSalePagerData(result[3].data.total, params);
// 处理所有商品标题数据
finalResult.saleTitle = {};
finalResult.saleTitle.name = '所有商品';
finalResult.saleTitle.count = finalResult.totalCount;
}
if (!_.isEmpty(result[4])) {
... ... @@ -370,18 +369,18 @@ exports.getSalebreakingYardsData = (params, channel) => {
finalResult.totalCount = subResult[0].data.total;
finalResult.pager = saleHandler.handleSalePagerData(subResult[0].data.total, params);
// 处理所有商品标题数据
finalResult.saleTitle = {};
finalResult.saleTitle.name = '所有商品';
finalResult.saleTitle.count = finalResult.totalCount;
}
// 处理商品数据
if (subResult[1].code === 200) {
finalResult.goods = productProcess.processProductList(subResult[1].data.product_list);
// 处理所有商品标题数据
finalResult.saleTitle = {};
finalResult.saleTitle.name = '所有商品';
finalResult.saleTitle.count = subResult[1].data.count;
_.forEach(finalResult.goods, (value, key) => {
finalResult.goods[key].tags.isNew = false; // 屏蔽 new 标签
});
... ...