From 8aec9ca60c4771c9a4dfed84e315a59cde3d8763 Mon Sep 17 00:00:00 2001 From: rosehan <151435705@qq.com> Date: Fri, 18 Aug 2023 09:06:28 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=84=E7=BA=A68-17?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sunPackIndex/scenic/subscribe/yuyue/yue_form_js.vue | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/sunPackIndex/scenic/subscribe/yuyue/yue_form_js.vue b/sunPackIndex/scenic/subscribe/yuyue/yue_form_js.vue index d7fa7de..ac0cd59 100644 --- a/sunPackIndex/scenic/subscribe/yuyue/yue_form_js.vue +++ b/sunPackIndex/scenic/subscribe/yuyue/yue_form_js.vue @@ -174,6 +174,9 @@ } //判断最多预约人数 this.dynamicLists.push(newData); + this.$nextTick(() => { + this.$refs.form[this.dynamicLists.length-1].setRules(this.rules); + }); if (this.dynamicLists.length > 4) { this.isAdd = false } @@ -195,15 +198,7 @@ that.dynamicLists.map((item, index) => { that.$refs.form[index].validate().then(res => { - let idreg = - /^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/; - if (!idreg.test(item.idCardNumber)) { - state[index] = '0' - that.dynamicLists[index].idCardState=true - } else { - state[index] = '1' - that.dynamicLists[index].idCardState=false - } + state[index] = '1' }).catch(err => {