From efec69eb281911fd3c52554f42b09aedfa86584a Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Wed, 9 Apr 2025 15:16:05 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=8E=BB=E9=99=A4=E5=BC=80=E7=AB=99?= =?UTF-8?q?=E5=BC=95=E5=AF=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.ts | 16 +++++++------- src/store/modules/app.ts | 22 +++++++++---------- .../system/quick-start/components/Done.vue | 2 +- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/router/index.ts b/src/router/index.ts index b16ea27c..35f415c8 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -173,14 +173,14 @@ router.beforeEach(async (to, from, next) => { await appStore.fnSysConf(); } - // 需要系统引导跳转 - if (appStore.bootloader && to.path !== '/quick-start') { - next({ name: 'QuickStart' }); - } - // 不重复引导 - if (!appStore.bootloader && to.path === '/quick-start') { - next({ name: 'Index' }); - } + // // 需要系统引导跳转 + // if (appStore.bootloader && to.path !== '/quick-start') { + // next({ name: 'QuickStart' }); + // } + // // 不重复引导 + // if (!appStore.bootloader && to.path === '/quick-start') { + // next({ name: 'Index' }); + // } let token = getToken(); diff --git a/src/store/modules/app.ts b/src/store/modules/app.ts index b10f77d6..7c337335 100644 --- a/src/store/modules/app.ts +++ b/src/store/modules/app.ts @@ -1,7 +1,7 @@ import { getSysConf } from '@/api'; import { CACHE_LOCAL_I18N, CACHE_SESSION_CRYPTO_API } from '@/constants/cache-keys-constants'; import { RESULT_CODE_SUCCESS } from '@/constants/result-constants'; -import { removeToken } from '@/plugins/auth-token'; +// import { removeToken } from '@/plugins/auth-token'; import { parseUrlPath } from '@/plugins/file-static-url'; import { localGet, localSet } from '@/utils/cache-local-utils'; import { sessionSet } from '@/utils/cache-session-utils'; @@ -18,9 +18,9 @@ type AppStore = { /**服务版本 */ version: string; - buildTime: string; + // buildTime: string; /**系统引导使用 */ - bootloader: boolean; + // bootloader: boolean; // 用户登录认证 loginAuth: boolean; // 用户接口加密 @@ -55,8 +55,8 @@ const useAppStore = defineStore('app', { appVersion: import.meta.env.VITE_APP_VERSION, version: `-`, - buildTime: `-`, - bootloader: false, + // buildTime: `-`, + // bootloader: false, loginAuth: true, cryptoApi: true, serialNum: `-`, @@ -86,12 +86,12 @@ const useAppStore = defineStore('app', { const res = await getSysConf(); if (res.code === RESULT_CODE_SUCCESS && res.data) { this.version = res.data.version; - this.buildTime = res.data.buildTime; - this.bootloader = res.data.bootloader === 'true'; - // 引导时 - if (this.bootloader) { - removeToken(); - } + // this.buildTime = res.data.buildTime; + // this.bootloader = res.data.bootloader === 'true'; + // // 引导时 + // if (this.bootloader) { + // removeToken(); + // } this.loginAuth = res.data.loginAuth !== 'false'; this.cryptoApi = res.data.cryptoApi !== 'false'; sessionSet(CACHE_SESSION_CRYPTO_API, res.data.cryptoApi); diff --git a/src/views/system/quick-start/components/Done.vue b/src/views/system/quick-start/components/Done.vue index f106cbbe..8cfebd98 100644 --- a/src/views/system/quick-start/components/Done.vue +++ b/src/views/system/quick-start/components/Done.vue @@ -57,7 +57,7 @@ function fnGuideDone() { .then(res => { if (res.code === RESULT_CODE_SUCCESS) { removeToken(); - useAppStore().bootloader = false; + // useAppStore().bootloader = false; } }) .finally(() => {