From 2b1f5f2c7033eebee97de472b5f6195d95516b80 Mon Sep 17 00:00:00 2001 From: LiuHao <liuhaoai545@gmail.com> Date: 星期五, 27 十二月 2024 11:45:33 +0800 Subject: [PATCH] 优化 主题色在深色模式下显示亮度 --- src/layout/components/Navbar.vue | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index c2ed0b6..6ac2f14 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -98,6 +98,7 @@ import { dynamicClear, dynamicTenant } from '@/api/system/tenant'; import { TenantVO } from '@/api/types'; import notice from './notice/index.vue'; +import router from '@/router'; const appStore = useAppStore(); const userStore = useUserStore(); @@ -142,7 +143,7 @@ /** 绉熸埛鍒楄〃 */ const initTenantList = async () => { - const { data } = await getTenantList(); + const { data } = await getTenantList(true); tenantEnabled.value = data.tenantEnabled === undefined ? true : data.tenantEnabled; if (tenantEnabled.value) { tenantList.value = data.voList; @@ -163,8 +164,14 @@ cancelButtonText: '鍙栨秷', type: 'warning' }); - await userStore.logout(); - location.href = import.meta.env.VITE_APP_CONTEXT_PATH + 'index'; + userStore.logout().then(() => { + router.replace({ + path: '/login', + query: { + redirect: encodeURIComponent(router.currentRoute.value.fullPath || '/') + } + }); + }); }; const emits = defineEmits(['setLayout']); -- Gitblit v1.9.3