This commit is contained in:
parent
99b17c13a6
commit
9bc0f8fb70
|
|
@ -261,11 +261,36 @@
|
||||||
{
|
{
|
||||||
|
|
||||||
let father = JSON.parse(JSON.parse(uploadRes.data).result.data).data.back.data;
|
let father = JSON.parse(JSON.parse(uploadRes.data).result.data).data.back.data;
|
||||||
console.log(father)
|
// console.log(father)
|
||||||
textArray[6] = father.issueAuthority;
|
// textArray[6] = father.issueAuthority;
|
||||||
textArray[7] = father.validPeriod;
|
// textArray[7] = father.validPeriod;
|
||||||
backImge.value = filePath;
|
// backImge.value = filePath;
|
||||||
savephoto(filePath, 1);
|
// 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 {
|
} else {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|
|
||||||
|
|
@ -375,7 +375,6 @@
|
||||||
} else if (JSON.parse(JSON.parse(uploadRes.data).result.data).data.back) {
|
} 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 father = JSON.parse(JSON.parse(uploadRes.data).result.data).data.back.data;
|
||||||
let regex = /[\u4E00-\u9FA5\uF900-\uFA2D]{1,}/;
|
let regex = /[\u4E00-\u9FA5\uF900-\uFA2D]{1,}/;
|
||||||
console.log(regex.test(father.validPeriod))
|
|
||||||
if(!regex.test(father.validPeriod)){
|
if(!regex.test(father.validPeriod)){
|
||||||
textArray[6] = father.issueAuthority;
|
textArray[6] = father.issueAuthority;
|
||||||
textArray[7] = father.validPeriod;
|
textArray[7] = father.validPeriod;
|
||||||
|
|
|
||||||
|
|
@ -252,10 +252,35 @@
|
||||||
savephoto(filePath, 0);
|
savephoto(filePath, 0);
|
||||||
} else if (JSON.parse(JSON.parse(uploadRes.data).result.data).data.back) {
|
} 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 father = JSON.parse(JSON.parse(uploadRes.data).result.data).data.back.data;
|
||||||
textArray[6] = father.issueAuthority;
|
// textArray[6] = father.issueAuthority;
|
||||||
textArray[7] = father.validPeriod;
|
// textArray[7] = father.validPeriod;
|
||||||
backImge.value = filePath;
|
// backImge.value = filePath;
|
||||||
savephoto(filePath, 1);
|
// 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 {
|
} else {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue