|
@@ -46,18 +46,19 @@
|
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
|
import { shallowRef, defineAsyncComponent, onMounted, computed } from 'vue'
|
|
import { shallowRef, defineAsyncComponent, onMounted, computed } from 'vue'
|
|
|
import { CellGroup, Button, Field, Form, FormInstance, showFailToast, FieldRule, Image } from 'vant'
|
|
import { CellGroup, Button, Field, Form, FormInstance, showFailToast, FieldRule, Image } from 'vant'
|
|
|
-import { fullloading, dialog } from '@/utils/vant';
|
|
|
|
|
-import { getFileUrl } from '@/filters';
|
|
|
|
|
-import { getAQCertificateTypeList } from "@/constants/account";
|
|
|
|
|
|
|
+import { fullloading, dialog } from '@/utils/vant'
|
|
|
|
|
+import { getFileUrl } from '@/filters'
|
|
|
|
|
+import { getAQCertificateTypeList } from "@/constants/account"
|
|
|
import { useRequest } from '@/hooks/request'
|
|
import { useRequest } from '@/hooks/request'
|
|
|
-import { queryUserESignRecord, requestCheckCardNum } from '@/services/api/account';
|
|
|
|
|
-import { adddUserReq } from '@/business/user/account';
|
|
|
|
|
-import { validateRules } from '@/constants/regex';
|
|
|
|
|
|
|
+import { queryUserESignRecord, requestCheckCardNum } from '@/services/api/account'
|
|
|
|
|
+import { adddUserReq } from '@/business/user/account'
|
|
|
|
|
+import { validateRules } from '@/constants/regex'
|
|
|
import { useComponent } from '@/hooks/component'
|
|
import { useComponent } from '@/hooks/component'
|
|
|
import { useUserStore } from '@/stores'
|
|
import { useUserStore } from '@/stores'
|
|
|
|
|
+import { getIdCardAge } from '@/filters'
|
|
|
|
|
+import { useNavigation } from '@mobile/router/navigation'
|
|
|
import AppSelect from '@mobile/components/base/select/index.vue'
|
|
import AppSelect from '@mobile/components/base/select/index.vue'
|
|
|
import AppUploader from '@mobile/components/base/uploader/index.vue'
|
|
import AppUploader from '@mobile/components/base/uploader/index.vue'
|
|
|
-import { useNavigation } from '@mobile/router/navigation'
|
|
|
|
|
|
|
|
|
|
const componentMap = new Map<string, unknown>([
|
|
const componentMap = new Map<string, unknown>([
|
|
|
['certification-next', defineAsyncComponent(() => import('./components/certification-next/Index.vue'))], // 爱签-实名认证第二步
|
|
['certification-next', defineAsyncComponent(() => import('./components/certification-next/Index.vue'))], // 爱签-实名认证第二步
|
|
@@ -122,6 +123,9 @@ const formRules: { [key in keyof Model.AddUserReq]?: FieldRule[] } = {
|
|
|
message: '请输入证件号码',
|
|
message: '请输入证件号码',
|
|
|
validator: (val) => {
|
|
validator: (val) => {
|
|
|
if (validateRules.cardno.validate(val)) {
|
|
if (validateRules.cardno.validate(val)) {
|
|
|
|
|
+ if ((getIdCardAge(val) < 18) || (getIdCardAge(val) > 65)) {
|
|
|
|
|
+ return '开户失败,您的年龄不符合开户要求'
|
|
|
|
|
+ }
|
|
|
return true
|
|
return true
|
|
|
}
|
|
}
|
|
|
return validateRules.cardno.message
|
|
return validateRules.cardno.message
|