diff --git a/app/api/controller/Index.php b/app/api/controller/Index.php index b1a5e346..75d2a104 100755 --- a/app/api/controller/Index.php +++ b/app/api/controller/Index.php @@ -193,16 +193,20 @@ class Index extends Api // 控制显示本地生活 public function setHome(){ - $arr = array( - array( - "image"=>'https://zjeloong.oss-cn-hangzhou.aliyuncs.com/uniapp/all_service.png', - "name"=>'企业服务', - "is_tab"=> 0, - "link"=>'/bundle_b/pages/local_shop_category/index', - "link_type"=>1, - "is_set"=>0 - ) - ); + $local = Db::name("local_store")->where("user_id",$this->user_id)->where("is_delete",0)->select()->toArray(); + $arr = []; + if(!empty($local)){ + $arr = array( + array( + "image"=>'https://zjeloong.oss-cn-hangzhou.aliyuncs.com/uniapp/all_service.png', + "name"=>'企业服务', + "is_tab"=> 0, + "link"=>'/bundle_b/pages/local_shop_category/index', + "link_type"=>1, + "is_set"=>0 + ) + ); + } return JsonServer::success('查询成功', $arr); }