|  |  |  | 
|---|
|  |  |  | <template> | 
|---|
|  |  |  | <ContentScrollView :paddingH="false"> | 
|---|
|  |  |  | <nut-form :model-value="form" ref="formRef" :rules="rules"> | 
|---|
|  |  |  | <!-- <nut-form :model-value="form" ref="formRef" :rules="rules"> | 
|---|
|  |  |  | <nut-form-item label="营业执照:" class="bole-form-item alignTop" prop="licenseUrl" required> | 
|---|
|  |  |  | <Uploader | 
|---|
|  |  |  | v-model:file-list="form.licenseUrl" | 
|---|
|  |  |  | 
|---|
|  |  |  | type="number" | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | </nut-form-item> | 
|---|
|  |  |  | </nut-form> | 
|---|
|  |  |  | </nut-form> --> | 
|---|
|  |  |  | </ContentScrollView> | 
|---|
|  |  |  | <PageFooter :isOnlyAction="false"> | 
|---|
|  |  |  | <PageFooterBtn type="primary" @click="handleSubmit()" :loading="loading" | 
|---|
|  |  |  | <!-- <PageFooterBtn type="primary" @click="handleSubmit()" :loading="loading" | 
|---|
|  |  |  | >提交认证</PageFooterBtn | 
|---|
|  |  |  | > | 
|---|
|  |  |  | > --> | 
|---|
|  |  |  | </PageFooter> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <script setup lang="ts"> | 
|---|
|  |  |  | import { useAuthenticationFlow } from '../hooks'; | 
|---|
|  |  |  | // import { useAuthenticationFlow } from '../hooks'; | 
|---|
|  |  |  | import { | 
|---|
|  |  |  | UserCertificationModeEnumV2, | 
|---|
|  |  |  | VerificationCodeBusinessType, | 
|---|
|  |  |  | 
|---|
|  |  |  | name: 'InnerPage', | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const { form, rules, formRef, handleSubmit, loading } = useAuthenticationFlow({ | 
|---|
|  |  |  | certificationMode: UserCertificationModeEnumV2.LegalPersonPhoneCertification, | 
|---|
|  |  |  | certificationElement: UserCertificationElementEnum.Identity4, | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | // const { form, rules, formRef, handleSubmit, loading } = useAuthenticationFlow({ | 
|---|
|  |  |  | //   certificationMode: UserCertificationModeEnumV2.LegalPersonPhoneCertification, | 
|---|
|  |  |  | //   certificationElement: UserCertificationElementEnum.Identity4, | 
|---|
|  |  |  | // }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | async function onGetCaptcha(phoneNumber: string) { | 
|---|
|  |  |  | await commonServices.sendPhoneCertificationVerificationCode( | 
|---|
|  |  |  | { | 
|---|
|  |  |  | name: form.legalPersonName, | 
|---|
|  |  |  | identity: form.legalPersonIdNumber, | 
|---|
|  |  |  | mobile: form.legalPersonContactPhone, | 
|---|
|  |  |  | businessType: VerificationCodeBusinessType.UserCertificationPhoneCertification, | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { showLoading: false } | 
|---|
|  |  |  | ); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | // async function onGetCaptcha(phoneNumber: string) { | 
|---|
|  |  |  | //   await commonServices.sendPhoneCertificationVerificationCode( | 
|---|
|  |  |  | //     { | 
|---|
|  |  |  | //       name: form.legalPersonName, | 
|---|
|  |  |  | //       identity: form.legalPersonIdNumber, | 
|---|
|  |  |  | //       mobile: form.legalPersonContactPhone, | 
|---|
|  |  |  | //       businessType: VerificationCodeBusinessType.UserCertificationPhoneCertification, | 
|---|
|  |  |  | //     }, | 
|---|
|  |  |  | //     { showLoading: false } | 
|---|
|  |  |  | //   ); | 
|---|
|  |  |  | // } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const handleLicenseUrlChange = (response: FileItem) => { | 
|---|
|  |  |  | vatLicense(response, { | 
|---|
|  |  |  | onSuccess(res) { | 
|---|
|  |  |  | let tips: string[] = []; | 
|---|
|  |  |  | res?.name ? (form.enterpriseName = res.name) : tips.push('企业名称'); | 
|---|
|  |  |  | res?.societyCode ? (form.societyCreditCode = res.societyCode) : tips.push('统一社会信用代码'); | 
|---|
|  |  |  | if (tips.length > 0) { | 
|---|
|  |  |  | Message.error(`未能识别到您上传的图片,请重新上传清晰的图片或手动输入${tips.join('和')}`); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | }; | 
|---|
|  |  |  | // const handleLicenseUrlChange = (response: FileItem) => { | 
|---|
|  |  |  | //   vatLicense(response, { | 
|---|
|  |  |  | //     onSuccess(res) { | 
|---|
|  |  |  | //       let tips: string[] = []; | 
|---|
|  |  |  | //       res?.name ? (form.enterpriseName = res.name) : tips.push('企业名称'); | 
|---|
|  |  |  | //       res?.societyCode ? (form.societyCreditCode = res.societyCode) : tips.push('统一社会信用代码'); | 
|---|
|  |  |  | //       if (tips.length > 0) { | 
|---|
|  |  |  | //         Message.error(`未能识别到您上传的图片,请重新上传清晰的图片或手动输入${tips.join('和')}`); | 
|---|
|  |  |  | //       } | 
|---|
|  |  |  | //     }, | 
|---|
|  |  |  | //   }); | 
|---|
|  |  |  | // }; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | function handleFrontImgUrlChange(response: FileItem) { | 
|---|
|  |  |  | // userCredentialVerifyOcrIDCard(response, { | 
|---|