| | |
| | | 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" |
| | |
| | | ></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> |
| | | <!-- <div class="go-register-btn" @click="goRegister">立即注册</div> --> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | 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', |
| | |
| | | const props = withDefaults(defineProps<Props>(), {}); |
| | | |
| | | const userStore = useUserStore(); |
| | | const { blLifeRecharge } = useLifeRechargeContext(); |
| | | |
| | | const { jump } = useLoginedJump(); |
| | | |
| | |
| | | await commonServices.sendVerificationCode( |
| | | { |
| | | phoneNumber: form.phoneNumber, |
| | | businessType: VerificationCodeBusinessType.PhoneMesssageCodeLogin, |
| | | businessType: VerificationCodeBusinessType.LifePayPhoneMesssageCodeLogin, |
| | | }, |
| | | { showLoading: false } |
| | | ); |
| | |
| | | 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, |
| | | }); |
| | | jump(); |
| | | } |