From c824e3bcb34f8b6f3c1435ddca91130367dc3729 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期二, 16 一月 2024 10:41:25 +0800
Subject: [PATCH] Mr.Shi
---
h5/pages/userinfo/userinfo.vue | 17 ++++++++++++++---
1 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/h5/pages/userinfo/userinfo.vue b/h5/pages/userinfo/userinfo.vue
index 990034a..53a9211 100644
--- a/h5/pages/userinfo/userinfo.vue
+++ b/h5/pages/userinfo/userinfo.vue
@@ -35,7 +35,7 @@
<view class="cell">
<view class="title1">
<text class="title1_a">浜鸿劯鐓х墖<b>*</b></text>
- <text class="title1_b">1銆佽鎻愪緵浜斿畼娓呮櫚锛屼汉鑴稿眳涓殑姝i潰浜鸿劯鍏�</text>
+ <text class="title1_b">1銆佽鎻愪緵浜斿畼娓呮櫚锛屼汉鑴稿眳涓殑姝i潰浜鸿劯鍏嶅啝鐓х墖锛�</text>
<text class="title1_b">2銆佺収鐗囨棤閫嗗厜銆佹棤PS銆佹棤杩囧害缇庨澶勭悊</text>
</view>
<view class="content">
@@ -105,6 +105,11 @@
title: '鎵嬫満鍙蜂笉鑳戒负绌�',
icon: 'none'
})
+ const regExp = /^1[3456789]\d{9}$/;
+ if (!regExp.test(this.visitorData.phone)) return uni.showToast({
+ title: '鎵嬫満鍙锋牸寮忛敊璇�',
+ icon: 'none'
+ })
if (!String(this.visitorData.idcardType)) return uni.showToast({
title: '璇佷欢绫诲瀷涓嶈兘涓虹┖',
icon: 'none'
@@ -113,13 +118,20 @@
title: '璇佷欢鍙风爜涓嶈兘涓虹┖',
icon: 'none'
})
+ if (this.visitorData.idcardType === 0) {
+ const regex = /^[1-9]\d{5}(19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[1-2]\d|3[0-1])\d{3}[\dxX]$/;
+ if (!regex.test(this.visitorData.idcardNo)) return uni.showToast({
+ title: '璇佷欢鍙风爜鏍煎紡閿欒',
+ icon: 'none'
+ })
+ }
if (!this.visitorData.faceImg) return uni.showToast({
title: '浜鸿劯鐓х墖涓嶈兘涓虹┖',
icon: 'none'
})
if (this.visit === '1') {
if (!this.visitorData.imgurl) return uni.showToast({
- title: '浜鸿劯鐓х墖涓嶈兘涓虹┖',
+ title: '鍋ュ悍璇佷笉鑳戒负绌�',
icon: 'none'
})
}
@@ -134,7 +146,6 @@
label: 'HEALTH_CARD'
}).then(res => {
if (res.code === 200) {
- console.log(res)
this.visit = res.data.code
}
})
--
Gitblit v1.9.3