diff --git a/pages/addoldman/oldIDcard.vue b/pages/addoldman/oldIDcard.vue index 5b5c63d..cd9d015 100644 --- a/pages/addoldman/oldIDcard.vue +++ b/pages/addoldman/oldIDcard.vue @@ -374,15 +374,19 @@ 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; - console.log(father.validPeriod) + let regex = /^\d{4}.\d{2}.\d{2}$/; + console.log(regex.test(father.validPeriod)) + if(father.validPeriod == "女"){ uni.showToast({ title: '识别失败', icon: 'none', duration: 2000 }) + uping.value = false; return } + textArray[6] = father.issueAuthority; textArray[7] = father.validPeriod; backImge.value = filePath; diff --git a/pages/oldmanindex/account.vue b/pages/oldmanindex/account.vue index 4168ae6..4c053de 100644 --- a/pages/oldmanindex/account.vue +++ b/pages/oldmanindex/account.vue @@ -97,7 +97,8 @@ } from 'vue' import { onLoad, - onShow + onShow, + onHide } from '@dcloudio/uni-app'; import { getOrgNuId, @@ -117,6 +118,25 @@ }) // console.log("?????",item.value) }) + const tother = ref(0) + onShow(()=>{ + if(tother.value == 1){ + uni.navigateBack({delta:2}) + } + }) + onHide(()=>{ + tother.value = 1; + uni.request({ + url: payurl.value+'/api/nuInfo/cancelBind', + method: 'POST', + header: { + 'Content-Type': 'application/json' + }, + data: { + nuId:item.value.nuId + } + }); + }) // 发起支付入口(async) const initiatePayment = async () => { try {