diff --git a/src/api/system/user/types.ts b/src/api/system/user/types.ts index 3600eeb8..d97192b4 100644 --- a/src/api/system/user/types.ts +++ b/src/api/system/user/types.ts @@ -8,7 +8,8 @@ export interface UserInfo { userId: string | number; userName: string; nickName?: string; - avatar?: string; + avatar?: string | number; + avatarUrl?: string; deptName?: string; }; roles: string[]; @@ -26,6 +27,7 @@ export interface UserForm { gender?: string; status?: string; remark?: string; + avatar?: string | number; postIds?: Array; roleIds?: Array; } @@ -68,7 +70,8 @@ export interface UserVO extends BaseEntity { email?: string; phoneNumber?: string; gender?: string; - avatar?: string; + avatar?: string | number; + avatarUrl?: string; status?: string; deptName?: string; roles?: RoleVO[]; diff --git a/src/layouts/BasicLayout.tsx b/src/layouts/BasicLayout.tsx index 86f92795..0cfb633c 100644 --- a/src/layouts/BasicLayout.tsx +++ b/src/layouts/BasicLayout.tsx @@ -454,7 +454,7 @@ export default function BasicLayout() { )} subMenuItemRender={(item, _dom) => menuNode(item as RuntimeMenuItem)} avatarProps={{ - src: userInfo?.user.avatar || defaultAvatar, + src: userInfo?.user.avatarUrl || defaultAvatar, title: userInfo?.user.nickName || userInfo?.user.userName, render: (_, dom) => ( diff --git a/src/pages/system/user/profile/index.tsx b/src/pages/system/user/profile/index.tsx index 57962ec5..d48bea94 100644 --- a/src/pages/system/user/profile/index.tsx +++ b/src/pages/system/user/profile/index.tsx @@ -329,7 +329,7 @@ export default function Profile() {
- +