配置修改

This commit is contained in:
2026-04-18 14:40:11 +08:00
parent 7eaf46cf27
commit 32ec0607d0
2 changed files with 8 additions and 9 deletions

View File

@ -26,7 +26,7 @@ use app\api\logic\ShopLogic;
class Shop extends Api class Shop extends Api
{ {
public $like_not_need_login = ['getShopInfo', 'getShopList','getNearbyShops']; public $like_not_need_login = ['getShopInfo', 'getShopList','getNearbyShops','getShopCityInfo'];
/** /**
* 店铺信息 * 店铺信息
@ -52,8 +52,7 @@ class Shop extends Api
{ {
if($this->request->isGet()) { if($this->request->isGet()) {
$city_id = $this->request->get('city_id', 0); $city_id = $this->request->get('city_id', 0);
// $this->user_id $data = ShopLogic::getShopCityInfo($city_id, $this->user_id, input());
$data = ShopLogic::getShopCityInfo($city_id,"" , input());
return JsonServer::success('获取店铺信息成功', $data); return JsonServer::success('获取店铺信息成功', $data);
}else{ }else{
return JsonServer::error('请求类型错误'); return JsonServer::error('请求类型错误');

View File

@ -177,12 +177,12 @@ class ShopLogic extends Logic
// 用户是否关注店铺 // 用户是否关注店铺
$shop['shop_follow_status'] = 0; $shop['shop_follow_status'] = 0;
// if($userId) { // 用户已登录 if($userId) { // 用户已登录
// $shopFollow = ShopFollow::where(['user_id'=>$userId, 'shop_id'=>$shop['id']])->findOrEmpty(); $shopFollow = ShopFollow::where(['user_id'=>$userId, 'shop_id'=>$shop['id']])->findOrEmpty();
// if(!$shopFollow->isEmpty()) { if(!$shopFollow->isEmpty()) {
// $shop['shop_follow_status'] = $shopFollow['status']; $shop['shop_follow_status'] = $shopFollow['status'];
// } }
// } }
$shop['follow_num'] = ShopFollow::where(['shop_id' => $shop['id'],'status' => 1])->count('id'); $shop['follow_num'] = ShopFollow::where(['shop_id' => $shop['id'],'status' => 1])->count('id');
$image = ConfigServer::get('shop_customer_service', 'image', '', $shop['id']); $image = ConfigServer::get('shop_customer_service', 'image', '', $shop['id']);
$shop['customer_image'] = $image ? UrlServer::getFileUrl($image) : ''; $shop['customer_image'] = $image ? UrlServer::getFileUrl($image) : '';