|
@@ -67,7 +67,9 @@
|
|
|
</Form>
|
|
</Form>
|
|
|
<template #footer>
|
|
<template #footer>
|
|
|
<div class="g-form__footer inset">
|
|
<div class="g-form__footer inset">
|
|
|
- <Button type="danger" @click="formRef?.submit" :round="insetStyle" block>{{ $t('user.register.freeregister') }}</Button>
|
|
|
|
|
|
|
+ <Button type="danger" @click="formRef?.submit" :round="insetStyle" block>
|
|
|
|
|
+ {{ $t('user.register.freeregister') }}
|
|
|
|
|
+ </Button>
|
|
|
</div>
|
|
</div>
|
|
|
<app-reward :show="showReward" :value="redEnvelope" :title="$t('user.register.registersuccess')"
|
|
<app-reward :show="showReward" :value="redEnvelope" :title="$t('user.register.registersuccess')"
|
|
|
@click="router.back()" />
|
|
@click="router.back()" />
|
|
@@ -83,7 +85,7 @@ import { fullloading, dialog } from '@/utils/vant'
|
|
|
import { validateRules } from '@/constants/regex'
|
|
import { validateRules } from '@/constants/regex'
|
|
|
import { useNavigation } from '@mobile/router/navigation'
|
|
import { useNavigation } from '@mobile/router/navigation'
|
|
|
import { userRegister, sendRegisterVerifyCode, queryMyRegisterMoney } from '@/services/api/common'
|
|
import { userRegister, sendRegisterVerifyCode, queryMyRegisterMoney } from '@/services/api/common'
|
|
|
-import { i18n, useGlobalStore, useUserStore } from '@/stores'
|
|
|
|
|
|
|
+import { i18n, useGlobalStore, useUserStore, useErrorInfoStore } from '@/stores'
|
|
|
import { getCountryCodeList } from '@/constants/unit'
|
|
import { getCountryCodeList } from '@/constants/unit'
|
|
|
import cryptojs from 'crypto-js'
|
|
import cryptojs from 'crypto-js'
|
|
|
import plus from '@/utils/h5plus'
|
|
import plus from '@/utils/h5plus'
|
|
@@ -121,6 +123,7 @@ const onConfirm = ({ selectedValues: [value] }: PickerConfirmEventParams) => {
|
|
|
|
|
|
|
|
const { router, routerTo } = useNavigation()
|
|
const { router, routerTo } = useNavigation()
|
|
|
const globalStore = useGlobalStore()
|
|
const globalStore = useGlobalStore()
|
|
|
|
|
+const errorInfoStore = useErrorInfoStore()
|
|
|
const registrationCodeRule = globalStore.getSystemInfo('registrationCodeRule')
|
|
const registrationCodeRule = globalStore.getSystemInfo('registrationCodeRule')
|
|
|
const formRef = ref<FormInstance>()
|
|
const formRef = ref<FormInstance>()
|
|
|
const checked = ref(false) // 是否同意注册条款
|
|
const checked = ref(false) // 是否同意注册条款
|
|
@@ -300,7 +303,8 @@ const formSubmit = () => {
|
|
|
showSuccessToast('您的注册申请已提交!')
|
|
showSuccessToast('您的注册申请已提交!')
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
- showFailToast(res.message)
|
|
|
|
|
|
|
+ const msg = errorInfoStore.getErrorInfoByCode(res.message)
|
|
|
|
|
+ showFailToast(msg ?? res.message)
|
|
|
}
|
|
}
|
|
|
}).catch((err) => {
|
|
}).catch((err) => {
|
|
|
showFailToast(err)
|
|
showFailToast(err)
|