浏览代码

Merge branch 'feature-patch' into ktyq-test-new

TIANYONG 4 周之前
父节点
当前提交
e14adc2edf
共有 2 个文件被更改,包括 6 次插入1 次删除
  1. 5 1
      src/page-instrument/header-top/index.tsx
  2. 1 0
      src/state.ts

+ 5 - 1
src/page-instrument/header-top/index.tsx

@@ -19,7 +19,7 @@ import { getQuery } from "/src/utils/queryString";
 import { storeData } from "/src/store";
 import TeacherTop from "../custom-plugins/guide-page/teacher-top";
 import StudentTop from "../custom-plugins/guide-page/student-top";
-import { HANDLE_WORK_ADD } from "../custom-plugins/work-index";
+import { HANDLE_WORK_ADD, resetSection } from "../custom-plugins/work-index";
 import { browser } from "/src/utils";
 import store from "store";
 import "../component/the-modal-tip/index.module.less";
@@ -168,6 +168,10 @@ export async function handlerModeChange(oldPlayType: "play" | "sing", oldPlaySou
     handleRessetState();
     // 隐藏重播按钮
     resetBtn && (resetBtn.value.display = false);
+    // 如果是作业模式,切成场景(演奏、演唱切换)需要重新设置作业选段和速度
+    if (getQuery().workRecord) {
+      resetSection();
+    }
   }
   // 节拍器音频加载
   await handleLoadBeatMusic()

+ 1 - 0
src/state.ts

@@ -529,6 +529,7 @@ const handlePlaying = () => {
           const preItem = state.times[item.i - 1]
           if (preItem && preItem.MeasureNumberXML > item.MeasureNumberXML) {
             const skipItem = state.times.find((item: any) => item.MeasureNumberXML === preItem.MeasureNumberXML + 1)
+            // console.log('跳转播放',skipItem,skipItem.time)
             if (skipItem) {
               // 跳转到指定的音频位置
               setAudioCurrentTime(skipItem.time, skipItem.i);