From 54d9557a893413eb256eb7d454f67393a0620e70 Mon Sep 17 00:00:00 2001 From: Maple <869445424@qq.com> Date: Thu, 31 Jul 2025 15:26:28 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E4=BA=86=E4=B8=AA?= =?UTF-8?q?=E4=BA=BA=E4=B8=AD=E5=BF=83=EF=BC=8C=E5=B0=86=E5=89=8D=E7=AB=AF?= =?UTF-8?q?=E7=9A=84=E5=AD=97=E6=AE=B5=E4=B8=8E=E5=90=8E=E7=AB=AF=E5=AF=B9?= =?UTF-8?q?=E5=BA=94=EF=BC=8C=E7=A1=AE=E4=BF=9D=E6=95=B0=E6=8D=AE=E8=83=BD?= =?UTF-8?q?=E5=A4=9F=E5=AE=8C=E5=85=A8=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/auth/type.ts | 84 ++++++++++++++-------------- src/views/user/profile/BasicInfo.vue | 30 +++++----- 2 files changed, 59 insertions(+), 55 deletions(-) diff --git a/src/apis/auth/type.ts b/src/apis/auth/type.ts index ced4dca..ae4d098 100644 --- a/src/apis/auth/type.ts +++ b/src/apis/auth/type.ts @@ -1,64 +1,64 @@ /** 用户信息响应类型 */ export interface UserInfoResponse { - code: number; - status: number; - success: boolean; - msg: string; + code: number + status: number + success: boolean + msg: string data: { - user: UserDetail; - dept: DeptDetail; - roles: RoleDetail[]; - posts: any[]; - }; + user: UserDetail + dept: DeptDetail + roles: RoleDetail[] + posts: any[] + } } /** 用户详细信息 */ export interface UserDetail { - userId: string; - account: string; - name: string; - status: number; - userCode: string; - userStatus: string; - userType: string; - mobile: string; - createTime: string; - avatar?: string; + userId: string + account: string + name: string + status: number + userCode: string + userStatus: string + userType: string + mobile: string + createTime: string + avatar?: string } /** 部门详细信息 */ export interface DeptDetail { - deptId: string; - deptName: string; - parentId: string; - orderNum: number; - leaderId: string; - status: string; + deptId: string + deptName: string + parentId: string + orderNum: number + leaderId: string + status: string } /** 角色详细信息 */ export interface RoleDetail { - roleId: string; - roleName: string; - roleCode: string | null; - roleKey: string; + roleId: string + roleName: string + roleCode: string | null + roleKey: string } /** 用户类型 - 兼容旧版本 */ export interface UserInfo { - id: string; - username: string; - nickname: string; - gender: 0 | 1 | 2; - email: string; - phone: string; - avatar: string; - pwdResetTime: string; - pwdExpired: boolean; - registrationDate: string; - deptName: string; - roles: string[]; - permissions: string[]; + id: string + username: string + nickname: string + gender: 0 | 1 | 2 + email: string + phone: string + avatar: string + pwdResetTime: string + pwdExpired: boolean + registrationDate: string + deptName: string + roles: string[] + permissions: string[] } /** 路由类型 */ diff --git a/src/views/user/profile/BasicInfo.vue b/src/views/user/profile/BasicInfo.vue index e3d1a90..c88aed1 100644 --- a/src/views/user/profile/BasicInfo.vue +++ b/src/views/user/profile/BasicInfo.vue @@ -17,25 +17,25 @@