chore: 需要重新加载字典
This commit is contained in:
parent
e6374a6a06
commit
f8e480d724
@ -13,6 +13,8 @@ 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();
|
||||||
@ -115,6 +117,12 @@ export const useAuthStore = defineStore('auth', () => {
|
|||||||
username: user.userName,
|
username: user.userName,
|
||||||
};
|
};
|
||||||
userStore.setUserInfo(userInfo);
|
userStore.setUserInfo(userInfo);
|
||||||
|
/**
|
||||||
|
* 需要重新加载字典
|
||||||
|
* 比如退出登录切换到其他租户
|
||||||
|
*/
|
||||||
|
const dictStore = useDictStore();
|
||||||
|
dictStore.resetCache();
|
||||||
return userInfo;
|
return userInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user