From 87b9dde5ec7c1c15ab4804543465af716b761381 Mon Sep 17 00:00:00 2001 From: zuohuaijun Date: Mon, 2 Jun 2025 16:10:07 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=98=8E1=E3=80=81=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E9=85=8D=E7=BD=AE=E4=BF=AE=E6=94=B9=E5=90=8E?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=BC=93=E5=AD=98=20=202=E3=80=81=E5=8D=87?= =?UTF-8?q?=E7=BA=A7=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj | 10 +++++----- .../Admin.NET.Core/Service/Tenant/SysTenantService.cs | 5 +---- Web/package.json | 2 +- Web/src/views/login/component/account.vue | 3 +++ Web/src/views/system/infoSetting/index.vue | 5 +++++ 5 files changed, 15 insertions(+), 10 deletions(-) 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;