From eedfb0f40203394fae9efd85cf1e50b76bcae4fd Mon Sep 17 00:00:00 2001 From: augushong Date: Thu, 8 Dec 2022 21:36:08 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8F=9C=E5=8D=95=E6=9D=83=E9=99=90=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E6=8C=89=E7=85=A7=E6=9D=83=E9=99=90=E6=A0=87=E5=BF=97?= =?UTF-8?q?=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/service/MenuService.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/common/service/MenuService.php b/app/common/service/MenuService.php index b8e0b0b..e566a1e 100644 --- a/app/common/service/MenuService.php +++ b/app/common/service/MenuService.php @@ -57,7 +57,15 @@ class MenuService { $treeList = []; foreach ($menuList as &$v) { - $check = empty($v['href']) ? true : $authServer->checkNode($v['href']); + $check = false; + if (!empty($v['auth_node'])) { + $check = $authServer->checkNode($v['auth_node']); + } else if (!empty($v['href'])) { + $check = $authServer->checkNode($v['href']); + } else { + $check = true; + } + !empty($v['href']) && $v['href'] = __url($v['href']); if ($pid == $v['pid'] && $check) { $node = $v;