fix: 登出时清空字典会造成bug
This commit is contained in:
parent
335dc0cc11
commit
a0c2cffcab
@ -13,8 +13,6 @@ import { defineStore } from 'pinia';
|
|||||||
import { doLogout, getUserInfoApi, loginApi, seeConnectionClose } from '#/api';
|
import { doLogout, getUserInfoApi, loginApi, seeConnectionClose } from '#/api';
|
||||||
import { $t } from '#/locales';
|
import { $t } from '#/locales';
|
||||||
|
|
||||||
import { useDictStore } from './dict';
|
|
||||||
|
|
||||||
export const useAuthStore = defineStore('auth', () => {
|
export const useAuthStore = defineStore('auth', () => {
|
||||||
const accessStore = useAccessStore();
|
const accessStore = useAccessStore();
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
@ -81,9 +79,6 @@ export const useAuthStore = defineStore('auth', () => {
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
} finally {
|
} finally {
|
||||||
// 需要清除字典缓存
|
|
||||||
const dictStore = useDictStore();
|
|
||||||
dictStore.resetCache();
|
|
||||||
resetAllStores();
|
resetAllStores();
|
||||||
accessStore.setLoginExpired(false);
|
accessStore.setLoginExpired(false);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user