修复用户管理无法显示头像问题
(cherry picked commit from <gitee.com//lxy0722/django-vue3-admin/commit/4a01e55143967f0a01d3509804d3ba146724928a>
This commit is contained in:
@@ -2,6 +2,7 @@ import { defineStore } from 'pinia';
|
||||
import { UserInfosStates } from './interface';
|
||||
import { Session } from '/@/utils/storage';
|
||||
import { request } from '../utils/service';
|
||||
import { getBaseURL } from '../utils/baseUrl';
|
||||
/**
|
||||
* 用户信息
|
||||
* @methods setUserInfos 设置用户信息
|
||||
@@ -72,7 +73,7 @@ export const useUserInfo = defineStore('userInfo', {
|
||||
method: 'get',
|
||||
}).then((res:any)=>{
|
||||
this.userInfos.username = res.data.name;
|
||||
this.userInfos.avatar = res.data.avatar;
|
||||
this.userInfos.avatar = getBaseURL(res.data.avatar);
|
||||
this.userInfos.name = res.data.name;
|
||||
this.userInfos.email = res.data.email;
|
||||
this.userInfos.mobile = res.data.mobile;
|
||||
|
||||
Reference in New Issue
Block a user