From 75ac0335ab7990ced9c7b49fe8d0e20ffd279fc4 Mon Sep 17 00:00:00 2001 From: fengxinyhyl Date: Wed, 29 May 2024 11:50:26 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E9=A6=96=E9=A1=B5=E6=8E=92?= =?UTF-8?q?=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/store/product/StoreSpu.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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);