|
|
@@ -2,29 +2,29 @@
|
|
|
<template>
|
|
|
<app-view class="g-form account-certification">
|
|
|
<template #header>
|
|
|
- <app-navbar :title="$t('user.authentication.title')" />
|
|
|
+ <app-navbar :title="t('user.authentication.title')" />
|
|
|
</template>
|
|
|
<Form ref="formRef" class="g-form__container" @submit="onSubmit">
|
|
|
<CellGroup title="信息填写" inset>
|
|
|
- <Field v-model="formData.username" name="username" :label="$t('user.authentication.customername')"
|
|
|
- :placeholder="$t('user.authentication.pleaseentertheusername')" :rules="formRules.username" />
|
|
|
- <Field name="cardtype" :label="$t('user.authentication.cardtype')" :rules="formRules.cardtype" is-link>
|
|
|
+ <Field v-model="formData.username" name="username" :label="t('user.authentication.customername')"
|
|
|
+ :placeholder="t('user.authentication.pleaseentertheusername')" :rules="formRules.username" />
|
|
|
+ <Field name="cardtype" :label="t('user.authentication.cardtype')" :rules="formRules.cardtype" is-link>
|
|
|
<template #input>
|
|
|
<app-select v-model="formData.cardtype"
|
|
|
- :placeholder="$t('user.authentication.pleaseselectthecardtype')"
|
|
|
- :options="cerTypePersonList" @confirm="formRef?.validate('cardtype')" />
|
|
|
+ :placeholder="t('user.authentication.pleaseselectthecardtype')" :options="cerTypePersonList"
|
|
|
+ @confirm="formRef?.validate('cardtype')" />
|
|
|
</template>
|
|
|
</Field>
|
|
|
- <Field v-model="formData.cardnum" name="cardnum" :label="$t('user.authentication.cardnum')"
|
|
|
- :placeholder="$t('user.authentication.pleaseenterthecardnum')" :rules="formRules.cardnum"
|
|
|
+ <Field v-model="formData.cardnum" name="cardnum" :label="t('user.authentication.cardnum')"
|
|
|
+ :placeholder="t('user.authentication.pleaseenterthecardnum')" :rules="formRules.cardnum"
|
|
|
v-if="formData.cardtype !== undefined" />
|
|
|
- <Field name="cardfrontphotourl" :label="$t('user.authentication.cardfrontphoto')"
|
|
|
+ <Field name="cardfrontphotourl" :label="t('user.authentication.cardfrontphoto')"
|
|
|
:rules="formRules.cardfrontphotourl">
|
|
|
<template #input>
|
|
|
<app-uploader @success="b_afterRead" />
|
|
|
</template>
|
|
|
</Field>
|
|
|
- <Field name="cardbackphotourl" v-if="showCardBackPhoto" :label="$t('user.authentication.cardbackphoto')"
|
|
|
+ <Field name="cardbackphotourl" v-if="showCardBackPhoto" :label="t('user.authentication.cardbackphoto')"
|
|
|
:rules="formRules.cardbackphotourl">
|
|
|
<template #input>
|
|
|
<app-uploader @success="f_afterRead" />
|
|
|
@@ -36,13 +36,11 @@
|
|
|
<app-uploader @success="h_afterRead" />
|
|
|
</template>
|
|
|
</Field>
|
|
|
- <Field v-if="modifyremark != ''" v-model="modifyremark" readonly name="modifyremark"
|
|
|
- :label="$t('user.authentication.modifyremark')" />
|
|
|
</CellGroup>
|
|
|
</Form>
|
|
|
<div class="g-form__footer inset">
|
|
|
<Button type="primary" @click="formRef?.submit" round block>
|
|
|
- {{ $t('user.authentication.submit') }}
|
|
|
+ {{ t('user.authentication.submit') }}
|
|
|
</Button>
|
|
|
</div>
|
|
|
</app-view>
|
|
|
@@ -57,12 +55,13 @@ import { getCerTypePersonList } from "@/constants/account"
|
|
|
import { useNavigation } from '@mobile/router/navigation'
|
|
|
import { useRequest } from '@/hooks/request'
|
|
|
import { getWskhOpenAccountConfigs } from '@/services/api/account'
|
|
|
-import { i18n } from '@/stores'
|
|
|
+import { i18n, useUserStore } from '@/stores'
|
|
|
import AppUploader from '@mobile/components/modules/uploader/index.vue'
|
|
|
import AppSelect from '@mobile/components/base/select/index.vue'
|
|
|
|
|
|
+const userStore = useUserStore()
|
|
|
const formRef = shallowRef<FormInstance>()
|
|
|
-const { formData, formSubmit, modifyremark } = addAuthReq()
|
|
|
+const { formData, formSubmit } = addAuthReq()
|
|
|
const { router } = useNavigation()
|
|
|
const { global: { t } } = i18n
|
|
|
|
|
|
@@ -138,9 +137,11 @@ const onSubmit = () => {
|
|
|
formSubmit().then((res) => {
|
|
|
/// 失败
|
|
|
if (res.code.toString() === '0') {
|
|
|
- hideLoading()
|
|
|
- dialog(t("user.authentication.opensuccess")).then(() => {
|
|
|
- router.back()
|
|
|
+ userStore.getUserData().finally(() => {
|
|
|
+ hideLoading()
|
|
|
+ dialog(t("user.authentication.opensuccess")).then(() => {
|
|
|
+ router.back()
|
|
|
+ })
|
|
|
})
|
|
|
} else {
|
|
|
showFailToast(res.message)
|