Handy_Cao 2 年之前
父节点
当前提交
71789f3fe6
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      src/packages/sbyj/views/account/certification/Index.vue

+ 4 - 1
src/packages/sbyj/views/account/certification/Index.vue

@@ -45,7 +45,7 @@
 import { shallowRef, onMounted } from 'vue'
 import { CellGroup, Button, Field, Form, FormInstance, showFailToast, FieldRule, Image } from 'vant'
 import { fullloading, dialog } from '@/utils/vant';
-import { getFileUrl } from '@/filters';
+import { getFileUrl, getIdCardAge } from '@/filters';
 import { getCerTypePersonList } from "@/constants/account";
 import { useRequest } from '@/hooks/request'
 import { queryTencentUsereSignRecords, requestCheckCardNum } from '@/services/api/account';
@@ -106,6 +106,9 @@ const formRules: { [key in keyof Model.AddAuthReq]?: FieldRule[] } = {
             if (validateRules.cardno.validate(val)) {
                 return true
             }
+            if ((getIdCardAge(val) < 18) || (getIdCardAge(val) > 65)) {
+                return '开户失败,您的年龄不符合开户要求'
+            }
             return validateRules.cardno.message
         }
     }],