From 2815bf84077cb1ba3c80511dd0164b394214596f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=87=AA=E5=B8=A6=E5=A4=A7=E4=BD=AC=E6=B0=94=E5=9C=BA?= <188633308@qq.com> Date: Wed, 26 May 2021 13:38:40 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E4=B8=8A=E4=B8=80=E4=B8=AA=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Api/Ewide.Core/Service/App/SysAppService.cs | 4 ++-- Api/Ewide.Core/Service/Auth/AuthService.cs | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) 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