Showing
1 changed file
with
5 additions
and
8 deletions
@@ -161,24 +161,21 @@ exports.getOutletsChannelData = (params, channel) => { | @@ -161,24 +161,21 @@ exports.getOutletsChannelData = (params, channel) => { | ||
161 | 161 | ||
162 | // 商品列表 | 162 | // 商品列表 |
163 | if (result[3].code === 200) { | 163 | if (result[3].code === 200) { |
164 | - if (!channelData.goodsBoard) { | ||
165 | - channelData.goodsBoard = {}; | ||
166 | - } | 164 | + channelData.goodsBoard = {}; |
167 | channelData.goodsBoard.sort = publicHandler.handleSaleOptsData(params, result[3].data.total); | 165 | channelData.goodsBoard.sort = publicHandler.handleSaleOptsData(params, result[3].data.total); |
168 | channelData.goodsBoard.sort.newPage = true; | 166 | channelData.goodsBoard.sort.newPage = true; |
169 | channelData.goodsBoard.list = productProcess.processProductList(result[3].data.product_list); | 167 | channelData.goodsBoard.list = productProcess.processProductList(result[3].data.product_list); |
170 | channelData.pager = publicHandler.handleSalePagerData(result[3].data.total, params); | 168 | channelData.pager = publicHandler.handleSalePagerData(result[3].data.total, params); |
171 | - | ||
172 | // 添加锚点 | 169 | // 添加锚点 |
173 | if (channelData.goodsBoard.sort.sortType) { | 170 | if (channelData.goodsBoard.sort.sortType) { |
174 | _.forEach(channelData.goodsBoard.sort.sortType, (value, key) => { | 171 | _.forEach(channelData.goodsBoard.sort.sortType, (value, key) => { |
175 | channelData.goodsBoard.sort.sortType[key].href += '#otspool'; | 172 | channelData.goodsBoard.sort.sortType[key].href += '#otspool'; |
176 | }); | 173 | }); |
177 | - if (finalResult.goodsBoard.sort.preHref) { | ||
178 | - finalResult.goodsBoard.sort.preHref += '#otspool'; | 174 | + if (channelData.goodsBoard.sort.preHref) { |
175 | + channelData.goodsBoard.sort.preHref += '#otspool'; | ||
179 | } | 176 | } |
180 | - if (finalResult.goodsBoard.sort.nextHref) { | ||
181 | - finalResult.goodsBoard.sort.nextHref += '#otspool'; | 177 | + if (channelData.goodsBoard.sort.nextHref) { |
178 | + channelData.goodsBoard.sort.nextHref += '#otspool'; | ||
182 | } | 179 | } |
183 | } | 180 | } |
184 | } | 181 | } |
-
Please register or login to post a comment