支持外部传递用户信息,避免重复请求

Signed-off-by: 小菜鸟儿 <496651923@qq.com>
This commit is contained in:
小菜鸟儿 2023-06-06 23:27:57 +00:00 committed by Gitee
parent a3f8aac18f
commit 43bf4f7c84
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 6 additions and 2 deletions

View File

@ -219,8 +219,12 @@ onMounted(() => {
initI18nOrSize('globalComponentSize', 'disabledSize');
initI18nOrSize('globalI18n', 'disabledI18n');
}
//
mittBus.on("refreshUserInfo",()=>{
//
mittBus.on("refreshUserInfo",(res?:any)=>{
if(res!=undefined){
state.userInfo=res;
return;
}
stores.getApiUserInfo().then((res:any)=>{
state.userInfo=res;
});