From 665af9e703bc9add9a4ff4baa0c4d23bd6031895 Mon Sep 17 00:00:00 2001 From: wangxiaowei Date: Mon, 12 Aug 2024 11:39:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9C=AC=E5=9C=B0=E7=94=9F?= =?UTF-8?q?=E6=B4=BB=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/Index.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/api/controller/Index.php b/app/api/controller/Index.php index 6042567c..4b699153 100755 --- a/app/api/controller/Index.php +++ b/app/api/controller/Index.php @@ -5,6 +5,7 @@ namespace app\api\controller; use app\api\logic\DistributionLogic; use app\api\logic\IndexLogic; use app\common\basics\Api; +use app\common\enum\MenuEnum; use app\common\logic\ChatLogic; use app\common\logic\RegionLogic; use app\common\model\MenuDecorate; @@ -199,7 +200,7 @@ class Index extends Api { $local = Db::name("local_store")->where("user_id", $this->user_id)->where("is_delete", 0)->select()->toArray(); $list = MenuDecorate::where(['decorate_type' => 3, 'del' => 0, 'is_show' => 1]) - ->field('name,image,link_type,link_address, link') + ->field('name,image,link_type,link_address') ->order('sort desc') ->select() ->toArray(); @@ -218,6 +219,11 @@ class Index extends Api $data = array(); if ($list) { + foreach ($list as $v) { + $menu_content = MenuEnum::getMenu('local', $v['link_address']); + $v['link'] = $menu_content['link']; + } + $data = array_merge($company, $list); }