From 805b5025e5378b2d496f639bf8041fdccc982ed3 Mon Sep 17 00:00:00 2001 From: 13176889840 <13176889840@163.com> Date: Fri, 22 Apr 2022 11:15:49 +0800 Subject: [PATCH] dd --- src/views/components/resiForm.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/views/components/resiForm.vue b/src/views/components/resiForm.vue index 1c1c95d7..c84b11a1 100644 --- a/src/views/components/resiForm.vue +++ b/src/views/components/resiForm.vue @@ -492,8 +492,11 @@ export default { if (n.columnName !== 'ID_CARD') return if (!isCard(this.form.ID_CARD)) return const { user } = this.$store.state - const i = user.areaCodePath && user.areaCodePath.length - 1 - const huji = user.areaCodePath[i].length > 6 ? user.areaCodePath[i].substr(0, 6) : user.areaCodePath[i] + let huji = '', i = 0 + if (user.areaCodePath && user.areaCodePath.length > 0) { + i = user.areaCodePath.length - 1 + huji = user.areaCodePath[i].length > 6 ? user.areaCodePath[i].substr(0, 6) : user.areaCodePath[i] + } const _id = this.form.ID_CARD.substr(0, 6) const { sex, birth, age } = computedCard(this.form.ID_CARD) this.form.BIRTHDAY = birth