zhouhao
2022-01-06 ee7ff25d971c37dc5445f31619fd9a56b3bd619a
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,6 +76,9 @@
    },
    returnApp(){
           window.location.href ="https://www.shouxinshibai.com/"    
    },
    refreshBtn(){
    }
  },
  //生命周期 - 创建完成(可以访问当前this实例)