From 84f014921dd43bd836e2e3750bd5b524f2a25e96 Mon Sep 17 00:00:00 2001 From: wangxiaowei Date: Sun, 11 Aug 2024 20:29:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A6=82=E6=9E=9C=E6=98=AF=E5=95=86=E5=AE=B6?= =?UTF-8?q?=E5=88=99=E6=98=BE=E7=A4=BA=E4=BC=81=E4=B8=9A=E6=9C=8D=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/Index.php | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) 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); }