소스 검색

优化重构userinfo类型文件

yuanmingze 4 달 전
부모
커밋
4f7ffa8c2f
2개의 변경된 파일17개의 추가작업 그리고 32개의 파일을 삭제
  1. 14 32
      src/services/modules/login/userInfo.d.ts
  2. 3 0
      src/stores/modules/user.ts

+ 14 - 32
src/services/modules/login/userInfo.d.ts

@@ -11,7 +11,6 @@ export interface UserInfoResponse {
 }
 
 export interface UserInfoItem {
-  eidResult: EidResult
   deptName: string
   deptId: string
   managementFlag: boolean
@@ -23,9 +22,7 @@ export interface UserInfoItem {
   realname: string
   avatar: string | null
   idCardNumber: string
-  bankName: string
-  bankPhone: string
-  bankCardNumber: string
+
   unpaid: number
   paid: number
   roles: number[]
@@ -34,66 +31,47 @@ export interface UserInfoItem {
   subjectLocationList: string[]
   subjectLocationEid: Record<string, boolean>
 
-  /** 签约/认证记录 */
   certList: CertItem[]
 
-  /** 已签协议(动态 code) */
   signedAgreement: string[]
-
-  /** 是否重新签署 */
   reSignedAgreement: number
-
-  /** 协议签名状态 */
   taxHelperAgreementSignature: number
 
-  /** 是否通过活体 */
-  asignIsLivenessAuth: boolean
-
-  /** 年龄相关 */
   ageLimit: boolean
   ageReminder: boolean
   ageReminderInfo: string | null
 
-  /** 动态子模块 / 菜单 */
   subList: string[]
-
-  /** 动态任务模板 */
   hasTaskTypeTemplate: string[]
 
-  /** 认证相关 */
   certStatus: string | null
   rljCertStatus: string | null
   certRemark: string | null
   certToken: string
 
-  /** 操作状态 */
   waitApprove: string
   onTheWay: string
   jumpFlag: string
 
-  /** 最近密码修改时间 */
   latestChangePwdTime: string
 
-  /** 套餐 */
   packageList: PackageItem[]
-
-  /** 客户成功经理 */
   csm: CsmInfo
 
-  /** eid 是否已存在 */
-  existEidResult: boolean
+  faceAuthStatus: boolean
 
-  /** 临时/扩展字段(保持原样) */
   temp1: string | null
   temp2: string | null
   temp3: string | null
   temp4: string | null
   temp5: string | null
-}
 
-export interface EidResult {
-  idCardFrontUrl: string
-  idCardBackUrl: string
+  /**
+   * 当前返回里没有,可能来自旧接口或其他业务场景
+   */
+  bankName?: string
+  bankPhone?: string
+  bankCardNumber?: string
 }
 
 export interface CertItem {
@@ -103,18 +81,22 @@ export interface CertItem {
   gigType: string
   gigChannel: string
   subjectLocation: string
-  callbackStatus: string
-  certStatus: string
+
+  callbackStatus: string | null
+  certStatus: string | null
   certStatusDisplay: string | null
   certRemark: string | null
+
   userType: string | null
   bankPhone: string | null
   bankCardNumber: string | null
+
   idCardFrontUrl: string | null
   idCardBackUrl: string | null
   certVideo1Url: string | null
   certVideo2Url: string | null
   agreementUrl: string | null
+
   createTime: string
   updateTime: string
   createUser: number

+ 3 - 0
src/stores/modules/user.ts

@@ -89,8 +89,11 @@ export const useUserStore = defineStore('user', {
       }
 
       const userInfoList = userInfoResult.data.userInfo || []
+
       this.userInfoList = userInfoList
 
+      console.log('userInfoList', userInfoList[0])
+
       const index = this.currentUserInfoIndex ?? 0
       const currentUserInfo = userInfoList[index]