From 64ddedba86d07b1979c5582bbd6ca152016de294 Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期三, 31 十二月 2025 11:04:14 +0800
Subject: [PATCH] fix: bug

---
 apps/housekeepingMiniApp/src/stores/modules/user.ts |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/apps/housekeepingMiniApp/src/stores/modules/user.ts b/apps/housekeepingMiniApp/src/stores/modules/user.ts
index cf8e0bf..dafe7d2 100644
--- a/apps/housekeepingMiniApp/src/stores/modules/user.ts
+++ b/apps/housekeepingMiniApp/src/stores/modules/user.ts
@@ -31,7 +31,7 @@
   userInfo?: Nullable<API.LoginCommandCallback>;
   token?: Nullable<string>;
   refreshToken?: Nullable<string>;
-  userDetail?: Nullable<API.GetPersonalLoginInfoQueryResult>;
+  userDetail?: Nullable<API.GetEnterpriseLoginInfoQueryResult>;
   firstGetUserDetail?: boolean;
   firstLaunch?: boolean;
 
@@ -107,8 +107,8 @@
             accessToken: wxMiniAppUserLoginRes.accessToken,
           });
           res.accessToken = bindRes.accessToken;
-          this.loginSuccess(res);
         }
+        this.loginSuccess(res);
         return res;
       } catch (error) {
         console.log('error3: ', error);
@@ -142,6 +142,7 @@
           password: params.password,
           type: AppLocalConfig.userType,
           clientType: AppLocalConfig.clientType,
+          enterpriseType: AppLocalConfig.enterpriseType,
         },
         { showLoading: false }
       );
@@ -192,7 +193,7 @@
 
     async getCurrentUserInfo() {
       try {
-        let res = await authServices.getPersonalLoginInfo({}, { showLoading: false });
+        let res = await authServices.getEnterpriseLoginInfo({}, { showLoading: false });
         if (res) {
           // res.frontStatus = getUserCertificationFrontStatusAdapter(
           //   res.userCertificationStatus,
@@ -212,6 +213,7 @@
     },
 
     setUserInfoAction(info: API.LoginCommandCallback) {
+      console.log('info: ', info);
       this.userInfo = {
         ...this.userInfo,
         ...info,
@@ -219,7 +221,7 @@
       setUserInfo(this.userInfo);
     },
 
-    setUserDetail(detail: API.GetPersonalLoginInfoQueryResult) {
+    setUserDetail(detail: API.GetEnterpriseLoginInfoQueryResult) {
       this.userDetail = detail;
       setUserDetail(detail);
     },

--
Gitblit v1.10.0