From e3ae5da789eb35217a4a377cab0ff3241ceaf72a Mon Sep 17 00:00:00 2001
From: wupengfei <834520024@qq.com>
Date: 星期一, 11 八月 2025 13:42:07 +0800
Subject: [PATCH] feat: 接口对接

---
 apps/cMiniApp/src/stores/modules/user.ts |   30 +++++++++++++++++-------------
 1 files changed, 17 insertions(+), 13 deletions(-)

diff --git a/apps/cMiniApp/src/stores/modules/user.ts b/apps/cMiniApp/src/stores/modules/user.ts
index d49e137..21cf5ab 100644
--- a/apps/cMiniApp/src/stores/modules/user.ts
+++ b/apps/cMiniApp/src/stores/modules/user.ts
@@ -87,6 +87,10 @@
     accountInfo(): Partial<AccountInfo> {
       return getAccountInfoFromAccessToken(this.userInfo?.accessToken);
     },
+
+    userId: (state) => {
+      return state.userInfo?.id ?? '';
+    },
   },
   actions: {
     // 鎵嬫満鍙锋巿鏉僀ode鐧诲綍
@@ -188,19 +192,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 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) {}
     },
 
     setTokenAction(tokenInfo: API.LoginCommandCallback) {

--
Gitblit v1.9.1