林旭祥 vor 1 Monat
Ursprung
Commit
8efc4fad43
2 geänderte Dateien mit 48 neuen und 48 gelöschten Zeilen
  1. 47 47
      src/views/train/multiple.vue
  2. 1 1
      src/views/train/test.vue

+ 47 - 47
src/views/train/multiple.vue

@@ -614,7 +614,7 @@ const initHand = () => {
     }
     //左滑动
     if (e?.data?.result == "next_item") {
-      proxy?.$modal.msgSuccess('手势指令:左滑动');
+      // proxy?.$modal.msgSuccess('手势指令:左滑动');
       // if(examState.value == 43 && time.value.ready){
       //   return false;
       // }
@@ -625,7 +625,7 @@ const initHand = () => {
     }
     //举左手
     if (e?.data?.result == "left_hand") {
-      proxy?.$modal.msgSuccess('手势指令:举左手');
+      //proxy?.$modal.msgSuccess('手势指令:举左手');
       //举左手确认退出
       // if (exitStatus.value) {
       //   exitStatus.value = 0;
@@ -663,52 +663,52 @@ const initHand = () => {
     }
     //退出
     if (e?.data?.result == "exit") {
-      proxy?.$modal.msgSuccess('手势指令:交叉手');
+      //proxy?.$modal.msgSuccess('手势指令:交叉手');
       // console.log("exitStatus.value", exitStatus.value)
-      if (exitStatus.value == 0) {
-        speckText("请保持两秒确认退出");
-        //第一次才弹出
-        confirmExit();
-        setTimeout(() => {
-          let keyEvent: any = null;
-          let myKey = null;
-          //如果交叉手两秒后返回超过4次就确认退出
-          if (exitStatus.value >= 4) {
-            myKey = 'Enter';
-          } else {
-            myKey = 'Esc';
-          }
-          if (myKey == 'Esc') {
-            keyEvent = new KeyboardEvent('keydown', {
-              key: 'Escape', // 键值
-              code: 'Escape', // 键盘代码
-              keyCode: 27, // 旧的键盘代码
-              which: 27, // 新的键盘代码
-              shiftKey: false, // 是否按下Shift键
-              ctrlKey: false, // 是否按下Ctrl键
-              metaKey: false, // 是否按下Meta键(Win键或Command键)
-              bubbles: true, // 事件是否冒泡
-              cancelable: true // 是否可以取消事件的默认行为
-            });
-            exitStatus.value = 0;
-          }
-          if (myKey == 'Enter') {
-            keyEvent = new KeyboardEvent('keydown', {
-              key: 'Enter', // 键值
-              code: 'Enter', // 键盘代码
-              keyCode: 13, // 旧的键盘代码
-              which: 13, // 新的键盘代码
-              shiftKey: false, // 是否按下Shift键
-              ctrlKey: false, // 是否按下Ctrl键
-              metaKey: false, // 是否按下Meta键(Win键或Command键)
-              bubbles: true, // 事件是否冒泡
-              cancelable: true // 是否可以取消事件的默认行为
-            });
-          }
-          document.activeElement?.dispatchEvent(keyEvent);
-        }, 2500)
-      }
-      exitStatus.value = exitStatus.value + 1
+      // if (exitStatus.value == 0) {
+      //   speckText("请保持两秒确认退出");
+      //   //第一次才弹出
+      //   confirmExit();
+      //   setTimeout(() => {
+      //     let keyEvent: any = null;
+      //     let myKey = null;
+      //     //如果交叉手两秒后返回超过4次就确认退出
+      //     if (exitStatus.value >= 4) {
+      //       myKey = 'Enter';
+      //     } else {
+      //       myKey = 'Esc';
+      //     }
+      //     if (myKey == 'Esc') {
+      //       keyEvent = new KeyboardEvent('keydown', {
+      //         key: 'Escape', // 键值
+      //         code: 'Escape', // 键盘代码
+      //         keyCode: 27, // 旧的键盘代码
+      //         which: 27, // 新的键盘代码
+      //         shiftKey: false, // 是否按下Shift键
+      //         ctrlKey: false, // 是否按下Ctrl键
+      //         metaKey: false, // 是否按下Meta键(Win键或Command键)
+      //         bubbles: true, // 事件是否冒泡
+      //         cancelable: true // 是否可以取消事件的默认行为
+      //       });
+      //       exitStatus.value = 0;
+      //     }
+      //     if (myKey == 'Enter') {
+      //       keyEvent = new KeyboardEvent('keydown', {
+      //         key: 'Enter', // 键值
+      //         code: 'Enter', // 键盘代码
+      //         keyCode: 13, // 旧的键盘代码
+      //         which: 13, // 新的键盘代码
+      //         shiftKey: false, // 是否按下Shift键
+      //         ctrlKey: false, // 是否按下Ctrl键
+      //         metaKey: false, // 是否按下Meta键(Win键或Command键)
+      //         bubbles: true, // 事件是否冒泡
+      //         cancelable: true // 是否可以取消事件的默认行为
+      //       });
+      //     }
+      //     document.activeElement?.dispatchEvent(keyEvent);
+      //   }, 2500)
+      // }
+      // exitStatus.value = exitStatus.value + 1
     }
     // if (e?.data?.result == "exit") {
     //   console.log("exitStatus.value", exitStatus.value)

+ 1 - 1
src/views/train/test.vue

@@ -814,7 +814,7 @@ const initHand = () => {
     // }
     //举左手
     if (e?.data?.result == 'left_hand') {
-      proxy?.$modal.msgSuccess('手势指令:举左手');
+      //proxy?.$modal.msgSuccess('手势指令:举左手');
       //举左手确认退出
       // if (exitStatus.value) {
       //   exitStatus.value = 0;