From 3d420288a6683988f445e653378db27cd80c863e Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期三, 20 八月 2025 11:22:35 +0800
Subject: [PATCH] fix: 实名

---
 apps/cMiniApp/src/stores/modules/user.ts |   37 +++++++++++++++++++------------------
 1 files changed, 19 insertions(+), 18 deletions(-)

diff --git a/apps/cMiniApp/src/stores/modules/user.ts b/apps/cMiniApp/src/stores/modules/user.ts
index c678128..f2c2654 100644
--- a/apps/cMiniApp/src/stores/modules/user.ts
+++ b/apps/cMiniApp/src/stores/modules/user.ts
@@ -31,7 +31,7 @@
   userInfo?: Nullable<API.LoginCommandCallback>;
   token?: Nullable<string>;
   refreshToken?: Nullable<string>;
-  userDetail?: Nullable<API.UserInfoV2>;
+  userDetail?: Nullable<API.GetPersonalLoginInfoQueryResult>;
   firstGetUserDetail?: boolean;
 
   locationCity?: string;
@@ -86,7 +86,7 @@
     },
 
     userId: (state) => {
-      return state.userInfo?.id ?? '';
+      return state.userDetail?.id ?? '';
     },
   },
   actions: {
@@ -136,7 +136,8 @@
       let res = await authServices.passwordLogin(
         {
           userName: params.userName,
-          password: md5Encrypt(params.password),
+          // password: md5Encrypt(params.password),
+          password: params.password,
           type: AppLocalConfig.userType,
           clientType: AppLocalConfig.clientType,
         },
@@ -188,19 +189,19 @@
     },
 
     async getCurrentUserInfo() {
-      // try {
-      //   let res = await userServices.getUserInfo({ showLoading: false });
-      //   if (res) {
-      //     res.frontStatus = getUserCertificationFrontStatusAdapter(
-      //       res.userCertificationStatus,
-      //       res.userCertificationAuditStatus
-      //     );
-      //     res.originalAvatarUrl = res.avatarUrl;
-      //     res.avatarUrl = res.avatarUrl ? setOSSLink(res.avatarUrl) : DefaultAvatar;
-      //     this.setUserDetail(res);
-      //     this.firstGetUserDetail = false;
-      //   }
-      // } catch (error) {}
+      try {
+        let res = await authServices.getPersonalLoginInfo({}, { showLoading: false });
+        if (res) {
+          // res.frontStatus = getUserCertificationFrontStatusAdapter(
+          //   res.userCertificationStatus,
+          //   res.userCertificationAuditStatus
+          // );
+          res.originalAvatar = res.avatar;
+          res.avatar = res.avatar ? setOSSLink(res.avatar) : DefaultAvatar;
+          this.setUserDetail(res);
+          this.firstGetUserDetail = false;
+        }
+      } catch (error) {}
     },
 
     setTokenAction(tokenInfo: API.LoginCommandCallback) {
@@ -216,7 +217,7 @@
       setUserInfo(this.userInfo);
     },
 
-    setUserDetail(detail: API.UserInfoV2) {
+    setUserDetail(detail: API.GetPersonalLoginInfoQueryResult) {
       this.userDetail = detail;
       setUserDetail(detail);
     },
@@ -235,7 +236,7 @@
      */
     logout() {
       this.resetState();
-      myClient.removeQueries();
+      // myClient.removeQueries();
       goAuthorization();
     },
 

--
Gitblit v1.9.1