From 16e6e42ca6b0cbb1ef21a046ebf7e8e0c2e00c8e Mon Sep 17 00:00:00 2001 From: zhouhao <787329763@qq.com> Date: Thu, 06 Jan 2022 13:50:14 +0800 Subject: [PATCH] 人脸识别1 --- src/views/main/queryres.vue | 20 +++++++++++++++----- 1 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/views/main/queryres.vue b/src/views/main/queryres.vue index 392f795..f60023d 100644 --- a/src/views/main/queryres.vue +++ b/src/views/main/queryres.vue @@ -1,7 +1,7 @@ <template> <div class='text-main'> - <van-nav-bar title="审核结果" /> + <!-- <van-nav-bar title="审核结果" /> --> <div style=" text-align: center;"> <img height="180" src="../../assets/img/loading.png" v-if="!ResultIs" /> <img height="180" src="../../assets/img/img_fail.png" v-if="ResultIs" /> @@ -10,6 +10,7 @@ <p class="content-text"> {{datastr}}</p> <!-- <p class="content-text" v-if="isActive">{{examineStr}}</p> --> <div class="btn-content"> + <van-button color="#6cc3bb" @click="refreshBtn" round v-if="!ResultIs">刷新</van-button> <van-button color="#E43A28" @click="checkBtn" round v-if="ResultIs">重新校验</van-button> </div> </div> @@ -41,15 +42,20 @@ let objForm ={bizId:this.bizId,bizType:this.bizType} var t2 = window.setInterval(function () { slfe.$api.refreshFaceStatus({objForm}).then(res => { - // window.clearInterval(t2) // 去除定时器 - if(res.body.status==1){ //人脸识别未出结果 + if(res.body.status==1 && Number(this.bizType)==0 || res.body.status==1 && Number(this.bizType)==1 || res.body.status==4 && Number(this.bizType)==1){ //人脸识别未出结果 slfe.$api.getApplyStatus({...objForm,status:res.body.status}).then(res=>{ - if(res.body.faceResult==0){ + if(res.body.faceResult==0 || res.body.faceResult==3){ //人脸识别失败 this.ResultIs =true + window.clearInterval(t2) // 去除定时器 + }else if(res.body.faceResult==1) { //人脸识别成功 + window.clearInterval(t2) // 去除定时器 + this.$router.push({path:'/main/bancardsucces',query:{...objForm}}) + }else if(res.body.faceResult==2){ //人脸识别中 + } }) }else{ - + } }) }, 5000) @@ -70,10 +76,14 @@ }, returnApp(){ window.location.href ="https://www.shouxinshibai.com/" + }, + refreshBtn(){ + } }, //生命周期 - 创建完成(可以访问当前this实例) created() { + this.bankCardNoInit() // if(this.getQueryVariable('orderNo')){ // this.orderNo=this.getQueryVariable('orderNo') // }else{ -- Gitblit v1.8.0