Authored by Rock Zhang

修复热销排行榜返回数据中goods_list的数据键值是从1开始,导致数据处理不正常的bug

Code Review By Rock Zhang
... ... @@ -83,6 +83,13 @@ class NewSaleProcess
$count = count($products['product_list']);
$one = array();
foreach ($products['product_list'] as $key => $single) {
if (!isset($single['goods_list'])) {
continue;
}
// 重置键值
$single['goods_list'] = array_values($single['goods_list']);
$one = Helpers::formatProduct($single, true, false, false, 75, 114);
$one['rank'] = $limit * ($page -1) + $key + 1;
!empty($single['sales_phrase']) && $one['sales_phrase'] = $single['sales_phrase'];
... ...