This commit is contained in:
wangweidong 2026-03-05 15:26:40 +08:00
parent 99b17c13a6
commit 9bc0f8fb70
3 changed files with 59 additions and 10 deletions

View File

@ -261,11 +261,36 @@
{
let father = JSON.parse(JSON.parse(uploadRes.data).result.data).data.back.data;
console.log(father)
// console.log(father)
// textArray[6] = father.issueAuthority;
// textArray[7] = father.validPeriod;
// backImge.value = filePath;
// savephoto(filePath, 1);
let regex = /[\u4E00-\u9FA5\uF900-\uFA2D]{1,}/;
console.log(regex.test(father.validPeriod))
if(!regex.test(father.validPeriod)){
textArray[6] = father.issueAuthority;
textArray[7] = father.validPeriod;
backImge.value = filePath;
savephoto(filePath, 1);
}else{
if(father.validPeriod.indexOf('长期')>-1){
textArray[6] = father.issueAuthority;
textArray[7] = father.validPeriod;
backImge.value = filePath;
savephoto(filePath, 1);
}else{
textArray[7] = "";
uni.showToast({
title: '识别失败',
icon: 'none',
duration: 2000
})
}
uping.value = true;
return
}
uni.hideLoading()
} else {
uni.hideLoading()
uni.showToast({

View File

@ -375,7 +375,6 @@
} else if (JSON.parse(JSON.parse(uploadRes.data).result.data).data.back) {
let father = JSON.parse(JSON.parse(uploadRes.data).result.data).data.back.data;
let regex = /[\u4E00-\u9FA5\uF900-\uFA2D]{1,}/;
console.log(regex.test(father.validPeriod))
if(!regex.test(father.validPeriod)){
textArray[6] = father.issueAuthority;
textArray[7] = father.validPeriod;

View File

@ -252,10 +252,35 @@
savephoto(filePath, 0);
} else if (JSON.parse(JSON.parse(uploadRes.data).result.data).data.back) {
let father = JSON.parse(JSON.parse(uploadRes.data).result.data).data.back.data;
// textArray[6] = father.issueAuthority;
// textArray[7] = father.validPeriod;
// backImge.value = filePath;
// savephoto(filePath, 1);
let regex = /[\u4E00-\u9FA5\uF900-\uFA2D]{1,}/;
if(!regex.test(father.validPeriod)){
textArray[6] = father.issueAuthority;
textArray[7] = father.validPeriod;
backImge.value = filePath;
savephoto(filePath, 1);
}else{
if(father.validPeriod.indexOf('长期')>-1){
textArray[6] = father.issueAuthority;
textArray[7] = father.validPeriod;
backImge.value = filePath;
savephoto(filePath, 1);
}else{
textArray[7] = "";
uni.showToast({
title: '识别失败',
icon: 'none',
duration: 2000
})
}
uping.value = true;
return
}
uni.hideLoading()
} else {
uni.hideLoading()
uni.showToast({