fix: 去除开站引导

This commit is contained in:
TsMask
2025-04-09 15:16:05 +08:00
parent ccfee93a91
commit efec69eb28
3 changed files with 20 additions and 20 deletions

View File

@@ -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);