This commit is contained in:
wangweidong 2026-03-10 17:13:04 +08:00
parent 1773086547
commit 618dd563aa
9 changed files with 36 additions and 11 deletions

View File

@ -40,10 +40,11 @@
} }
const go = () => { const go = () => {
if(props.cont=='是否退出登录?'){ if(props.cont=='是否退出登录?'){
uni.clearStorage() // uni.clearStorage()
uni.reLaunch({ wx.exitMiniProgram()
url:'/pages/login/index' // uni.reLaunch({
}) // url:'/pages/login/index'
// })
}else{ }else{
emit('go'); emit('go');
} }

View File

@ -189,7 +189,7 @@
const headImge0 = ref(""); const headImge0 = ref("");
const nameArray0 = ["企业名称", "注册地址", "信用代码", "法人"]; const nameArray0 = ["机构名称", "注册地址", "信用代码", "法人"];
const textArray0 = reactive(["", "", "", "", "", "", ""]); const textArray0 = reactive(["", "", "", "", "", "", ""]);
const nameArray1 = ["机构位置","详细地址","机构负责人", "负责人电话", "房屋性质","建筑面积"]; const nameArray1 = ["机构位置","详细地址","机构负责人", "负责人电话", "房屋性质","建筑面积"];
@ -503,7 +503,7 @@
.shu-img{ .shu-img{
position: absolute; position: absolute;
right: 20rpx; right: 20rpx;
top: 45%; top: 50%;
transform: translateY(-40%); transform: translateY(-40%);
width: 130rpx; width: 130rpx;
height: 114rpx; height: 114rpx;

View File

@ -81,7 +81,7 @@
const show = ref(false); const show = ref(false);
const content = ref(""); const content = ref("");
const nameArray = ["企业名称", "注册地址", "信用代码", "法人"]; const nameArray = ["机构名称", "注册地址", "信用代码", "法人"];
const textArray = reactive(["", "", "", ""]); const textArray = reactive(["", "", "", ""]);
const bottomlist = [{ const bottomlist = [{
text: '拍照', text: '拍照',

View File

@ -400,7 +400,9 @@
show.value = true show.value = true
} }
} }
function isValid18DigitNumber(val) {
return /^(\d{18})$/.test(val);
}
const next = () => { const next = () => {
if (!fontphoto.value) { if (!fontphoto.value) {
uni.showToast({ uni.showToast({
@ -415,6 +417,12 @@
}) })
return return
} }
if(!isValid18DigitNumber(textArray[2])) {
uni.showToast({
title: '身份证号格式错误',
icon: 'none'
})
}
const allNonEmpty = textArray.every(item => { const allNonEmpty = textArray.every(item => {
// item.trim() !== '' // item.trim() !== ''
return item !== ''; return item !== '';

View File

@ -564,6 +564,7 @@
}) })
return return
} }
if (!fontphoto.value) { if (!fontphoto.value) {
uni.showToast({ uni.showToast({
title: '请上传长者身份证人像面', title: '请上传长者身份证人像面',
@ -589,6 +590,12 @@
}) })
return return
} }
if(!isValid18DigitNumber(textArray[2])) {
uni.showToast({
title: '长者身份证号格式错误',
icon: 'none'
})
} return
if (canshow.value) { if (canshow.value) {
if (!form.name) { if (!form.name) {

View File

@ -203,6 +203,9 @@
return `${y}.${m}.${d}`; return `${y}.${m}.${d}`;
}); });
} }
function isValid18DigitNumber(val) {
return /^(\d{18})$/.test(val);
}
function toIsoDate(dateStr) { function toIsoDate(dateStr) {
return dateStr.replace( return dateStr.replace(
@ -412,7 +415,12 @@
if (!uping.value) { if (!uping.value) {
return return
} }
if(!isValid18DigitNumber(textArray[2])) {
uni.showToast({
title: '身份证号格式错误',
icon: 'none'
})
}
if (allNonEmpty) { if (allNonEmpty) {
const range = textArray[7]; const range = textArray[7];
const [start, end] = range.split('-'); const [start, end] = range.split('-');

View File

@ -667,7 +667,7 @@
.shu-img { .shu-img {
position: absolute; position: absolute;
right: 20rpx; right: 20rpx;
top: 45%; top: 40%;
transform: translateY(-40%); transform: translateY(-40%);
width: 130rpx; width: 130rpx;
height: 114rpx; height: 114rpx;

View File

@ -488,7 +488,7 @@
.shu-img { .shu-img {
position: absolute; position: absolute;
right: 20rpx; right: 20rpx;
top: 45%; top: 38%;
transform: translateY(-40%); transform: translateY(-40%);
width: 130rpx; width: 130rpx;
height: 114rpx; height: 114rpx;

View File

@ -142,6 +142,7 @@
background-color: #fff; background-color: #fff;
position: relative; position: relative;
padding: 50rpx; padding: 50rpx;
margin-top: 30rpx;
.white-title { .white-title {
font-size: 32rpx; font-size: 32rpx;