From 02d488c2960ff1d99031bc0025f6354b3d23e73a Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Tue, 9 Jul 2024 14:17:49 +0800 Subject: [PATCH] =?UTF-8?q?feat(ProductLists.php):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E7=94=A8=E6=88=B7ID=E8=8E=B7=E5=8F=96=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/lists/product/ProductLists.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/api/lists/product/ProductLists.php b/app/api/lists/product/ProductLists.php index a6eb84836..b13a60509 100644 --- a/app/api/lists/product/ProductLists.php +++ b/app/api/lists/product/ProductLists.php @@ -108,8 +108,14 @@ class ProductLists extends BaseApiDataLists implements ListsSearchInterface, Lis $price = 'price'; $op_price = 'price'; $off_activity = 0; - if ($this->userId > 0) { - $user_ship = User::where('id', $this->userId)->value('user_ship'); + $uid=0; + if($this->request->get('uid')){ + $uid=$this->request->get('uid'); + }elseif($this->userId>0){ + $uid=$this->userId; + } + if ($uid > 0) { + $user_ship = User::where('id', $uid)->value('user_ship'); if (in_array($user_ship, [4, 5, 6, 7])) { $price = 'cost'; $op_price = 'price';