diff --git a/src/utils/validate.js b/src/utils/validate.js index 8af4837..359dbc3 100644 --- a/src/utils/validate.js +++ b/src/utils/validate.js @@ -38,6 +38,7 @@ export function resetForm(refName) { //当type=1时获取出生日期,type=2时获取性别,type=3时获取年龄 export function IdCard(IdCard, type) { //获取出生日期 + if(!IdCard) return; if (type === 1) { return IdCard.substring(6, 10) + "-" + IdCard.substring(10, 12) + "-" + IdCard.substring(12, 14) } diff --git a/src/views/home/components/yjItem.vue b/src/views/home/components/yjItem.vue index f04f8b3..abd495d 100644 --- a/src/views/home/components/yjItem.vue +++ b/src/views/home/components/yjItem.vue @@ -1,7 +1,7 @@