Browse Source

faceid url load failed

Michael Wang 5 years ago
parent
commit
915c5440ec
1 changed files with 4 additions and 5 deletions
  1. 4 5
      src/features/OnlineExam/Examing/FaceId.vue

+ 4 - 5
src/features/OnlineExam/Examing/FaceId.vue

@@ -192,7 +192,7 @@ export default {
           "活体检测弹出框",
           "websocket连接失败",
         ]);
-        this.showRedo("websocket连接异常,请手动点击重试");
+        // this.showRedo("websocket连接异常,请手动点击重试");
       };
     },
     /**
@@ -357,10 +357,9 @@ export default {
         });
 
         iframe.addEventListener("did-fail-load", () => {
-          console.log("failed loading faceid iframe");
+          console.log("failed loading faceid iframe", iframe.src);
           clearTimeout(this.iframeDomReadyTimeout);
-          console.log(iframe);
-          if (iframe.src.includes(".qmth.com.cn") === false) {
+          if (iframe.src.includes(FACEID_LINENESS_URL)) {
             this.showRedo("网络异常,请手动点击重试");
             window._hmt.push([
               "_trackEvent",
@@ -388,7 +387,7 @@ export default {
 
         iframe.addEventListener("ipc-message", event => {
           // console.log(event.channel);
-          clearInterval(this.iframeDomReadyTimeout);
+          clearTimeout(this.iframeDomReadyTimeout);
           const iframeLoadMsg = event.channel;
           if (iframeLoadMsg.indexOf("error_message") > -1) {
             this.showRedo();