From 37f7b08f09772b3633467936aee24415c111ed88 Mon Sep 17 00:00:00 2001 From: liaofei <136327134@qq.com> Date: Tue, 21 Feb 2023 09:38:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=90=8E=E5=8F=B0=E5=B1=95?= =?UTF-8?q?=E7=A4=BA=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/app/adminapi/controller/Common.php | 1 + crmeb/app/services/system/SystemMenusServices.php | 5 ++++- crmeb/config/app.php | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/crmeb/app/adminapi/controller/Common.php b/crmeb/app/adminapi/controller/Common.php index e4cbe928d..6c04e3142 100644 --- a/crmeb/app/adminapi/controller/Common.php +++ b/crmeb/app/adminapi/controller/Common.php @@ -346,6 +346,7 @@ class Common extends AuthController $pid = $item->getData('pid'); $data[$key] = json_decode($item, true); $data[$key]['pid'] = $pid; + $data[$key]['menu_path'] = '/' . config('app.admin_prefix', 'admin') . $item['menu_path']; if (in_array($item->id, $counts)) { $data[$key]['type'] = 1; } else { diff --git a/crmeb/app/services/system/SystemMenusServices.php b/crmeb/app/services/system/SystemMenusServices.php index debe82ea4..f19f021ba 100644 --- a/crmeb/app/services/system/SystemMenusServices.php +++ b/crmeb/app/services/system/SystemMenusServices.php @@ -51,8 +51,11 @@ class SystemMenusServices extends BaseServices { $data = []; foreach ($menusList as $item) { - $data[] = $item->getData(); + $item = $item->getData(); + $item['menu_path'] = '/' . config('app.admin_prefix', 'admin') . $item['menu_path']; + $data[] = $item; } + return $data; } diff --git a/crmeb/config/app.php b/crmeb/config/app.php index c88c9a1e0..af4b2bcb0 100644 --- a/crmeb/config/app.php +++ b/crmeb/config/app.php @@ -47,5 +47,5 @@ return [ // 没有开启消息队列命令或者定时任务命令的提醒开关 'console_remind' => true, // admin路由前缀 - 'admin_prefix' => 'administration', + 'admin_prefix' => 'admin', ];