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', ];