diff --git a/app/controller/api/store/product/StoreSpu.php b/app/controller/api/store/product/StoreSpu.php index b8a8486..2fb8303 100644 --- a/app/controller/api/store/product/StoreSpu.php +++ b/app/controller/api/store/product/StoreSpu.php @@ -18,6 +18,7 @@ use crmeb\services\CopyCommand; use think\App; use crmeb\basic\BaseController; use app\common\repositories\store\product\SpuRepository; +use think\facade\Log; class StoreSpu extends BaseController { @@ -63,11 +64,8 @@ class StoreSpu extends BaseController ]); $where['is_gift_bag'] = 0; $where['product_type'] = 0; - if($limit == 6){ - $limit = 10; - $where['is_good'] = 1; - } - $where['order'] = $where['order'] ?: 'product_id'; + $where['is_good'] = 1; + $where['order'] = $where['order'] ?: 'rank'; if ($where['is_trader'] != 1) unset($where['is_trader']); $data = $this->repository->getApiSearch($where, $page, $limit, $this->userInfo); return app('json')->success($data); @@ -127,6 +125,7 @@ class StoreSpu extends BaseController $where['order'] = 'star'; break; } + Log::info("recommend is ".systemConfig('recommend_type')); $where['product_type'] = 0; $where['is_stock'] = 1; $data = $this->repository->getApiSearch($where, $page, $limit, $this->userInfo);