zhouhao
2022-01-06 ee7ff25d971c37dc5445f31619fd9a56b3bd619a
人脸识别
3 files modified
41 ■■■■ changed files
src/views/main/addBankcard.vue 10 ●●●● patch | view | raw | blame | history
src/views/main/queryres.vue 19 ●●●● patch | view | raw | blame | history
src/views/main/singsuc.vue 12 ●●●●● patch | view | raw | blame | history
src/views/main/addBankcard.vue
@@ -10,11 +10,15 @@
        </template>
      </van-field> -->
      <!-- <van-field readonly clickable name="noName" :value="bankName" label="银行名称" placeholder="请选择银行名称" @click="showPicker = true"  :rules="noName"  right-icon="arrow"/> -->
      <div>
      <div v-if="this.bizType==0 && this.dataInfo.status==0 || this.dataInfo.status==0 && this.bizType==1">
      <van-field v-model.trim="dataForm.name"   label="姓名:"    readonly/>
      <van-field v-model.trim="dataForm.idNo"  label="身份证号:"  readonly/>
      </div>
      <div v-else>
      <van-field v-model.trim="dataForm.name"   label="企业名称:"    readonly/>
      <van-field v-model.trim="dataForm.idNo"   label="负责人姓名:"  readonly/>
      <van-field v-model.trim="dataForm.idNo"   label="负责人姓名:"  readonly/>
      </div>
      <van-field v-model.trim="dataForm.verCode" center clearable label="短信验证码" :rules="codeRules" placeholder="请输入短信验证码" >
        <template #button>
          <van-button size="small" color="#6cc3bb" @click.stop="getCode"  native-type="button" :disabled="isdisabled">{{codeText}}</van-button>
@@ -162,6 +166,8 @@
                this.$api.getFrontData(objForm).then(res=>{
                     this.dataForm  =res.body
                })
            }else if(this.dataInfo.status==1 &&  Number(this.bizType)==0 || this.dataInfo.status==1 && Number(this.bizType)==1 || this.dataInfo.status==4 && Number(this.bizType)==1){
                this.$router.push({path:'/main/queryres',query:{...objForm}})
            }
          })
    },
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实例)
src/views/main/singsuc.vue
@@ -1,13 +1,13 @@
<template>
  <div class='text-main'>
    <van-nav-bar title="审核结果"/>
    <!-- <van-nav-bar title="审核结果"/> -->
    <div style="  text-align: center;">
    <img width="70%" height="180" src="../../assets/img/successw.png"  />
    <img  height="180" src="../../assets/img/successw.png"  />
    </div>
    <div class="content">
      <p class="content-text"> 签约成功</p>
      <van-button  @click="returnApp"  round block  color="#E43A28">返回</van-button>
      <p class="content-text"> 您的授信已提交,稍后查询授信状态</p>
      <van-button  @click="returnApp" round block color="#6cc3bb" style="width:80%">确认</van-button>
    </div>
  </div>
</template>
@@ -55,5 +55,9 @@
    font-weight: 500;
    color: #999999;
  }
  .van-button{
    margin: 0 auto;
    margin-top: 20px;
  }
}
</style>