From 618dd563aa316cd6684523802bf2f9b09f76f8e4 Mon Sep 17 00:00:00 2001 From: wangweidong <850489345@qq.com> Date: Tue, 10 Mar 2026 17:13:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- compontent/public/exit.vue | 9 +++++---- pages/addjigou/all.vue | 4 ++-- pages/addjigou/card.vue | 2 +- pages/addjigou/name.vue | 10 +++++++++- pages/addoldman/oldIDcard.vue | 7 +++++++ pages/addstaff/IDcard.vue | 10 +++++++++- pages/addstaff/all.vue | 2 +- pages/addsupplier/all.vue | 2 +- pages/oldmanindex/saoyisaothen.vue | 1 + 9 files changed, 36 insertions(+), 11 deletions(-) diff --git a/compontent/public/exit.vue b/compontent/public/exit.vue index 9152b4c..29a4071 100644 --- a/compontent/public/exit.vue +++ b/compontent/public/exit.vue @@ -40,10 +40,11 @@ } const go = () => { if(props.cont=='是否退出登录?'){ - uni.clearStorage() - uni.reLaunch({ - url:'/pages/login/index' - }) + // uni.clearStorage() + wx.exitMiniProgram() + // uni.reLaunch({ + // url:'/pages/login/index' + // }) }else{ emit('go'); } diff --git a/pages/addjigou/all.vue b/pages/addjigou/all.vue index 53e85de..a9a8d1e 100644 --- a/pages/addjigou/all.vue +++ b/pages/addjigou/all.vue @@ -189,7 +189,7 @@ const headImge0 = ref(""); - const nameArray0 = ["企业名称", "注册地址", "信用代码", "法人"]; + const nameArray0 = ["机构名称", "注册地址", "信用代码", "法人"]; const textArray0 = reactive(["", "", "", "", "", "", ""]); const nameArray1 = ["机构位置","详细地址","机构负责人", "负责人电话", "房屋性质","建筑面积"]; @@ -503,7 +503,7 @@ .shu-img{ position: absolute; right: 20rpx; - top: 45%; + top: 50%; transform: translateY(-40%); width: 130rpx; height: 114rpx; diff --git a/pages/addjigou/card.vue b/pages/addjigou/card.vue index 277dae8..d3b9e2a 100644 --- a/pages/addjigou/card.vue +++ b/pages/addjigou/card.vue @@ -81,7 +81,7 @@ const show = ref(false); const content = ref(""); - const nameArray = ["企业名称", "注册地址", "信用代码", "法人"]; + const nameArray = ["机构名称", "注册地址", "信用代码", "法人"]; const textArray = reactive(["", "", "", ""]); const bottomlist = [{ text: '拍照', diff --git a/pages/addjigou/name.vue b/pages/addjigou/name.vue index 49126bc..a2fee26 100644 --- a/pages/addjigou/name.vue +++ b/pages/addjigou/name.vue @@ -400,7 +400,9 @@ show.value = true } } - + function isValid18DigitNumber(val) { + return /^(\d{18})$/.test(val); + } const next = () => { if (!fontphoto.value) { uni.showToast({ @@ -415,6 +417,12 @@ }) return } + if(!isValid18DigitNumber(textArray[2])) { + uni.showToast({ + title: '身份证号格式错误', + icon: 'none' + }) + } const allNonEmpty = textArray.every(item => { // 如果想忽略前后空格,可用 item.trim() !== '' return item !== ''; diff --git a/pages/addoldman/oldIDcard.vue b/pages/addoldman/oldIDcard.vue index 29a9df1..ef7b633 100644 --- a/pages/addoldman/oldIDcard.vue +++ b/pages/addoldman/oldIDcard.vue @@ -564,6 +564,7 @@ }) return } + if (!fontphoto.value) { uni.showToast({ title: '请上传长者身份证人像面', @@ -589,6 +590,12 @@ }) return } + if(!isValid18DigitNumber(textArray[2])) { + uni.showToast({ + title: '长者身份证号格式错误', + icon: 'none' + }) + } return if (canshow.value) { if (!form.name) { diff --git a/pages/addstaff/IDcard.vue b/pages/addstaff/IDcard.vue index ea103d1..9adc49a 100644 --- a/pages/addstaff/IDcard.vue +++ b/pages/addstaff/IDcard.vue @@ -203,6 +203,9 @@ return `${y}.${m}.${d}`; }); } + function isValid18DigitNumber(val) { + return /^(\d{18})$/.test(val); + } function toIsoDate(dateStr) { return dateStr.replace( @@ -412,7 +415,12 @@ if (!uping.value) { return } - + if(!isValid18DigitNumber(textArray[2])) { + uni.showToast({ + title: '身份证号格式错误', + icon: 'none' + }) + } if (allNonEmpty) { const range = textArray[7]; const [start, end] = range.split('-'); diff --git a/pages/addstaff/all.vue b/pages/addstaff/all.vue index 43db20e..360f48e 100644 --- a/pages/addstaff/all.vue +++ b/pages/addstaff/all.vue @@ -667,7 +667,7 @@ .shu-img { position: absolute; right: 20rpx; - top: 45%; + top: 40%; transform: translateY(-40%); width: 130rpx; height: 114rpx; diff --git a/pages/addsupplier/all.vue b/pages/addsupplier/all.vue index f1c6638..9f4da61 100644 --- a/pages/addsupplier/all.vue +++ b/pages/addsupplier/all.vue @@ -488,7 +488,7 @@ .shu-img { position: absolute; right: 20rpx; - top: 45%; + top: 38%; transform: translateY(-40%); width: 130rpx; height: 114rpx; diff --git a/pages/oldmanindex/saoyisaothen.vue b/pages/oldmanindex/saoyisaothen.vue index 39ee94f..801037f 100644 --- a/pages/oldmanindex/saoyisaothen.vue +++ b/pages/oldmanindex/saoyisaothen.vue @@ -142,6 +142,7 @@ background-color: #fff; position: relative; padding: 50rpx; + margin-top: 30rpx; .white-title { font-size: 32rpx;