diff --git a/Api/Ewide.Core/Service/App/SysAppService.cs b/Api/Ewide.Core/Service/App/SysAppService.cs index ad70d88..ea207cd 100644 --- a/Api/Ewide.Core/Service/App/SysAppService.cs +++ b/Api/Ewide.Core/Service/App/SysAppService.cs @@ -57,8 +57,8 @@ namespace Ewide.Core.Service }).ToListAsync(); // .OrderByDescending(u => u.Active) // 将激活的放到第一个 //// 默认激活第一个应用 - //if (appList != null && appList.Count > 0 && appList[0].Active != YesOrNot.Y.ToString()) - // appList[0].Active = YesOrNot.Y.ToString(); + if (appList != null && appList.Count > 0 && !appList[0].Active) + appList[0].Active = true; return appList; } diff --git a/Api/Ewide.Core/Service/Auth/AuthService.cs b/Api/Ewide.Core/Service/Auth/AuthService.cs index ff353c6..b9b3773 100644 --- a/Api/Ewide.Core/Service/Auth/AuthService.cs +++ b/Api/Ewide.Core/Service/Auth/AuthService.cs @@ -157,11 +157,11 @@ namespace Ewide.Core.Service loginOutput.Apps = await _sysAppService.GetLoginApps(userId); // 菜单信息 - //if (loginOutput.Apps.Count > 0) - //{ - // var defaultActiveAppCode = loginOutput.Apps.FirstOrDefault(u => u.Active == true).Code; // loginOutput.Apps[0].Code; - // loginOutput.Menus = await _sysMenuService.GetLoginMenusAntDesign(userId, defaultActiveAppCode); - //} + if (loginOutput.Apps.Count > 0) + { + var defaultActiveAppCode = loginOutput.Apps.FirstOrDefault(u => u.Active == true).Code; // loginOutput.Apps[0].Code; + loginOutput.Menus = await _sysMenuService.GetLoginMenusAntDesign(userId, defaultActiveAppCode); + } // 增加登录日志 //await new SysLogVis