Authored by 郭成尧

'商品数目'

@@ -217,6 +217,11 @@ exports.getSaleOthersData = (params, channel) => { @@ -217,6 +217,11 @@ exports.getSaleOthersData = (params, channel) => {
217 // 获取商品数据 217 // 获取商品数据
218 if (result[1].code === 200) { 218 if (result[1].code === 200) {
219 finalResult.goods = productProcess.processProductList(result[1].data.product_list); 219 finalResult.goods = productProcess.processProductList(result[1].data.product_list);
  220 + // 处理所有商品标题数据
  221 + finalResult.saleTitle = {};
  222 +
  223 + finalResult.saleTitle.name = '所有商品';
  224 + finalResult.saleTitle.count = result[1].data.total;
220 } 225 }
221 226
222 // 获取焦点图数据 227 // 获取焦点图数据
@@ -237,12 +242,6 @@ exports.getSaleOthersData = (params, channel) => { @@ -237,12 +242,6 @@ exports.getSaleOthersData = (params, channel) => {
237 finalResult.opts = saleHandler.handleSaleOptsData(params, result[3].data.total); 242 finalResult.opts = saleHandler.handleSaleOptsData(params, result[3].data.total);
238 finalResult.totalCount = result[3].data.total; 243 finalResult.totalCount = result[3].data.total;
239 finalResult.pager = saleHandler.handleSalePagerData(result[3].data.total, params); 244 finalResult.pager = saleHandler.handleSalePagerData(result[3].data.total, params);
240 -  
241 - // 处理所有商品标题数据  
242 - finalResult.saleTitle = {};  
243 -  
244 - finalResult.saleTitle.name = '所有商品';  
245 - finalResult.saleTitle.count = finalResult.totalCount;  
246 } 245 }
247 246
248 if (!_.isEmpty(result[4])) { 247 if (!_.isEmpty(result[4])) {
@@ -370,18 +369,18 @@ exports.getSalebreakingYardsData = (params, channel) => { @@ -370,18 +369,18 @@ exports.getSalebreakingYardsData = (params, channel) => {
370 finalResult.totalCount = subResult[0].data.total; 369 finalResult.totalCount = subResult[0].data.total;
371 finalResult.pager = saleHandler.handleSalePagerData(subResult[0].data.total, params); 370 finalResult.pager = saleHandler.handleSalePagerData(subResult[0].data.total, params);
372 371
373 - // 处理所有商品标题数据  
374 - finalResult.saleTitle = {};  
375 -  
376 - finalResult.saleTitle.name = '所有商品';  
377 - finalResult.saleTitle.count = finalResult.totalCount;  
378 -  
379 } 372 }
380 373
381 // 处理商品数据 374 // 处理商品数据
382 if (subResult[1].code === 200) { 375 if (subResult[1].code === 200) {
383 finalResult.goods = productProcess.processProductList(subResult[1].data.product_list); 376 finalResult.goods = productProcess.processProductList(subResult[1].data.product_list);
384 377
  378 + // 处理所有商品标题数据
  379 + finalResult.saleTitle = {};
  380 +
  381 + finalResult.saleTitle.name = '所有商品';
  382 + finalResult.saleTitle.count = subResult[1].data.count;
  383 +
385 _.forEach(finalResult.goods, (value, key) => { 384 _.forEach(finalResult.goods, (value, key) => {
386 finalResult.goods[key].tags.isNew = false; // 屏蔽 new 标签 385 finalResult.goods[key].tags.isNew = false; // 屏蔽 new 标签
387 }); 386 });