From 7eaf46cf27b1dc5fdab41ffc088c21678cdb0d64 Mon Sep 17 00:00:00 2001 From: xucong <850806214@qq.com> Date: Sat, 18 Apr 2026 14:38:21 +0800 Subject: [PATCH] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/Shop.php | 3 ++- app/api/logic/ShopLogic.php | 12 ++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/app/api/controller/Shop.php b/app/api/controller/Shop.php index 9abdacaf..ce8cb1fc 100644 --- a/app/api/controller/Shop.php +++ b/app/api/controller/Shop.php @@ -52,7 +52,8 @@ class Shop extends Api { if($this->request->isGet()) { $city_id = $this->request->get('city_id', 0); - $data = ShopLogic::getShopCityInfo($city_id, $this->user_id, input()); +// $this->user_id + $data = ShopLogic::getShopCityInfo($city_id,"" , input()); return JsonServer::success('获取店铺信息成功', $data); }else{ return JsonServer::error('请求类型错误'); diff --git a/app/api/logic/ShopLogic.php b/app/api/logic/ShopLogic.php index a48e2c7c..4e82cfc5 100644 --- a/app/api/logic/ShopLogic.php +++ b/app/api/logic/ShopLogic.php @@ -177,12 +177,12 @@ class ShopLogic extends Logic // 用户是否关注店铺 $shop['shop_follow_status'] = 0; - if($userId) { // 用户已登录 - $shopFollow = ShopFollow::where(['user_id'=>$userId, 'shop_id'=>$shop['id']])->findOrEmpty(); - if(!$shopFollow->isEmpty()) { - $shop['shop_follow_status'] = $shopFollow['status']; - } - } +// if($userId) { // 用户已登录 +// $shopFollow = ShopFollow::where(['user_id'=>$userId, 'shop_id'=>$shop['id']])->findOrEmpty(); +// if(!$shopFollow->isEmpty()) { +// $shop['shop_follow_status'] = $shopFollow['status']; +// } +// } $shop['follow_num'] = ShopFollow::where(['shop_id' => $shop['id'],'status' => 1])->count('id'); $image = ConfigServer::get('shop_customer_service', 'image', '', $shop['id']); $shop['customer_image'] = $image ? UrlServer::getFileUrl($image) : '';