diff --git a/application/admin/library/Auth.php b/application/admin/library/Auth.php index 4c68e237..ea9e823d 100644 --- a/application/admin/library/Auth.php +++ b/application/admin/library/Auth.php @@ -449,8 +449,9 @@ class Auth extends \fast\Auth $referer = []; } - $select_id = $selected ? $selected['id'] : 0; + $select_id = $referer ? $referer['id'] : ($selected ? $selected['id'] : 0); $menu = $nav = ''; + $showSubmenu = (int)cookie('show_submenu'); if (Config::get('fastadmin.multiplenav')) { $topList = []; foreach ($ruleList as $index => $item) { @@ -471,7 +472,7 @@ class Auth extends \fast\Auth $select_id, '', 'ul', - 'class="treeview-menu"' + 'class="treeview-menu' . ($showSubmenu ? ' menu-open' : '') . '"' ); $current = in_array($item['id'], $selectParentIds); $url = $childList ? 'javascript:;' : $item['url']; @@ -493,7 +494,7 @@ class Auth extends \fast\Auth $select_id, '', 'ul', - 'class="treeview-menu"' + 'class="treeview-menu' . ($showSubmenu ? ' menu-open' : '') . '"' ); if ($selected) { $nav .= '