Browse Source

Merge branch 'feature-tianyong-newVersion' of http://git.dayaedu.com/liushengqiang/music-score into ktyq-test-new

TIANYONG 9 months ago
parent
commit
2ff723f0a1

+ 16 - 10
src/page-instrument/evaluat-model/index.tsx

@@ -40,6 +40,12 @@ let actualBeatLength = 0;
 let calculateInfo: any = {};
 let checkErjiTimer: any = null
 
+export const reCheckDelay = () => {
+  headTopData.settingMode = false
+  state.setting.soundEffect = false
+  api_startDelayCheck({});
+}
+
 export default defineComponent({
   name: "evaluat-model",
   setup() {
@@ -448,16 +454,16 @@ export default defineComponent({
 			return evaluatingData.earphoneMode && !state.isLoading && !state.hasDriverPop;
 		});
 
-    watch(
-      () => state.setting.soundEffect,
-      (val) => {
-        if (val) {
-          headTopData.settingMode = false
-          api_startDelayCheck({});
-          state.setting.soundEffect = false
-        }
-      }
-    );
+    // watch(
+    //   () => state.setting.soundEffect,
+    //   (val) => {
+    //     if (val) {
+    //       headTopData.settingMode = false
+    //       api_startDelayCheck({});
+    //       state.setting.soundEffect = false
+    //     }
+    //   }
+    // );
 
     // 手动取消评测,需要自动再次评测
     watch(

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

@@ -10,6 +10,7 @@ import Recommendation from "../../custom-plugins/helper-model/recommendation";
 import { resetRenderMusicScore } from "/src/view/music-score";
 import ScreenModel from "../../custom-plugins/helper-model/screen-model";
 import { getQuery } from "/src/utils/queryString";
+import { reCheckDelay } from "/src/page-instrument/evaluat-model"
 
 export default defineComponent({
 	name: "settting",
@@ -89,7 +90,9 @@ export default defineComponent({
                                 <div class={styles.cellBox}>
                                     <div class={styles.tit}>延迟检测</div>
                                     {/* <Switch v-model={state.setting.soundEffect}></Switch> */}
-                                    <div class={styles.titbtn} onClick={() => state.setting.soundEffect = true}>重新检测</div>
+                                    <div class={styles.titbtn} onClick={() => {
+                                        reCheckDelay();
+                                    }}>重新检测</div>
                                 </div> 
                                 <div class={[styles.cellBox, state.setting.camera && styles.isCamera]}>
                                     <div class={styles.tit}>摄像头</div>

+ 7 - 2
src/state.ts

@@ -662,7 +662,6 @@ const handlePlaying = () => {
   const currentTime = getAudioCurrentTime();
   const duration = getAudioDuration();
   state.playProgress = (currentTime / duration) * 100;
-  console.log('mp3时间',currentTime)
   let item = getNote(currentTime);
   if (item) {
     // 选段状态下
@@ -1075,7 +1074,10 @@ export const handleResetPlay = () => {
   if (state.isAppPlay) {
     audioData.progress = 0
   }
-  resetBaseRate();
+  // 如果是作业模式,不还原速度
+  if (!query.workRecord) {
+    resetBaseRate();
+  }
   resetPlaybackToStart();
   // 如果是暂停, 直接播放
   togglePlay("play");
@@ -1710,6 +1712,9 @@ export const fillWordColor = () => {
     if ((index === currentNote.repeatIdx && currentNote.repeatIdx + 1 == lyricIndex) || (currentNote.repeatIdx > 0 && currentNote.formatLyricsEntries?.length === 1)) {
       lyric?.classList.add('lyricActive')
     }
+    // if ((index === currentNote.repeatIdx && currentNote.repeatIdx + 1 == lyricIndex)) {
+    //   lyric?.classList.add('lyricActive')
+    // }
   })
 }
 

+ 1 - 1
src/view/selection/index.tsx

@@ -336,7 +336,7 @@ export default defineComponent({
 					sectionPosData.value.map((item,index) =>{
 						return (
 							item && <div class={styles.selectBox} style={item}>
-								<div class={[styles.selectHandle,index>0&&styles.selectHandleRight,state.playState==="play"&&styles.playIng]} onClick={()=>{
+								<div class={[styles.selectHandle,index>0&&styles.selectHandleRight,(state.playState==="play" || query.workRecord)&&styles.playIng]} onClick={()=>{
 									// 如果选择了2个 删除左边的时候
 									if(state.section.length===2&&index === 0){
 										state.section = []