fix: 修复侧边栏默认 active 菜单项

This commit is contained in:
Argo Window10 2019-12-12 12:09:11 +08:00
parent 954b7556a7
commit 8297b05081
1 changed files with 2 additions and 2 deletions

View File

@ -16,7 +16,7 @@ namespace Bootstrap.Admin.Models
/// 构造函数 /// 构造函数
/// </summary> /// </summary>
/// <param name="controller"></param> /// <param name="controller"></param>
public NavigatorBarModel(ControllerBase controller) : this(controller.User.Identity.Name) public NavigatorBarModel(ControllerBase controller) : this(controller.User.Identity.Name, $"~{controller.Request.Path}")
{ {
} }
@ -26,7 +26,7 @@ namespace Bootstrap.Admin.Models
/// </summary> /// </summary>
/// <param name="userName"></param> /// <param name="userName"></param>
/// <param name="activeUrl"></param> /// <param name="activeUrl"></param>
public NavigatorBarModel(string? userName, string activeUrl = "~/Admin/Index") : base(userName) public NavigatorBarModel(string? userName, string activeUrl = "") : base(userName)
{ {
Navigations = MenuHelper.RetrieveSystemMenus(UserName, activeUrl); Navigations = MenuHelper.RetrieveSystemMenus(UserName, activeUrl);
var authApps = AppHelper.RetrievesByUserName(userName); var authApps = AppHelper.RetrievesByUserName(userName);