From 7735c0400e5615f827532d829988c91f2210d9d2 Mon Sep 17 00:00:00 2001
From: zhaoyongnian <541231643@qq.com>
Date: Thu, 21 May 2020 09:14:30 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
subpages/heart/pages/volunteer/volunteer.js | 7 +++++++
subpages/heart/pages/volunteer/volunteer.wxml | 6 +++---
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/subpages/heart/pages/volunteer/volunteer.js b/subpages/heart/pages/volunteer/volunteer.js
index 40fd742..88eb57f 100644
--- a/subpages/heart/pages/volunteer/volunteer.js
+++ b/subpages/heart/pages/volunteer/volunteer.js
@@ -180,10 +180,17 @@ Page({
this.showToast('姓名不能超过20个字')
return false
}
+
if (!this.data.identityNo) {
this.showToast('请输入身份证号')
return false
}
+ var reg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
+ if (reg.test(this.data.identityNo) === false) {
+ this.showToast('请输入正确的身份证号')
+ return false
+ }
+
if (this.data.getMobileType === 'wx') {
if (!this.data.mobile) {
this.showToast('请获取手机号')
diff --git a/subpages/heart/pages/volunteer/volunteer.wxml b/subpages/heart/pages/volunteer/volunteer.wxml
index 52e7cb3..141d8f0 100644
--- a/subpages/heart/pages/volunteer/volunteer.wxml
+++ b/subpages/heart/pages/volunteer/volunteer.wxml
@@ -18,7 +18,7 @@
姓名
-
+
@@ -79,7 +79,7 @@
-
+
@@ -110,7 +110,7 @@
-
+