lex-xin před 6 měsíci
rodič
revize
3fd1ac79cb
1 změnil soubory, kde provedl 8 přidání a 6 odebrání
  1. 8 6
      src/page-instrument/header-top/index.tsx

+ 8 - 6
src/page-instrument/header-top/index.tsx

@@ -548,12 +548,14 @@ export default defineComponent({
         togglePlay("paused", true);
       }
       if(res?.data?.api === 'togglePlayState') {
-        if(state.playState === "play") {
-          togglePlay("paused");
-        }
-        if(state.playState === 'paused') {
-          togglePlay("play");
-        }
+        // if(state.playState === "play") {
+        //   togglePlay("paused");
+        // }
+        // if(state.playState === 'paused') {
+        //   togglePlay("play");
+        // }
+        console.log('togglePlayState', state.playState)
+        togglePlay(state.playState === "play" ? "paused" : "play");
       }
       // 上课页面,按钮方向
       if (res?.data?.api === "imagePos") {