😎调整密码公钥从后台获取

This commit is contained in:
zuohuaijun 2024-10-29 01:24:50 +08:00
parent 661f22b7b6
commit 1b70a70876
3 changed files with 9 additions and 5 deletions

View File

@ -256,9 +256,10 @@ public class SysConfigService : IDynamicApiController, ITransient
var sysCopyright = await GetConfigValueByCode<string>(ConfigConst.SysWebCopyright);
var sysIcp = await GetConfigValueByCode<string>(ConfigConst.SysWebIcp);
var sysIcpUrl = await GetConfigValueByCode<string>(ConfigConst.SysWebIcpUrl);
var sysSecondVer = await GetConfigValueByCode<bool>(ConfigConst.SysSecondVer);
var sysCaptcha = await GetConfigValueByCode<bool>(ConfigConst.SysCaptcha);
var sysForceChangePassword = await GetConfigValueByCode<bool>(ConfigConst.SysForceChangePassword);
var sysSecondVer = await GetConfigValueByCode<bool>(ConfigConst.SysSecondVer); // 登录二次验证
var sysCaptcha = await GetConfigValueByCode<bool>(ConfigConst.SysCaptcha); // 图形验证码
var sysForceChangePassword = await GetConfigValueByCode<bool>(ConfigConst.SysForceChangePassword); // 强制修改密码
var publicKey = App.GetConfig<string>("Cryptogram:PublicKey", true); // 获取密码加解密公钥配置
return new
{
@ -272,7 +273,8 @@ public class SysConfigService : IDynamicApiController, ITransient
SysIcpUrl = sysIcpUrl,
SysSecondVer = sysSecondVer,
SysCaptcha = sysCaptcha,
SysForceChangePassword = sysForceChangePassword
SysForceChangePassword = sysForceChangePassword,
PublicKey = publicKey
};
}

View File

@ -17,4 +17,4 @@ VITE_DEFAULT_USER = superadmin
VITE_DEFAULT_USER_PASSWORD = 123456
# 国密SM公钥
VITE_SM_PUBLIC_KEY = "04851D329AA3E38C2E7670AFE70E6E70E92F8769CA27C8766B12209A0FFBA4493B603EF7A0B9B1E16F0E8930C0406EA0B179B68DF28E25334BDEC4AE76D907E9E9"
VITE_SM_PUBLIC_KEY =

View File

@ -128,6 +128,8 @@ const loadSysInfo = () => {
themeConfig.value.captcha = data.sysCaptcha;
//
themeConfig.value.sysForceChangePassword = data.sysForceChangePassword;
//
window.__env__.VITE_SM_PUBLIC_KEY = data.publicKey;
// favicon
updateFavicon(data.sysLogo);