From 55c03f35a31979aefd46aead13a145c9b293e6d8 Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期四, 27 三月 2025 17:38:55 +0800
Subject: [PATCH] fix: 四期需求

---
 apps/taro/src/subpackages/login/loginByForm/verificationCodeLoginForm.vue |   43 +++++++++++++++++++++++++++++--------------
 1 files changed, 29 insertions(+), 14 deletions(-)

diff --git a/apps/taro/src/subpackages/login/loginByForm/verificationCodeLoginForm.vue b/apps/taro/src/subpackages/login/loginByForm/verificationCodeLoginForm.vue
index eb62297..431a323 100644
--- a/apps/taro/src/subpackages/login/loginByForm/verificationCodeLoginForm.vue
+++ b/apps/taro/src/subpackages/login/loginByForm/verificationCodeLoginForm.vue
@@ -9,7 +9,7 @@
           type="text"
         />
       </nut-form-item>
-      <nut-form-item label="" class="bole-form-item" prop="verificationCode" required>
+      <!-- <nut-form-item label="" class="bole-form-item" prop="verificationCode" required>
         <nut-input
           v-model.trim="form.verificationCode"
           class="bole-input-text"
@@ -24,7 +24,7 @@
             ></ProFormCaptcha>
           </template>
         </nut-input>
-      </nut-form-item>
+      </nut-form-item> -->
     </nut-form>
     <LargeButton class="login-btn" @click="handleLogin" :loading="form.loading">鐧诲綍</LargeButton>
     <!-- <div class="go-register-btn" @click="goRegister">绔嬪嵆娉ㄥ唽</div> -->
@@ -32,7 +32,7 @@
 </template>
 
 <script setup lang="ts">
-import * as commonServices from '@life-payment/services/api/Common';
+// import * as commonServices from '@life-payment/services/api/Common';
 import { FormRules } from '@nutui/nutui-taro/dist/types/__VUE/form/types';
 import { FormValidator, Message } from '@/utils';
 import { ProFormCaptcha } from 'senin-mini/components';
@@ -40,6 +40,7 @@
 import { useLoginedJump } from '@/hooks';
 import { useUserStore } from '@/stores/modules/user';
 import Taro from '@tarojs/taro';
+import { useLifeRechargeContext } from '@life-payment/core-vue';
 
 defineOptions({
   name: 'verificationCodeLoginForm',
@@ -52,6 +53,7 @@
 const props = withDefaults(defineProps<Props>(), {});
 
 const userStore = useUserStore();
+const { blLifeRecharge } = useLifeRechargeContext();
 
 const { jump } = useLoginedJump();
 
@@ -72,13 +74,13 @@
 });
 
 async function onGetCaptcha() {
-  await commonServices.sendVerificationCode(
-    {
-      phoneNumber: form.phoneNumber,
-      businessType: VerificationCodeBusinessType.LifePayPhoneMesssageCodeLogin,
-    },
-    { showLoading: false }
-  );
+  // await commonServices.sendVerificationCode(
+  //   {
+  //     phoneNumber: form.phoneNumber,
+  //     businessType: VerificationCodeBusinessType.LifePayPhoneMesssageCodeLogin,
+  //   },
+  //   { showLoading: false }
+  // );
 }
 
 async function handleLogin() {
@@ -87,9 +89,22 @@
       const { valid } = await formRef.value.validate();
       if (valid) {
         form.loading = true;
-        await userStore.loginByUsername({
-          phoneNumber: form.phoneNumber,
-          code: form.verificationCode,
+        // await userStore.loginByUsername({
+        //   phoneNumber: form.phoneNumber,
+        //   code: form.verificationCode,
+        // });
+        let res = await blLifeRecharge.login(
+          {
+            phoneNumber: form.phoneNumber,
+            // code: form.verificationCode,
+          },
+          {
+            showLoading: false,
+          }
+        );
+        userStore.loginVirtualSuccess({
+          virtualPhoneNumber: form.phoneNumber,
+          virtualUserId: res.userId,
         });
         jump();
       }
@@ -107,7 +122,7 @@
 }
 
 function goRegister() {
-  Taro.navigateTo({
+  RouteHelper.navigateTo({
     url: RouterPath.registerForm,
   });
 }

--
Gitblit v1.9.1