From cc9f7e7a6281e6dc951bbc26bcbcdec55563c3b4 Mon Sep 17 00:00:00 2001 From: wupengfei <834520024@qq.com> Date: 星期三, 20 八月 2025 10:20:00 +0800 Subject: [PATCH] fix: bug --- apps/cMiniApp/src/subpackages/authentication/authenticationRealName/InnerPage.vue | 87 ++++++++++------- packages/services/apiV2/index.ts | 2 apps/cMiniApp/src/subpackages/authentication/authenticationHome/InnerPage.vue | 12 +- packages/services/apiV2/electronSign.ts | 63 ++++++++++++ packages/services/apiV2/typings.d.ts | 92 +++++++++++++++--- packages/constants/apiEnum.ts | 36 ++++--- 6 files changed, 219 insertions(+), 73 deletions(-) diff --git a/apps/cMiniApp/src/subpackages/authentication/authenticationHome/InnerPage.vue b/apps/cMiniApp/src/subpackages/authentication/authenticationHome/InnerPage.vue index 80d894a..4f8be7b 100644 --- a/apps/cMiniApp/src/subpackages/authentication/authenticationHome/InnerPage.vue +++ b/apps/cMiniApp/src/subpackages/authentication/authenticationHome/InnerPage.vue @@ -5,14 +5,14 @@ title="涓汉瀹炲悕璁よ瘉" :icon="IconFaren" :info="[['韬唤璇佺収鐗�'], ['鎵嬫満鍙风爜(鎺ユ敹鐭俊楠岃瘉鐮佽繘琛岀煭淇℃牳楠�)']]" - @click="goRealName" + @click="goRealName('realName')" ></authenticationHomeItem> <authenticationHomeItem title="瀹炰汉璁よ瘉" isJBR :icon="IconJBR" :info="[['瀹炰汉鎵劯璁よ瘉']]" - @click="goFace" + @click="goFace('face')" > </authenticationHomeItem> </ContentScrollView> @@ -28,12 +28,12 @@ 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> diff --git a/apps/cMiniApp/src/subpackages/authentication/authenticationRealName/InnerPage.vue b/apps/cMiniApp/src/subpackages/authentication/authenticationRealName/InnerPage.vue index 2b4b5d1..2ab5db4 100644 --- a/apps/cMiniApp/src/subpackages/authentication/authenticationRealName/InnerPage.vue +++ b/apps/cMiniApp/src/subpackages/authentication/authenticationRealName/InnerPage.vue @@ -58,38 +58,40 @@ 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"> @@ -102,22 +104,26 @@ <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: '', }); @@ -132,7 +138,7 @@ legalPersonIdBackImgUrl: [ { required: true, message: '璇蜂笂浼犺韩浠借瘉鍥藉窘闈�', validator: FormValidator.validatorArray }, ], - idNumber: [ + identity: [ { required: true, message: '璇峰~鍐欒韩浠借瘉鍙风爜' }, { message: '璇疯緭鍏ユ纭殑韬唤璇佸彿鐮�', validator: FormValidator.validatorIDCard }, ], @@ -144,12 +150,11 @@ }; 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 } ); @@ -168,10 +173,22 @@ 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"> diff --git a/packages/constants/apiEnum.ts b/packages/constants/apiEnum.ts index 3f6b552..bd24f08 100644 --- a/packages/constants/apiEnum.ts +++ b/packages/constants/apiEnum.ts @@ -136,35 +136,39 @@ /** 璧勬簮鎺у埗鍣� */ 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, } /** 璧勬簮璇锋眰鏂瑰紡 */ diff --git a/packages/services/apiV2/electronSign.ts b/packages/services/apiV2/electronSign.ts new file mode 100644 index 0000000..77c1101 --- /dev/null +++ b/packages/services/apiV2/electronSign.ts @@ -0,0 +1,63 @@ +/* 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 || {}), + }); +} diff --git a/packages/services/apiV2/index.ts b/packages/services/apiV2/index.ts index 9639827..39390a8 100644 --- a/packages/services/apiV2/index.ts +++ b/packages/services/apiV2/index.ts @@ -13,6 +13,7 @@ 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'; @@ -29,6 +30,7 @@ userResume, auth, taskCheckReceive, + electronSign, taskUser, menu, logRecords, diff --git a/packages/services/apiV2/typings.d.ts b/packages/services/apiV2/typings.d.ts index 090a520..584f731 100644 --- a/packages/services/apiV2/typings.d.ts +++ b/packages/services/apiV2/typings.d.ts @@ -324,6 +324,23 @@ id?: string; } + interface ElectronSignCallbackCommand { + /** 瀹㈡埛Id */ + customerId?: string; + /** 鏂规硶鍚嶇О */ + action?: string; + /** 鏄惁鎴愬姛 */ + success?: boolean; + /** 鍥炶皟鐮� */ + code?: string; + /** 鍥炶皟娑堟伅 */ + message?: string; + /** 鍏宠仈Id */ + relationId?: string; + /** 鍥炰紶鏁版嵁 */ + data?: any; + } + enum EnumBillingMethod { /**鎸夋湀 */ Month = 10, @@ -444,35 +461,39 @@ 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 { @@ -3049,6 +3070,10 @@ name: string; /** 浠诲姟鍗曞彿 */ code?: string; + /** 浼佷笟鍏ㄧО */ + enterpriseName?: string; + /** 鐢ㄦ埛鍚� */ + userName?: string; billingMethod?: EnumBillingMethod; /** 鏈嶅姟璐� */ serviceFee?: number; @@ -3545,6 +3570,32 @@ 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; @@ -3889,6 +3940,15 @@ phoneNumber: string; } + interface SendPersonalUserIdentity3RealSmsCommand { + /** 濮撳悕 */ + name: string; + /** 鎵嬫満鍙� */ + phoneNumber: string; + /** 韬唤璇佸彿 */ + identity: string; + } + interface SetDictionaryDataIsDisabledCommand { ids?: string[]; /** 鏄惁宸茬鐢� */ -- Gitblit v1.9.1