Преглед на файлове

feat: 跟练模式练习时长

TIANYONG преди 1 година
родител
ревизия
8ad4e59dad
променени са 2 файла, в които са добавени 5 реда и са изтрити 1 реда
  1. 1 1
      src/helpers/metronome.ts
  2. 4 0
      src/view/follow-practice/index.tsx

+ 1 - 1
src/helpers/metronome.ts

@@ -189,7 +189,7 @@ class Metronome {
 	 * 跟练模式播放,跟练模式没有曲子音频播放器
 	 */
 	simulatePlayAudio = () => {
-		console.log(333, metronomeData.followAudioIndex)
+		// console.log(333, metronomeData.followAudioIndex)
 		if (!metronomeData.initPlayerState) return;
 		const beatVolume = state.setting.beatVolume / 100
 		// this.source = metronomeData.followAudioIndex === 1 ? this.source1 : this.source2;

+ 4 - 0
src/view/follow-practice/index.tsx

@@ -10,6 +10,9 @@ import { getDuration } from "/src/helpers/formateMusic";
 import { OpenSheetMusicDisplay } from "/osmd-extended/src";
 import { browser, getBehaviorId } from "/src/utils";
 import { api_musicPracticeRecordSave } from "../../page-instrument/api";
+import { getQuery } from "/src/utils/queryString";
+
+const query: any = getQuery();
 
 export const followData = reactive({
 	list: [] as any, // 频率列表
@@ -22,6 +25,7 @@ export const followData = reactive({
 
 // 记录跟练时长
 const handleRecord = (total: number) => {
+	if (query.isCbs) return
 	if (total < 0) total = 0;
 	const totalTime = total / 1000;