Parcourir la source

fix: 修复登录验证配置参数回显失败的bug

喵你个旺呀 il y a 1 an
Parent
commit
616633796c

+ 4 - 4
Admin.NET/Admin.NET.Core/Service/Config/SysConfigService.cs

@@ -267,10 +267,10 @@ public class SysConfigService : IDynamicApiController, ITransient
             tenant.IcpUrl,
             tenant.RegWayId,
             tenant.EnableReg,
-            SecondVer = secondVer,
-            Captcha = captcha,
-            WayList = wayList,
-            HideTenantForLogin = hideTenantForLogin
+            SecondVer = secondVer ? YesNoEnum.Y : YesNoEnum.N,
+            Captcha = captcha ? YesNoEnum.Y : YesNoEnum.N,
+            HideTenantForLogin = hideTenantForLogin,
+            WayList = wayList
         };
     }
 

+ 2 - 2
Web/src/App.vue

@@ -134,8 +134,8 @@ const loadSysInfo = () => {
 			// 版权说明
 			themeConfig.value.copyright = data.copyright;
 			// 登录验证
-			themeConfig.value.secondVer = data.secondVer;
-			themeConfig.value.captcha = data.captcha;
+			themeConfig.value.secondVer = data.secondVer == 1;
+			themeConfig.value.captcha = data.captcha == 1;
 			// 登陆时隐藏租户
 			themeConfig.value.hideTenantForLogin = data.hideTenantForLogin;
 			// 注册功能