|
@@ -2,7 +2,7 @@ |
|
@@ -2,7 +2,7 @@ |
2
|
* @Author: Targaryen
|
2
|
* @Author: Targaryen
|
3
|
* @Date: 2016-05-19 10:20:08
|
3
|
* @Date: 2016-05-19 10:20:08
|
4
|
* @Last Modified by: Targaryen
|
4
|
* @Last Modified by: Targaryen
|
5
|
- * @Last Modified time: 2016-06-07 15:07:22
|
5
|
+ * @Last Modified time: 2016-06-07 14:12:50
|
6
|
*/
|
6
|
*/
|
7
|
|
7
|
|
8
|
'use strict';
|
8
|
'use strict';
|
|
@@ -279,7 +279,8 @@ exports.getSaleDiscountData = (params, channel) => { |
|
@@ -279,7 +279,8 @@ exports.getSaleDiscountData = (params, channel) => { |
279
|
headerModel.requestHeaderData(channel),
|
279
|
headerModel.requestHeaderData(channel),
|
280
|
saleApi.getSaleGoodsList(params),
|
280
|
saleApi.getSaleGoodsList(params),
|
281
|
saleApi.getSaleBannerList(contentCode[channel].sale),
|
281
|
saleApi.getSaleBannerList(contentCode[channel].sale),
|
282
|
- saleApi.getSaleActivityList(params, channel)
|
282
|
+ saleApi.getSaleActivityList(params, channel),
|
|
|
283
|
+ saleApi.getSaleGoodsList({ channel: channel, saleType: '3', limit: '1' })
|
283
|
]).then(result => {
|
284
|
]).then(result => {
|
284
|
let finalResult = result[0];
|
285
|
let finalResult = result[0];
|
285
|
|
286
|
|
|
@@ -287,15 +288,7 @@ exports.getSaleDiscountData = (params, channel) => { |
|
@@ -287,15 +288,7 @@ exports.getSaleDiscountData = (params, channel) => { |
287
|
if (result[1].code === 200) {
|
288
|
if (result[1].code === 200) {
|
288
|
finalResult.saleList = {};
|
289
|
finalResult.saleList = {};
|
289
|
finalResult.saleList.goods = productProcess.processProductList(result[1].data.product_list);
|
290
|
finalResult.saleList.goods = productProcess.processProductList(result[1].data.product_list);
|
290
|
- finalResult.leftContent = saleHandler.handleSaleSortData(result[1].data.filter.group_sort, params);
|
|
|
291
|
- finalResult.saleList.totalCount = result[1].data.total;
|
|
|
292
|
- finalResult.saleList.pager = saleHandler.handleSalePagerData(result[1].data.total, params);
|
|
|
293
|
|
291
|
|
294
|
- // 处理所有商品标题数据
|
|
|
295
|
- finalResult.saleTitle = {};
|
|
|
296
|
-
|
|
|
297
|
- finalResult.saleTitle.name = '所有商品';
|
|
|
298
|
- finalResult.saleTitle.count = finalResult.saleList.totalCount;
|
|
|
299
|
}
|
292
|
}
|
300
|
|
293
|
|
301
|
// 处理焦点图数据
|
294
|
// 处理焦点图数据
|
|
@@ -310,6 +303,20 @@ exports.getSaleDiscountData = (params, channel) => { |
|
@@ -310,6 +303,20 @@ exports.getSaleDiscountData = (params, channel) => { |
310
|
}
|
303
|
}
|
311
|
}
|
304
|
}
|
312
|
|
305
|
|
|
|
306
|
+ // 处理分页等筛选信息
|
|
|
307
|
+ if (result[4].code === 200) {
|
|
|
308
|
+ finalResult.leftContent = saleHandler.handleSaleSortData(result[4].data.filter.group_sort, params);
|
|
|
309
|
+ finalResult.saleList.totalCount = result[4].data.total;
|
|
|
310
|
+ finalResult.saleList.pager = saleHandler.handleSalePagerData(result[4].data.total, params);
|
|
|
311
|
+ finalResult.saleList.opts = saleHandler.handleSaleOptsData(params, result[4].data.total);
|
|
|
312
|
+
|
|
|
313
|
+ // 处理所有商品标题数据
|
|
|
314
|
+ finalResult.saleTitle = {};
|
|
|
315
|
+
|
|
|
316
|
+ finalResult.saleTitle.name = '所有商品';
|
|
|
317
|
+ finalResult.saleTitle.count = finalResult.saleList.totalCount;
|
|
|
318
|
+ }
|
|
|
319
|
+
|
313
|
return finalResult;
|
320
|
return finalResult;
|
314
|
});
|
321
|
});
|
315
|
};
|
322
|
};
|