zengyicheng 3 年之前
父節點
當前提交
3e413be32c
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/components/function.vue

+ 2 - 2
src/components/function.vue

@@ -157,7 +157,7 @@ export default {
           // 实时拍照效果
           // 实时拍照效果
           _this.$refs["video"].play();
           _this.$refs["video"].play();
 
 
-          if (_this.$store.state.function.indexOf("face=1;") != -1 && _this.$store.state.function.indexOf("police=1;") != -1) {
+          if (_this.$store.state.function.indexOf("face=1;") != -1) {
             // this.$message.error("摄像头开启失败,请检查摄像头是否可用!");
             // this.$message.error("摄像头开启失败,请检查摄像头是否可用!");
 
 
             const video = this.videoEl;
             const video = this.videoEl;
@@ -186,7 +186,7 @@ export default {
                 _this.count += 1;
                 _this.count += 1;
                 if (_this.count > 10) {
                 if (_this.count > 10) {
                   _this.isdetected = "已检测到人脸";
                   _this.isdetected = "已检测到人脸";
-                  if (_this.sampleArr.length > 0) {
+                  if (_this.sampleArr.length > 0 && _this.$store.state.function.indexOf("police=1;") != -1) {
                     _this.fnRun();
                     _this.fnRun();
                   }
                   }
                 }
                 }