From 256ad5baf5b1b79f91660585abae1671a5aade53 Mon Sep 17 00:00:00 2001 From: zhengyiming <540361168@qq.com> Date: 星期三, 20 八月 2025 10:22:10 +0800 Subject: [PATCH] Merge branch 'master' of http://120.26.58.240:8888/r/flexJobMiniApp --- apps/cMiniApp/src/subpackages/authentication/authenticationRealName/InnerPage.vue | 87 +++++++++++++++++----------- packages/components/src/Input/ChooseInputWithDatePicker.vue | 7 + apps/cMiniApp/src/subpackages/authentication/authenticationHome/InnerPage.vue | 12 ++-- apps/cMiniApp/src/subpackages/authentication/authenticationHome/authenticationHome.vue | 2 apps/cMiniApp/src/subpackages/wallet/incomeDetail/InnerPage.vue | 15 +++- 5 files changed, 74 insertions(+), 49 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/authenticationHome/authenticationHome.vue b/apps/cMiniApp/src/subpackages/authentication/authenticationHome/authenticationHome.vue index d27e9b9..ac39fb5 100644 --- a/apps/cMiniApp/src/subpackages/authentication/authenticationHome/authenticationHome.vue +++ b/apps/cMiniApp/src/subpackages/authentication/authenticationHome/authenticationHome.vue @@ -1,5 +1,5 @@ <template> - <PageLayout class="authenticationHome-page-wrapper" developing> + <PageLayout class="authenticationHome-page-wrapper"> <template #navigationBar> <TransparentNavigationBar title="瀹炲悕璁よ瘉" :is-absolute="false"></TransparentNavigationBar> </template> 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/apps/cMiniApp/src/subpackages/wallet/incomeDetail/InnerPage.vue b/apps/cMiniApp/src/subpackages/wallet/incomeDetail/InnerPage.vue index 1c4f0c5..b33d8d1 100644 --- a/apps/cMiniApp/src/subpackages/wallet/incomeDetail/InnerPage.vue +++ b/apps/cMiniApp/src/subpackages/wallet/incomeDetail/InnerPage.vue @@ -3,7 +3,12 @@ <IncomeDetailListItem :item="'鏀跺叆:锟�600.00'"> <template #title> <div class="income-detail-time-picker"> - <ChooseInputWithPicker v-model="form.month" :value-enum="TaskStatusText" /> + <ChooseInputWithDatePicker + v-model="form.month" + type="year-month" + format="YYYY骞碝鏈�" + :max-date="nowDate" + /> </div> </template> </IncomeDetailListItem> @@ -18,19 +23,19 @@ </template> <script setup lang="ts"> -import { List, IncomeDetailListItem, ChooseInputWithPicker } from '@12333/components'; -import { TaskStatusText, TaskStatus } from '@/constants'; +import { List, IncomeDetailListItem, ChooseInputWithDatePicker } from '@12333/components'; import { useUserStore } from '@/stores/modules/user'; import Taro from '@tarojs/taro'; +import dayjs from 'dayjs'; defineOptions({ name: 'InnerPage', }); const userStore = useUserStore(); - +const nowDate = dayjs().toDate(); const form = reactive({ - month: TaskStatus.All, + month: dayjs().format('YYYY骞碝鏈�'), }); function goIncomeDetailInfo() { diff --git a/packages/components/src/Input/ChooseInputWithDatePicker.vue b/packages/components/src/Input/ChooseInputWithDatePicker.vue index ca4897c..a2d8450 100644 --- a/packages/components/src/Input/ChooseInputWithDatePicker.vue +++ b/packages/components/src/Input/ChooseInputWithDatePicker.vue @@ -18,9 +18,12 @@ minDate?: Date; maxDate?: Date; type?: string; + format?: string; }; -const props = withDefaults(defineProps<Props>(), {}); +const props = withDefaults(defineProps<Props>(), { + format: 'YYYY-MM-DD', +}); const emit = defineEmits<{ (e: 'update:modelValue', val: string | number): void; @@ -49,7 +52,7 @@ type: props.type, maxDate: props.maxDate, onConfirm: ({ selectedValue }) => { - emit('update:modelValue', dayjs(selectedValue.join('-')).format('YYYY-MM-DD')); + emit('update:modelValue', dayjs(selectedValue.join('-')).format(props.format)); onClose(); }, minDate: props.minDate, -- Gitblit v1.9.1