配置修改
This commit is contained in:
@ -52,7 +52,8 @@ 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);
|
||||||
$data = ShopLogic::getShopCityInfo($city_id, $this->user_id, input());
|
// $this->user_id
|
||||||
|
$data = ShopLogic::getShopCityInfo($city_id,"" , input());
|
||||||
return JsonServer::success('获取店铺信息成功', $data);
|
return JsonServer::success('获取店铺信息成功', $data);
|
||||||
}else{
|
}else{
|
||||||
return JsonServer::error('请求类型错误');
|
return JsonServer::error('请求类型错误');
|
||||||
|
|||||||
@ -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) : '';
|
||||||
|
|||||||
Reference in New Issue
Block a user