...
|
...
|
@@ -2,7 +2,7 @@ |
|
|
* @Author: Targaryen
|
|
|
* @Date: 2016-05-19 10:20:08
|
|
|
* @Last Modified by: Targaryen
|
|
|
* @Last Modified time: 2016-05-25 09:52:41
|
|
|
* @Last Modified time: 2016-05-25 10:00:24
|
|
|
*/
|
|
|
|
|
|
'use strict';
|
...
|
...
|
@@ -313,7 +313,7 @@ const getSaleBannerList = () => { |
|
|
*/
|
|
|
exports.getSaleIndexData = () => {
|
|
|
|
|
|
return api.all([getSaleActivityList(), getSaleGoodsList(), getSaleBannerList()]).then(result => {
|
|
|
return api.all([getSaleActivityList(), getSaleBannerList()]).then(result => {
|
|
|
var finalResult = {};
|
|
|
|
|
|
if (result[0].code === 200) {
|
...
|
...
|
@@ -321,17 +321,8 @@ exports.getSaleIndexData = () => { |
|
|
}
|
|
|
|
|
|
if (result[1].code === 200) {
|
|
|
|
|
|
if (!_.isEmpty(result[1].data.product_list)) { // 处理商品列表数据
|
|
|
finalResult.saleCategory = {};
|
|
|
finalResult.saleCategory.saleImage = [];
|
|
|
finalResult.saleCategory.saleImage.push(handleSaleGoodsListData(result[1].data.product_list));
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if (result[2].code === 200) {
|
|
|
finalResult.topBanner = handleSaleBannerData(result[2].data);
|
|
|
finalResult.activityEnter = handleSaleBannerSmallData(result[2].data);
|
|
|
finalResult.topBanner = handleSaleBannerData(result[1].data);
|
|
|
finalResult.activityEnter = handleSaleBannerSmallData(result[1].data);
|
|
|
}
|
|
|
|
|
|
return finalResult;
|
...
|
...
|
|