| | |
| | | title="个人实名认证" |
| | | :icon="IconFaren" |
| | | :info="[['身份证照片'], ['手机号码(接收短信验证码进行短信核验)']]" |
| | | @click="goRealName" |
| | | @click="goRealName('realName')" |
| | | ></authenticationHomeItem> |
| | | <authenticationHomeItem |
| | | title="实人认证" |
| | | isJBR |
| | | :icon="IconJBR" |
| | | :info="[['实人扫脸认证']]" |
| | | @click="goFace" |
| | | @click="goFace('face')" |
| | | > |
| | | </authenticationHomeItem> |
| | | </ContentScrollView> |
| | |
| | | name: 'InnerPage', |
| | | }); |
| | | |
| | | function goRealName() { |
| | | Taro.navigateTo({ url: RouterPath.authenticationRealName }); |
| | | function goRealName(type: string) { |
| | | Taro.navigateTo({ url: `${RouterPath.authenticationRealName}?type=${type}` }); |
| | | } |
| | | |
| | | function goFace() { |
| | | Taro.navigateTo({ url: RouterPath.authenticationFace }); |
| | | function goFace(type: string) { |
| | | Taro.navigateTo({ url: `${RouterPath.authenticationRealName}?type=${type}` }); |
| | | } |
| | | </script> |
| | | |
| | |
| | | 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> |
| | | <template v-if="type === 'realName'"> |
| | | <nut-form-item label="手机号:" class="bole-form-item" prop="phoneNumber" required> |
| | | <nut-input |
| | | v-model.trim="form.contactPhone" |
| | | v-model.trim="form.phoneNumber" |
| | | class="nut-input-text bole-input-text" |
| | | placeholder="请填写手机号码" |
| | | type="text" |
| | | > |
| | | <template #right> |
| | | <ProFormCaptcha |
| | | :onGetCaptcha="() => onGetCaptcha(form.contactPhone)" |
| | | :phonePropName="['contactPhone', 'name', 'idNumber']" |
| | | :onGetCaptcha="() => onGetCaptcha(form.phoneNumber)" |
| | | :phonePropName="['phoneNumber', 'name', 'identity']" |
| | | :validateField="formRef?.validate" |
| | | ></ProFormCaptcha> |
| | | </template> |
| | |
| | | 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"> |
| | |
| | | /** 资源控制器 */ |
| | | export enum EnumResourceController { |
| | | /**数据字典 */ |
| | | Dictionary = 0, |
| | | FlexJobServerDictionary = 0, |
| | | /**任务 */ |
| | | Task = 1, |
| | | FlexJobServerTask = 1, |
| | | /**任务人员 */ |
| | | TaskUser = 2, |
| | | FlexJobServerTaskUser = 2, |
| | | /**任务验收 */ |
| | | TaskCheckReceive = 3, |
| | | FlexJobServerTaskCheckReceive = 3, |
| | | /**文件 */ |
| | | CommonServerFileUtils = 4, |
| | | /**文字识别 */ |
| | | FileUtils = 4, |
| | | /**文字识别 */ |
| | | OcrUtils = 5, |
| | | CommonServerOcrUtils = 5, |
| | | /**日志记录 */ |
| | | LogRecords = 6, |
| | | CommonServerLogRecords = 6, |
| | | /**用户认证 */ |
| | | Auth = 7, |
| | | UserServerAuth = 7, |
| | | /**用户菜单 */ |
| | | Menu = 8, |
| | | UserServerMenu = 8, |
| | | /**用户资源 */ |
| | | Resource = 9, |
| | | UserServerResource = 9, |
| | | /**用户角色 */ |
| | | Role = 10, |
| | | UserServerRole = 10, |
| | | /**用户信息 */ |
| | | User = 11, |
| | | UserServerUser = 11, |
| | | /**电子签 */ |
| | | UserServerElectronSign = 12, |
| | | /**用户简历 */ |
| | | UserResume = 12, |
| | | UserServerUserResume = 13, |
| | | /**企业信息 */ |
| | | Enterprise = 13, |
| | | UserServerEnterprise = 14, |
| | | /**灵工信息 */ |
| | | EnterpriseEmployee = 14, |
| | | UserServerEnterpriseEmployee = 15, |
| | | /**电子签 */ |
| | | ElectronSignServerElectronSign = 16, |
| | | } |
| | | |
| | | /** 资源请求方式 */ |
New file |
| | |
| | | /* eslint-disable */ |
| | | // @ts-ignore |
| | | import { request } from '@/utils/request'; |
| | | |
| | | /** 电子签回传 POST /api/user/electronSign/electronSignCallback */ |
| | | export async function electronSignCallback( |
| | | body: API.ElectronSignCallbackCommand, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<boolean>('/api/user/electronSign/electronSignCallback', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 个人人脸实名认证 POST /api/user/electronSign/personalUserFaceReal */ |
| | | export async function personalUserFaceReal( |
| | | body: API.PersonalUserFaceRealCommand, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<string>('/api/user/electronSign/personalUserFaceReal', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 个人三要素实名认证 POST /api/user/electronSign/personalUserIdentity3Real */ |
| | | export async function personalUserIdentity3Real( |
| | | body: API.PersonalUserIdentity3RealCommand, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<string>('/api/user/electronSign/personalUserIdentity3Real', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 发送个人三要素实名短信 POST /api/user/electronSign/sendPersonalUserIdentity3RealSms */ |
| | | export async function sendPersonalUserIdentity3RealSms( |
| | | body: API.SendPersonalUserIdentity3RealSmsCommand, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<string>('/api/user/electronSign/sendPersonalUserIdentity3RealSms', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | |
| | | import * as userResume from './userResume'; |
| | | import * as auth from './auth'; |
| | | import * as taskCheckReceive from './taskCheckReceive'; |
| | | import * as electronSign from './electronSign'; |
| | | import * as taskUser from './taskUser'; |
| | | import * as menu from './menu'; |
| | | import * as logRecords from './logRecords'; |
| | |
| | | userResume, |
| | | auth, |
| | | taskCheckReceive, |
| | | electronSign, |
| | | taskUser, |
| | | menu, |
| | | logRecords, |
| | |
| | | id?: string; |
| | | } |
| | | |
| | | interface ElectronSignCallbackCommand { |
| | | /** 客户Id */ |
| | | customerId?: string; |
| | | /** 方法名称 */ |
| | | action?: string; |
| | | /** 是否成功 */ |
| | | success?: boolean; |
| | | /** 回调码 */ |
| | | code?: string; |
| | | /** 回调消息 */ |
| | | message?: string; |
| | | /** 关联Id */ |
| | | relationId?: string; |
| | | /** 回传数据 */ |
| | | data?: any; |
| | | } |
| | | |
| | | enum EnumBillingMethod { |
| | | /**按月 */ |
| | | Month = 10, |
| | |
| | | |
| | | enum EnumResourceController { |
| | | /**数据字典 */ |
| | | Dictionary = 0, |
| | | FlexJobServerDictionary = 0, |
| | | /**任务 */ |
| | | Task = 1, |
| | | FlexJobServerTask = 1, |
| | | /**任务人员 */ |
| | | TaskUser = 2, |
| | | FlexJobServerTaskUser = 2, |
| | | /**任务验收 */ |
| | | TaskCheckReceive = 3, |
| | | FlexJobServerTaskCheckReceive = 3, |
| | | /**文件 */ |
| | | CommonServerFileUtils = 4, |
| | | /**文字识别 */ |
| | | FileUtils = 4, |
| | | /**文字识别 */ |
| | | OcrUtils = 5, |
| | | CommonServerOcrUtils = 5, |
| | | /**日志记录 */ |
| | | LogRecords = 6, |
| | | CommonServerLogRecords = 6, |
| | | /**用户认证 */ |
| | | Auth = 7, |
| | | UserServerAuth = 7, |
| | | /**用户菜单 */ |
| | | Menu = 8, |
| | | UserServerMenu = 8, |
| | | /**用户资源 */ |
| | | Resource = 9, |
| | | UserServerResource = 9, |
| | | /**用户角色 */ |
| | | Role = 10, |
| | | UserServerRole = 10, |
| | | /**用户信息 */ |
| | | User = 11, |
| | | UserServerUser = 11, |
| | | /**电子签 */ |
| | | UserServerElectronSign = 12, |
| | | /**用户简历 */ |
| | | UserResume = 12, |
| | | UserServerUserResume = 13, |
| | | /**企业信息 */ |
| | | Enterprise = 13, |
| | | UserServerEnterprise = 14, |
| | | /**灵工信息 */ |
| | | EnterpriseEmployee = 14, |
| | | UserServerEnterpriseEmployee = 15, |
| | | /**电子签 */ |
| | | ElectronSignServerElectronSign = 16, |
| | | } |
| | | |
| | | enum EnumResourceMethod { |
| | |
| | | name: string; |
| | | /** 任务单号 */ |
| | | code?: string; |
| | | /** 企业全称 */ |
| | | enterpriseName?: string; |
| | | /** 用户名 */ |
| | | userName?: string; |
| | | billingMethod?: EnumBillingMethod; |
| | | /** 服务费 */ |
| | | serviceFee?: number; |
| | |
| | | clientType?: EnumClientType; |
| | | } |
| | | |
| | | interface PersonalUserFaceRealCommand { |
| | | /** 姓名 */ |
| | | name: string; |
| | | /** 身份证号 */ |
| | | identity: string; |
| | | /** 身份证人像面 */ |
| | | identityImg: string; |
| | | /** 身份证国徽面 */ |
| | | identityBackImg: string; |
| | | } |
| | | |
| | | interface PersonalUserIdentity3RealCommand { |
| | | /** 姓名 */ |
| | | name: string; |
| | | /** 手机号 */ |
| | | phoneNumber: string; |
| | | /** 身份证号 */ |
| | | identity: string; |
| | | /** 身份证人像面 */ |
| | | identityImg: string; |
| | | /** 身份证国徽面 */ |
| | | identityBackImg: string; |
| | | /** 验证码 */ |
| | | verifyCode: string; |
| | | } |
| | | |
| | | interface RegisterPersonalUserCommand { |
| | | /** 手机号码 */ |
| | | phoneNumber: string; |
| | |
| | | phoneNumber: string; |
| | | } |
| | | |
| | | interface SendPersonalUserIdentity3RealSmsCommand { |
| | | /** 姓名 */ |
| | | name: string; |
| | | /** 手机号 */ |
| | | phoneNumber: string; |
| | | /** 身份证号 */ |
| | | identity: string; |
| | | } |
| | | |
| | | interface SetDictionaryDataIsDisabledCommand { |
| | | ids?: string[]; |
| | | /** 是否已禁用 */ |