diff --git a/app/admin/logic/auth/AdminLogic.php b/app/admin/logic/auth/AdminLogic.php index a1a909f..af12872 100644 --- a/app/admin/logic/auth/AdminLogic.php +++ b/app/admin/logic/auth/AdminLogic.php @@ -232,7 +232,7 @@ class AdminLogic extends BaseLogic $result['user'] = $admin; // 当前管理员角色拥有的菜单 - $result['menu'] = MenuLogic::getMenuByAdminId($params['id']); + $result['menu'] = MenuLogic::getMenuByAdminId($params['id'],false); $result['top_menu'] = MenuLogic::getMenuByAdminId($params['id'],true); // 当前管理员橘色拥有的按钮权限 diff --git a/app/admin/logic/auth/MenuLogic.php b/app/admin/logic/auth/MenuLogic.php index 31d72f3..911a5af 100644 --- a/app/admin/logic/auth/MenuLogic.php +++ b/app/admin/logic/auth/MenuLogic.php @@ -50,11 +50,9 @@ class MenuLogic extends BaseLogic $where[] = ['type', 'in', ['M', 'C']]; $where[] = ['is_disable', '=', 0]; - if($is_top==true){ + if ($is_top==true) { $menu_where[]=['is_top','=',1]; $where[] = ['pid', '=', 0]; - } - if ($admin['root'] != 1 || $is_top==true) { if(!empty($admin['role_id'])){ $menu_where[]=['role_id','in',$admin['role_id']]; }