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> 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> apps/cMiniApp/src/subpackages/authentication/authenticationRealName/InnerPage.vue
@@ -58,25 +58,26 @@ 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> @@ -90,6 +91,7 @@ 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"> 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年M月" :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年M月'), }); function goIncomeDetailInfo() { 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,