From d338e54375902a4c230d07467e5bf82de296ea55 Mon Sep 17 00:00:00 2001 From: liaofei <136327134@qq.com> Date: Sat, 15 Apr 2023 14:50:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=89=B9=E9=87=8F=E6=96=B0?= =?UTF-8?q?=E5=A2=9EBUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/adminapi/controller/v1/setting/SystemMenus.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/crmeb/app/adminapi/controller/v1/setting/SystemMenus.php b/crmeb/app/adminapi/controller/v1/setting/SystemMenus.php index 08125597f..93db4b4a8 100644 --- a/crmeb/app/adminapi/controller/v1/setting/SystemMenus.php +++ b/crmeb/app/adminapi/controller/v1/setting/SystemMenus.php @@ -50,13 +50,13 @@ class SystemMenus extends AuthController } /** - * @author 等风来 - * @email 136327134@qq.com - * @date 2023/4/14 * @return \think\Response * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException + * @author 等风来 + * @email 136327134@qq.com + * @date 2023/4/14 */ public function unique() { @@ -139,6 +139,8 @@ class SystemMenus extends AuthController 'unique_auth' => $menu['unique_auth'] ?? '', 'api_url' => $menu['api_url'], 'pid' => $menu['path'], + 'auth_type' => 2, + 'is_show' => 0, ]; } @@ -277,7 +279,7 @@ class SystemMenus extends AuthController if ($menuApiList) $menuApiList = array_column($menuApiList, 'rule'); $list = []; foreach ($ruleList as $item) { - if (!in_array($item['path'] . '_' . strtolower($item['method']), $menuApiList)) { + if ($item['type'] || !in_array($item['path'] . '_' . strtolower($item['method']), $menuApiList)) { $item['real_name'] = $item['name'] ?? ''; $item['method'] = strtoupper($item['method']); $list[] = $item;