From 1ef3edd424239471ee25be4746d2ae61846dc90b Mon Sep 17 00:00:00 2001 From: wangxiaowei Date: Thu, 5 Sep 2024 23:19:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=98=BE=E7=A4=BA=E6=9C=AC?= =?UTF-8?q?=E5=9C=B0=E5=95=86=E5=AE=B6=E4=BC=81=E4=B8=9A=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E7=9A=84=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/Index.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/api/controller/Index.php b/app/api/controller/Index.php index 6a1ac58e..7687eefa 100755 --- a/app/api/controller/Index.php +++ b/app/api/controller/Index.php @@ -198,7 +198,12 @@ class Index extends Api // 控制显示本地生活 public function setHome() { - $local = Db::name("local_store")->where("user_id", $this->user_id)->where("is_delete", 0)->select()->toArray(); + $local = Db::name("local_store") + ->where([ + 'user_id' => $this->user_id, + 'store_state' => 1, + 'is_delete' => 0, + ])->count(); $list = MenuDecorate::where(['decorate_type' => 3, 'del' => 0, 'is_show' => 1]) ->field('name,image,link_type,link_address') ->order('sort desc') @@ -206,7 +211,7 @@ class Index extends Api ->toArray(); $company = array(); - if (!empty($local)) { + if ($local > 0) { $company[] = array( "image" => 'https://zjeloong.oss-cn-hangzhou.aliyuncs.com/uniapp/all_service.png', "name" => '企业服务',