From 037fb36aaf4123ef143ac48038a0b171418a20e5 Mon Sep 17 00:00:00 2001
From: wupengfei <834520024@qq.com>
Date: 星期一, 11 八月 2025 10:00:18 +0800
Subject: [PATCH] Merge branch 'master' of http://120.26.58.240:8888/r/flexJobMiniApp

---
 apps/cMiniApp/src/stores/modules/user.ts |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/apps/cMiniApp/src/stores/modules/user.ts b/apps/cMiniApp/src/stores/modules/user.ts
index 20364b5..d49e137 100644
--- a/apps/cMiniApp/src/stores/modules/user.ts
+++ b/apps/cMiniApp/src/stores/modules/user.ts
@@ -31,7 +31,7 @@
 import { AppLocalConfig } from '@/constants';
 
 interface UserState {
-  userInfo?: Nullable<API.PasswordLoginCommandCallback>;
+  userInfo?: Nullable<API.LoginCommandCallback>;
   token?: Nullable<string>;
   refreshToken?: Nullable<string>;
   userDetail?: Nullable<API.UserInfoV2>;
@@ -114,11 +114,13 @@
     },
 
     // 鐢ㄦ埛鎵嬫満楠岃瘉鐮佺櫥鍏�
-    async loginByUsername(data: API.PhoneMesssageCodeLoginInput) {
-      let res = await accountServices.phoneMesssageCodeLogin(
+    async loginByUsername(data: API.SmsLoginCommand) {
+      let res = await authServices.smsLogin(
         {
           phoneNumber: data.phoneNumber,
-          code: data.code,
+          verifyCode: data.verifyCode,
+          type: AppLocalConfig.userType,
+          clientType: AppLocalConfig.clientType,
         },
         { showLoading: false }
       );
@@ -146,7 +148,7 @@
       return res;
     },
 
-    async loginSuccess(res: API.PasswordLoginCommandCallback) {
+    async loginSuccess(res: API.LoginCommandCallback) {
       try {
         this.setUserInfoAction(res);
         this.setTokenAction(res);
@@ -201,12 +203,12 @@
       } catch (error) {}
     },
 
-    setTokenAction(tokenInfo: API.PasswordLoginCommandCallback) {
+    setTokenAction(tokenInfo: API.LoginCommandCallback) {
       this.token = tokenInfo?.accessToken;
       this.refreshToken = tokenInfo.refreshToken ?? '';
     },
 
-    setUserInfoAction(info: API.PasswordLoginCommandCallback) {
+    setUserInfoAction(info: API.LoginCommandCallback) {
       this.userInfo = info;
       setUserInfo(info);
     },

--
Gitblit v1.9.1