|
|
|
|
@ -13,6 +13,8 @@ import { defineStore } from 'pinia';
|
|
|
|
|
import { doLogout, getUserInfoApi, loginApi, seeConnectionClose } from '#/api';
|
|
|
|
|
import { $t } from '#/locales';
|
|
|
|
|
|
|
|
|
|
import { useDictStore } from './dict';
|
|
|
|
|
|
|
|
|
|
export const useAuthStore = defineStore('auth', () => {
|
|
|
|
|
const accessStore = useAccessStore();
|
|
|
|
|
const userStore = useUserStore();
|
|
|
|
|
@ -79,6 +81,9 @@ export const useAuthStore = defineStore('auth', () => {
|
|
|
|
|
} catch (error) {
|
|
|
|
|
console.error(error);
|
|
|
|
|
} finally {
|
|
|
|
|
// 需要清除字典缓存
|
|
|
|
|
const dictStore = useDictStore();
|
|
|
|
|
dictStore.resetCache();
|
|
|
|
|
resetAllStores();
|
|
|
|
|
accessStore.setLoginExpired(false);
|
|
|
|
|
|
|
|
|
|
|