| | |
| | | type="text" |
| | | /> |
| | | </nut-form-item> |
| | | <nut-form-item label="身份证号:" class="bole-form-item" prop="idNumber" required> |
| | | <nut-form-item label="身份证号:" class="bole-form-item" prop="identity" required> |
| | | <nut-input |
| | | v-model.trim="form.idNumber" |
| | | v-model.trim="form.identity" |
| | | class="nut-input-text bole-input-text" |
| | | placeholder="请填写身份证号码" |
| | | type="text" |
| | | /> |
| | | </nut-form-item> |
| | | <nut-form-item label="手机号:" class="bole-form-item" prop="contactPhone" required> |
| | | <nut-input |
| | | v-model.trim="form.contactPhone" |
| | | class="nut-input-text bole-input-text" |
| | | placeholder="请填写手机号码" |
| | | type="text" |
| | | > |
| | | <template #right> |
| | | <ProFormCaptcha |
| | | :onGetCaptcha="() => onGetCaptcha(form.contactPhone)" |
| | | :phonePropName="['contactPhone', 'name', 'idNumber']" |
| | | :validateField="formRef?.validate" |
| | | ></ProFormCaptcha> |
| | | </template> |
| | | </nut-input> |
| | | </nut-form-item> |
| | | <nut-form-item label="短信验证码:" class="bole-form-item" prop="verificationCode" required> |
| | | <nut-input |
| | | v-model.trim="form.verificationCode" |
| | | class="nut-input-text bole-input-text" |
| | | placeholder="请输入验证码" |
| | | type="number" |
| | | /> |
| | | </nut-form-item> |
| | | <template v-if="type === 'realName'"> |
| | | <nut-form-item label="手机号:" class="bole-form-item" prop="phoneNumber" required> |
| | | <nut-input |
| | | v-model.trim="form.phoneNumber" |
| | | class="nut-input-text bole-input-text" |
| | | placeholder="请填写手机号码" |
| | | type="text" |
| | | > |
| | | <template #right> |
| | | <ProFormCaptcha |
| | | :onGetCaptcha="() => onGetCaptcha(form.phoneNumber)" |
| | | :phonePropName="['phoneNumber', 'name', 'identity']" |
| | | :validateField="formRef?.validate" |
| | | ></ProFormCaptcha> |
| | | </template> |
| | | </nut-input> |
| | | </nut-form-item> |
| | | <nut-form-item label="短信验证码:" class="bole-form-item" prop="verificationCode" required> |
| | | <nut-input |
| | | v-model.trim="form.verificationCode" |
| | | class="nut-input-text bole-input-text" |
| | | placeholder="请输入验证码" |
| | | type="number" |
| | | /> |
| | | </nut-form-item> |
| | | </template> |
| | | </nut-form> |
| | | </ContentScrollView> |
| | | <PageFooter :isOnlyAction="false"> |
| | |
| | | <script setup lang="ts"> |
| | | import { VerificationCodeBusinessType } from '@12333/constants'; |
| | | import { ProFormCaptcha, ProFormItemCell } from 'senin-mini/components'; |
| | | import * as commonServices from '@12333/services/api/Common'; |
| | | import * as electronSignServices from '@12333/services/apiV2/electronSign'; |
| | | import { FileItem } from '@nutui/nutui-taro/dist/types/__VUE/uploader/type'; |
| | | import { Photograph } from '@nutui/icons-vue-taro'; |
| | | import { FormRules } from '@nutui/nutui-taro/dist/types/__VUE/form/types'; |
| | | import { FormValidator } from '@12333/utils'; |
| | | import Taro from '@tarojs/taro'; |
| | | |
| | | defineOptions({ |
| | | name: 'InnerPage', |
| | | }); |
| | | |
| | | const router = Taro.useRouter(); |
| | | const type = router.params?.type ?? ''; |
| | | |
| | | const form = reactive({ |
| | | legalPersonIdFrontImgUrl: [] as FileItem[], |
| | | legalPersonIdBackImgUrl: [] as FileItem[], |
| | | name: '', |
| | | idNumber: '', |
| | | contactPhone: '', |
| | | identity: '', |
| | | phoneNumber: '', |
| | | verificationCode: '', |
| | | }); |
| | | |
| | |
| | | legalPersonIdBackImgUrl: [ |
| | | { required: true, message: '请上传身份证国徽面', validator: FormValidator.validatorArray }, |
| | | ], |
| | | idNumber: [ |
| | | identity: [ |
| | | { required: true, message: '请填写身份证号码' }, |
| | | { message: '请输入正确的身份证号码', validator: FormValidator.validatorIDCard }, |
| | | ], |
| | |
| | | }; |
| | | |
| | | async function onGetCaptcha(phoneNumber: string) { |
| | | await commonServices.sendPhoneCertificationVerificationCode( |
| | | await electronSignServices.sendPersonalUserIdentity3RealSms( |
| | | { |
| | | name: form.name, |
| | | identity: form.idNumber, |
| | | mobile: form.contactPhone, |
| | | businessType: VerificationCodeBusinessType.UserCertificationPhoneCertification, |
| | | identity: form.identity, |
| | | phoneNumber: form.phoneNumber, |
| | | }, |
| | | { showLoading: false } |
| | | ); |
| | |
| | | if (!formRef.value) return; |
| | | formRef.value.validate().then(({ valid, errors }: any) => { |
| | | if (valid) { |
| | | // submit(); |
| | | submit(); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | function submit() { |
| | | if (type === 'realName') { |
| | | personalUserIdentity3Real(); |
| | | } |
| | | if (type === 'face') { |
| | | personalUserFaceReal(); |
| | | } |
| | | } |
| | | |
| | | async function personalUserFaceReal() {} |
| | | async function personalUserIdentity3Real() {} |
| | | </script> |
| | | |
| | | <style lang="scss"> |