| | |
| | | import { useUserStore } from '@/stores/modules/user'; |
| | | import Taro from '@tarojs/taro'; |
| | | import * as authServices from '@12333/services/apiV2/auth'; |
| | | import { APP_ENV } from '@/constants'; |
| | | |
| | | defineOptions({ |
| | | name: 'verificationCodeLoginForm', |
| | |
| | | }); |
| | | |
| | | async function onGetCaptcha() { |
| | | await authServices.sendLoginOrRegisterVerifyCode( |
| | | const res = await authServices.sendLoginOrRegisterVerifyCode( |
| | | { |
| | | phoneNumber: form.phoneNumber, |
| | | }, |
| | | { showLoading: false } |
| | | { showLoading: false, getResponse: true } |
| | | ); |
| | | if (res && APP_ENV === 'staging') { |
| | | // @ts-ignore |
| | | form.verificationCode = res?.data?.extras?.code ?? ''; |
| | | } |
| | | } |
| | | |
| | | async function handleLogin() { |