Showing
1 changed file
with
2 additions
and
0 deletions
@@ -230,12 +230,14 @@ class HomeModel | @@ -230,12 +230,14 @@ class HomeModel | ||
230 | $sortList = ChannelConfig::$newArrivalSortList[$channel]; | 230 | $sortList = ChannelConfig::$newArrivalSortList[$channel]; |
231 | // 获取分类列表获取商品信息 | 231 | // 获取分类列表获取商品信息 |
232 | $goodsList = SearchData::getSearchDataBySort($params, $sortList); | 232 | $goodsList = SearchData::getSearchDataBySort($params, $sortList); |
233 | + $pos = 1; | ||
233 | foreach ($goodsList as $goods) { | 234 | foreach ($goodsList as $goods) { |
234 | // 格式化数据 | 235 | // 格式化数据 |
235 | $val = Helpers::formatProduct($goods, true, true, true, 280, 373); | 236 | $val = Helpers::formatProduct($goods, true, true, true, 280, 373); |
236 | if ($val['price'] == false) { | 237 | if ($val['price'] == false) { |
237 | $val['price'] = $val['salePrice']; | 238 | $val['price'] = $val['salePrice']; |
238 | } | 239 | } |
240 | + $val['url'] = sprintf('%s?channel=%s&from=%s-n_%s', $val['url'], $channel , $channel, $pos++); | ||
239 | //TODO 字段要调整 | 241 | //TODO 字段要调整 |
240 | $val['isFew'] = $val['is_soon_sold_out']; | 242 | $val['isFew'] = $val['is_soon_sold_out']; |
241 | $val['tags']['isLimit'] = $val['tags']['is_limited']; | 243 | $val['tags']['isLimit'] = $val['tags']['is_limited']; |
-
Please register or login to post a comment