...
|
...
|
@@ -2,7 +2,7 @@ |
|
|
* @Author: Targaryen
|
|
|
* @Date: 2016-05-19 10:20:08
|
|
|
* @Last Modified by: Targaryen
|
|
|
* @Last Modified time: 2016-06-07 15:07:22
|
|
|
* @Last Modified time: 2016-06-07 14:12:50
|
|
|
*/
|
|
|
|
|
|
'use strict';
|
...
|
...
|
@@ -279,7 +279,8 @@ exports.getSaleDiscountData = (params, channel) => { |
|
|
headerModel.requestHeaderData(channel),
|
|
|
saleApi.getSaleGoodsList(params),
|
|
|
saleApi.getSaleBannerList(contentCode[channel].sale),
|
|
|
saleApi.getSaleActivityList(params, channel)
|
|
|
saleApi.getSaleActivityList(params, channel),
|
|
|
saleApi.getSaleGoodsList({ channel: channel, saleType: '3', limit: '1' })
|
|
|
]).then(result => {
|
|
|
let finalResult = result[0];
|
|
|
|
...
|
...
|
@@ -287,15 +288,7 @@ exports.getSaleDiscountData = (params, channel) => { |
|
|
if (result[1].code === 200) {
|
|
|
finalResult.saleList = {};
|
|
|
finalResult.saleList.goods = productProcess.processProductList(result[1].data.product_list);
|
|
|
finalResult.leftContent = saleHandler.handleSaleSortData(result[1].data.filter.group_sort, params);
|
|
|
finalResult.saleList.totalCount = result[1].data.total;
|
|
|
finalResult.saleList.pager = saleHandler.handleSalePagerData(result[1].data.total, params);
|
|
|
|
|
|
// 处理所有商品标题数据
|
|
|
finalResult.saleTitle = {};
|
|
|
|
|
|
finalResult.saleTitle.name = '所有商品';
|
|
|
finalResult.saleTitle.count = finalResult.saleList.totalCount;
|
|
|
}
|
|
|
|
|
|
// 处理焦点图数据
|
...
|
...
|
@@ -310,6 +303,20 @@ exports.getSaleDiscountData = (params, channel) => { |
|
|
}
|
|
|
}
|
|
|
|
|
|
// 处理分页等筛选信息
|
|
|
if (result[4].code === 200) {
|
|
|
finalResult.leftContent = saleHandler.handleSaleSortData(result[4].data.filter.group_sort, params);
|
|
|
finalResult.saleList.totalCount = result[4].data.total;
|
|
|
finalResult.saleList.pager = saleHandler.handleSalePagerData(result[4].data.total, params);
|
|
|
finalResult.saleList.opts = saleHandler.handleSaleOptsData(params, result[4].data.total);
|
|
|
|
|
|
// 处理所有商品标题数据
|
|
|
finalResult.saleTitle = {};
|
|
|
|
|
|
finalResult.saleTitle.name = '所有商品';
|
|
|
finalResult.saleTitle.count = finalResult.saleList.totalCount;
|
|
|
}
|
|
|
|
|
|
return finalResult;
|
|
|
});
|
|
|
};
|
...
|
...
|
|