Browse Source

等待最佳 __inputSize 出现,再做活检

Michael Wang 5 năm trước cách đây
mục cha
commit
47d087c090
1 tập tin đã thay đổi với 11 bổ sung0 xóa
  1. 11 0
      src/features/OnlineExam/Examing/FaceMotion/FaceMotion.vue

+ 11 - 0
src/features/OnlineExam/Examing/FaceMotion/FaceMotion.vue

@@ -506,6 +506,7 @@ export default {
       }
       if (!this.asked) {
         this.asked = true;
+        await this.waitingForInputSize();
         await this.increaseTestSpeed();
         // await new Promise(resolve => setTimeout(resolve, 3000));
         await this.intro();
@@ -850,6 +851,16 @@ export default {
       // this.resetTest();
       this.closeMe();
     },
+    async waitingForInputSize() {
+      for (let i = 0; i < 30; i++) {
+        if (window.__inputSize) {
+          break;
+        }
+        console.log("waitingForInputSize", i);
+        await new Promise(resolve => setTimeout(() => resolve(), 3000));
+      }
+      console.log("window.__inputSize", window.__inputSize);
+    },
     async increaseTestSpeed() {
       if (!this.__inThisMethodOnce) {
         this.__inThisMethodOnce = true;