ref : 重构令牌管理逻辑,,统一状态码识别
This commit is contained in:
@@ -4,7 +4,7 @@ import {
|
||||
CACHE_SESSION_CRYPTO_API,
|
||||
} from '@/constants/cache-keys-constants';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { removeToken } from '@/plugins/auth-token';
|
||||
import { delAccessToken, delRefreshToken } 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';
|
||||
@@ -94,7 +94,8 @@ const useAppStore = defineStore('app', {
|
||||
this.bootloader = res.data.bootloader === 'true';
|
||||
// 引导时
|
||||
if (this.bootloader) {
|
||||
removeToken();
|
||||
delAccessToken();
|
||||
delRefreshToken();
|
||||
}
|
||||
this.loginAuth = res.data.loginAuth !== 'false';
|
||||
this.cryptoApi = res.data.cryptoApi !== 'false';
|
||||
|
||||
Reference in New Issue
Block a user