😎1、优化swagger登录验证码逻辑 2、系统设置更新租户缓存 3、级联选择增加点击文字生效

This commit is contained in:
zuohuaijun 2025-03-27 17:35:26 +08:00
parent b73c193b88
commit 3412dd0193
5 changed files with 35 additions and 10 deletions

View File

@ -397,6 +397,7 @@ public class SysAuthService : IDynamicApiController, ITransient
// 关闭默认租户验证码验证
var tenantList = _sysCacheService.Get<List<SysTenant>>(CacheConst.KeyTenant);
var tenant = tenantList.FirstOrDefault(u => u.Id == SqlSugarConst.DefaultTenantId);
var tmpCaptcha = tenant.Captcha;
tenant.Captcha = false;
_sysCacheService.Set(CacheConst.KeyTenant, tenantList);
@ -407,8 +408,8 @@ public class SysAuthService : IDynamicApiController, ITransient
TenantId = SqlSugarConst.DefaultTenantId
});
// 启用默认租户验证码验证
tenant.Captcha = true;
// 恢复默认租户验证码状态
tenant.Captcha = tmpCaptcha;
_sysCacheService.Set(CacheConst.KeyTenant, tenantList);
return 200;

View File

@ -683,6 +683,12 @@ public class SysTenantService : IDynamicApiController, ITransient
u.Captcha,
u.SecondVer
}).ExecuteCommandAsync();
// 更新租户缓存
var tenantList = _sysCacheService.Get<List<SysTenant>>(CacheConst.KeyTenant);
var tmpTenant = tenantList.FirstOrDefault(u => u.Id == tenant.Id);
tmpTenant = tenant;
_sysCacheService.Set(CacheConst.KeyTenant, tenantList);
}
/// <summary>

View File

@ -2,7 +2,7 @@
"name": "admin.net.pro",
"type": "module",
"version": "2.4.33",
"lastBuildTime": "2025.03.26",
"lastBuildTime": "2025.03.27",
"description": "Admin.NET 站在巨人肩膀上的 .NET 通用权限开发框架",
"author": "zuohuaijun",
"license": "MIT",
@ -77,8 +77,8 @@
"vue-signature-pad": "^3.0.2",
"vue3-flag-icons": "^0.0.3",
"vue3-tree-org": "^4.2.2",
"vxe-pc-ui": "^4.4.26",
"vxe-table": "^4.12.0",
"vxe-pc-ui": "^4.5.2",
"vxe-table": "^4.12.1",
"vxe-table-plugin-element": "^4.0.4",
"vxe-table-plugin-export-xlsx": "^4.0.7",
"xe-utils": "^3.7.4",
@ -88,7 +88,7 @@
"@iconify/vue": "^4.3.0",
"@plugin-web-update-notification/vite": "^2.0.0",
"@types/lodash-es": "^4.17.12",
"@types/node": "^20.17.27",
"@types/node": "^20.17.28",
"@types/nprogress": "^0.2.3",
"@types/sortablejs": "^1.15.8",
"@typescript-eslint/eslint-plugin": "^8.28.0",

View File

@ -39,8 +39,7 @@ export const useUserInfo = defineStore('userInfo', {
.apiSysDictTypeAllDictListGet()
.then((res) => res.data.result ?? {});
var dictListTemp = JSON.parse(JSON.stringify(dictList));
console.log('dictListTemp', JSON.stringify(dictList));
console.log(dictListTemp);
await Promise.all(
Object.keys(dictList).map(async (key) => {
dictList[key].forEach((da: any, index: any) => {
@ -187,5 +186,5 @@ export const useUserInfo = defineStore('userInfo', {
const setDictLangMessageAsync = async (dict: any) => {
dict.langMessage = `message.dictType.${dict.typeCode}_${dict.value}`;
const text = t(dict.langMessage);
dict.label = ((text !== dict.langMessage) && (!text.endsWith(`${dict.typeCode}_${dict.value}`))) ? text : dict.label;
dict.label = text !== dict.langMessage && !text.endsWith(`${dict.typeCode}_${dict.value}`) ? text : dict.label;
};

View File

@ -476,6 +476,25 @@
color: var(--el-color-danger) !important;
}
// 级联选择-点击文本也生效
.el-cascader-panel .el-radio {
width: 100%;
height: 100%;
z-index: 10;
position: absolute;
top: 0px;
right: -8px;
}
.el-cascader-panel .el-checkbox {
width: 100%;
height: 100%;
z-index: 10;
position: absolute;
top: 0px;
right: 0px;
}
$--el-table-text-color: #fb6d49;
// hack列表页