Explorar el Código

关闭人脸认证

y595705120 hace 5 meses
padre
commit
9737e9957d
Se han modificado 1 ficheros con 15 adiciones y 2 borrados
  1. 15 2
      src/containers/center/play/components/iMedia.vue

+ 15 - 2
src/containers/center/play/components/iMedia.vue

@@ -92,7 +92,9 @@
 
     </el-row>
 
-   <el-dialog  title="开始人脸认证" center :visible.sync="identifyFaceDialog" width="540px" :append-to-body="true" >
+   <el-dialog  title="开始人脸认证" center :visible.sync="identifyFaceDialog" width="540px"
+      :close-on-click-modal = "false"
+       @close="closeIdentify":append-to-body="true" >
       <div>
         <i-collect :updateTime="updateTime" @getface="getface" />
         <div class="tc m20">
@@ -261,6 +263,12 @@
         console.log( "stopTick")
         if (this.timer) clearInterval(this.timer);
       },
+      closeIdentify(){
+        console.log( "closeIdentify")
+        this.startPlay = false
+        this.onPlay = false
+        this.stopTick();
+      },
       tryTick() {
         let that = this;
         try {
@@ -349,6 +357,7 @@
         this.imgbase64 = '';
         let isDebug = false
         if( !this.closeFace){
+          this.nextFaceTick = 0;
           this.identifyFaceDialog = true
           this.updateTime = Date.now()
           // 人脸采集间隔时间
@@ -424,7 +433,11 @@
               return;
             }else{
               console.log("next",(now - this.nextFaceTime)/1000 )
-              if( this.startPlay && now > this.nextFaceTime  ){
+              if( !this.startPlay  ){
+                this.stopTick()
+                return;
+              }
+              if( now > this.nextFaceTime  ){
                 this.startIdentify();
                 return;
               }