From df10c284c1978d3d7e20ef80ba584ad94adc1e87 Mon Sep 17 00:00:00 2001 From: liuye Date: Tue, 29 Nov 2022 14:19:19 +0800 Subject: [PATCH] =?UTF-8?q?=E9=AA=8C=E8=AF=81=E6=89=8B=E6=9C=BA=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/project/pingchang/AppCommunityManagement/Edit.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/project/pingchang/AppCommunityManagement/Edit.vue b/src/project/pingchang/AppCommunityManagement/Edit.vue index d6bf1917..f01772da 100644 --- a/src/project/pingchang/AppCommunityManagement/Edit.vue +++ b/src/project/pingchang/AppCommunityManagement/Edit.vue @@ -213,6 +213,10 @@ export default { if (!this.form.phone && this.fromType != 1) { return this.$u.toast('请输入手机号码') } + let regTel = /^1(3\d|4[5-9]|5[0-35-9]|6[567]|7[0-8]|8\d|9[0-35-9])\d{8}$/ + if (this.form.phone.length == 11 && !regTel.test(this.form.phone) && this.fromType != 1) { + return this.$u.toast('请输入正确的手机号') + } if(!this.form.startTime) { return this.$u.toast('请选择出发时间') }