修正头像无法显示的问题
This commit is contained in:
parent
70fb2294d0
commit
52c423f6b7
@ -34,6 +34,7 @@ export interface UserVO extends BaseEntity {
|
|||||||
phonenumber: string;
|
phonenumber: string;
|
||||||
gender: string;
|
gender: string;
|
||||||
avatar: string;
|
avatar: string;
|
||||||
|
url: string;
|
||||||
status: string;
|
status: string;
|
||||||
delFlag: string;
|
delFlag: string;
|
||||||
loginIp: string;
|
loginIp: string;
|
||||||
|
@ -36,7 +36,7 @@ export const useUserStore = defineStore('user', () => {
|
|||||||
if (res) {
|
if (res) {
|
||||||
const data = res.data;
|
const data = res.data;
|
||||||
const user = data.user;
|
const user = data.user;
|
||||||
const profile = user.avatar == '' || user.avatar == null ? defAva : user.avatar;
|
const profile = user.url == '' || user.url == null ? defAva : user.url;
|
||||||
|
|
||||||
if (data.roles && data.roles.length > 0) {
|
if (data.roles && data.roles.length > 0) {
|
||||||
// 验证返回的roles是否是一个非空数组
|
// 验证返回的roles是否是一个非空数组
|
||||||
|
Loading…
Reference in New Issue
Block a user