fix sql
This commit is contained in:
@@ -17,6 +17,7 @@ import { useWalletStore } from '@/store/walletStore'
|
||||
import { useSettingsStore } from '@/store/settingsStore'
|
||||
import { setTruth } from '@/app/authBoot'
|
||||
import { completeLoginNavigation } from '@/layouts/composables/useMobileScrollReset'
|
||||
import { normalizeAuthFormFields } from '@/utils/persianDigits'
|
||||
|
||||
export function useLoginForm() {
|
||||
const { time, onFinish, reset } = useCountdownTimer('00:02:00', 'mm:ss')
|
||||
@@ -41,6 +42,7 @@ export function useLoginForm() {
|
||||
async function reSendCode() {
|
||||
userFormState.token = undefined
|
||||
enableSendAgainCode.value = false
|
||||
normalizeAuthFormFields(userFormState)
|
||||
await loginCustomer(userFormState)
|
||||
reset()
|
||||
}
|
||||
@@ -64,10 +66,12 @@ export function useLoginForm() {
|
||||
|
||||
function handleOnChange(value: string) {
|
||||
userFormState.token = value
|
||||
normalizeAuthFormFields(userFormState)
|
||||
}
|
||||
|
||||
async function handleOnComplete(value: string) {
|
||||
userFormState.token = value
|
||||
normalizeAuthFormFields(userFormState)
|
||||
phoneVerification()
|
||||
}
|
||||
|
||||
@@ -103,6 +107,7 @@ export function useLoginForm() {
|
||||
formRef.value?.validateFields().then(async () => {
|
||||
try {
|
||||
loading.value = true
|
||||
normalizeAuthFormFields(userFormState)
|
||||
if (isSMS.value) {
|
||||
if (!stepTwoVerify.value) {
|
||||
userFormState.token = undefined
|
||||
|
||||
@@ -5,6 +5,7 @@ import type { User } from '@/models/login'
|
||||
import { loading, URLUserType } from '@/utils'
|
||||
import { registerCustomer } from '@/api/login'
|
||||
import router from '@/router'
|
||||
import { normalizeAuthFormFields } from '@/utils/persianDigits'
|
||||
|
||||
export function useRegisterForm() {
|
||||
const registeredInfo = ref(false)
|
||||
@@ -31,6 +32,7 @@ export function useRegisterForm() {
|
||||
if (!userFormState.referral_id || userFormState.referral_id === '') {
|
||||
delete userFormState.referral_id
|
||||
}
|
||||
normalizeAuthFormFields(userFormState)
|
||||
await registerCustomer(userFormState)
|
||||
registeredInfo.value = true
|
||||
} catch (e: any) {
|
||||
|
||||
Reference in New Issue
Block a user