diff --git a/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj b/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj index 06abb355..9b072740 100644 --- a/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj +++ b/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj @@ -28,9 +28,9 @@ - - - + + + @@ -44,7 +44,7 @@ - + @@ -56,7 +56,7 @@ - + diff --git a/Admin.NET/Admin.NET.Core/Service/Tenant/SysTenantService.cs b/Admin.NET/Admin.NET.Core/Service/Tenant/SysTenantService.cs index 6c1cdb3d..f43384f4 100644 --- a/Admin.NET/Admin.NET.Core/Service/Tenant/SysTenantService.cs +++ b/Admin.NET/Admin.NET.Core/Service/Tenant/SysTenantService.cs @@ -691,10 +691,7 @@ public class SysTenantService : IDynamicApiController, ITransient }).ExecuteCommandAsync(); // 更新租户缓存 - var tenantList = _sysCacheService.Get>(CacheConst.KeyTenant); - var tmpTenant = tenantList.FirstOrDefault(u => u.Id == tenant.Id); - tmpTenant = tenant; - _sysCacheService.Set(CacheConst.KeyTenant, tenantList); + await CacheTenant(); } /// diff --git a/Web/package.json b/Web/package.json index d319e2cb..2b9ab921 100644 --- a/Web/package.json +++ b/Web/package.json @@ -2,7 +2,7 @@ "name": "admin.net.pro", "type": "module", "version": "2.4.33", - "lastBuildTime": "2025.05.31", + "lastBuildTime": "2025.06.02", "description": "Admin.NET 站在巨人肩膀上的 .NET 通用权限开发框架", "author": "zuohuaijun", "license": "MIT", diff --git a/Web/src/views/login/component/account.vue b/Web/src/views/login/component/account.vue index 2921250e..f745596b 100644 --- a/Web/src/views/login/component/account.vue +++ b/Web/src/views/login/component/account.vue @@ -166,6 +166,9 @@ onMounted(async () => { // window.location.reload(); // } + // 若配置为空则刷新页面 + if (themeConfig.value.captcha == undefined) window.location.reload(); + // 获取登录配置 state.secondVerEnabled = themeConfig.value.secondVer ?? false; state.captchaEnabled = themeConfig.value.captcha ?? true; diff --git a/Web/src/views/system/infoSetting/index.vue b/Web/src/views/system/infoSetting/index.vue index caf9c9b7..36c0f57e 100644 --- a/Web/src/views/system/infoSetting/index.vue +++ b/Web/src/views/system/infoSetting/index.vue @@ -193,6 +193,7 @@ import { nextTick, onMounted, reactive, ref } from 'vue'; import { ElMessage, ElMessageBox, UploadInstance } from 'element-plus'; import { fileToBase64 } from '/@/utils/base64Conver'; +import { Local, Session } from '/@/utils/storage'; import chineseColors from '/@/layout/navBars/topBar/colors.json'; import { getAPI } from '/@/utils/axios-utils'; @@ -237,6 +238,10 @@ const saveSysInfo = async () => { await getAPI(SysTenantApi).apiSysTenantSaveSysInfoPost(state.sysInfo); state.logoFile = undefined; ElMessage.success('保存成功'); + + // 清理浏览器缓存 + Local.clear(); + Session.clear(); } finally { nextTick(() => { state.isLoading = false;