...
|
...
|
@@ -36,7 +36,7 @@ class NewSaleProcess |
|
|
}
|
|
|
|
|
|
// 处理Filter
|
|
|
if(isset($products['filter'])) {
|
|
|
if (isset($products['filter'])) {
|
|
|
$result['filter'] = ListProcess::getFilterData($products['filter']);
|
|
|
}
|
|
|
|
...
|
...
|
@@ -50,15 +50,15 @@ class NewSaleProcess |
|
|
return $result;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 处理热销排行榜数据
|
|
|
*
|
|
|
* @param array $products 接口传回的数据
|
|
|
* @param boolean $notab 是否传回tab数据
|
|
|
* @param int $limit 查询返回的最大限制数
|
|
|
* @param int $page 分页第几页
|
|
|
* @return array 处理之后的数据
|
|
|
*/
|
|
|
/**
|
|
|
* 处理热销排行榜数据
|
|
|
*
|
|
|
* @param array $products 接口传回的数据
|
|
|
* @param boolean $notab 是否传回tab数据
|
|
|
* @param int $limit 查询返回的最大限制数
|
|
|
* @param int $page 分页第几页
|
|
|
* @return array 处理之后的数据
|
|
|
*/
|
|
|
public static function topData($products, $notab, $limit, $page)
|
|
|
{
|
|
|
$result = array();
|
...
|
...
|
@@ -80,21 +80,21 @@ class NewSaleProcess |
|
|
// 处理商品
|
|
|
if (isset($products['product_list'])) {
|
|
|
|
|
|
$count = count($products['product_list']);
|
|
|
$one = array();
|
|
|
$count = count($products['product_list']);
|
|
|
$one = array();
|
|
|
foreach ($products['product_list'] as $key => $single) {
|
|
|
if (!isset($single['goods_list'])) {
|
|
|
continue;
|
|
|
}
|
|
|
if (!isset($single['goods_list'])) {
|
|
|
continue;
|
|
|
}
|
|
|
|
|
|
// 重置键值
|
|
|
$single['goods_list'] = array_values($single['goods_list']);
|
|
|
// 重置键值
|
|
|
$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'];
|
|
|
$one['rank'] = $limit * ($page - 1) + $key + 1;
|
|
|
!empty($single['sales_phrase']) && $one['sales_phrase'] = $single['sales_phrase'];
|
|
|
|
|
|
$result['goods'][] = $one;
|
|
|
$result['goods'][] = $one;
|
|
|
}
|
|
|
}
|
|
|
|
...
|
...
|
|