Showing
1 changed file
with
11 additions
and
3 deletions
@@ -41,7 +41,7 @@ exports.getOutletsIndexData = (params, channel) => { | @@ -41,7 +41,7 @@ exports.getOutletsIndexData = (params, channel) => { | ||
41 | outletsApi.getOutletsActivityOrigin({type: '1', channel: channel}), // 获取限时活动列表 | 41 | outletsApi.getOutletsActivityOrigin({type: '1', channel: channel}), // 获取限时活动列表 |
42 | outletsApi.getOutletsActivityOrigin({type: '2', channel: channel}), // 获取即将结束列表 | 42 | outletsApi.getOutletsActivityOrigin({type: '2', channel: channel}), // 获取即将结束列表 |
43 | outletsApi.getOutletsTrendData({limit: '30'}), // 获取潮流速递商品数据 | 43 | outletsApi.getOutletsTrendData({limit: '30'}), // 获取潮流速递商品数据 |
44 | - outletsApi.getOutletsGoodsList({limit: params.limit || '100'}), // 获取底部商品数据 | 44 | + outletsApi.getOutletsGoodsList(Object.assign(params, {limit: params.limit || '100'})), // 获取底部商品数据 |
45 | outletsApi.getOutletsActivityOrigin({type: '3', channel: channel}) // tar add 16171552 即将上线数据 | 45 | outletsApi.getOutletsActivityOrigin({type: '3', channel: channel}) // tar add 16171552 即将上线数据 |
46 | ]).then(result => { | 46 | ]).then(result => { |
47 | let finalResult = {}; | 47 | let finalResult = {}; |
@@ -77,9 +77,17 @@ exports.getOutletsIndexData = (params, channel) => { | @@ -77,9 +77,17 @@ exports.getOutletsIndexData = (params, channel) => { | ||
77 | // 处理底部商品数据 | 77 | // 处理底部商品数据 |
78 | if (result[5].code === 200) { | 78 | if (result[5].code === 200) { |
79 | finalResult.goodsBoard = { | 79 | finalResult.goodsBoard = { |
80 | - list: productProcess.processProductList(result[5].data.product_list), | ||
81 | - sort: Object.assign(publicHandler.handleSaleOptsData(params, result[5].data.total), {newPage: true}) | 80 | + sort: Object.assign(publicHandler.handleSaleOptsData(params, result[5].data.total), {newPage: true}), |
81 | + list: productProcess.processProductList(result[5].data.product_list) | ||
82 | }; | 82 | }; |
83 | + | ||
84 | + // 添加锚点 | ||
85 | + if (!_.isEmpty(finalResult.goodsBoard.sort.sortType)) { | ||
86 | + _.forEach(finalResult.goodsBoard.sort.sortType, (value, key) => { | ||
87 | + finalResult.goodsBoard.sort.sortType[key].href += '#otspool'; | ||
88 | + }); | ||
89 | + } | ||
90 | + | ||
83 | finalResult.pager = publicHandler.handleSalePagerData(result[5].data.total, params); | 91 | finalResult.pager = publicHandler.handleSalePagerData(result[5].data.total, params); |
84 | } | 92 | } |
85 | 93 |
-
Please register or login to post a comment