Browse Source

feat: 跟练模式练习时长

TIANYONG 1 năm trước cách đây
mục cha
commit
8ad4e59dad

+ 1 - 1
src/helpers/metronome.ts

@@ -189,7 +189,7 @@ class Metronome {
 	 * 跟练模式播放,跟练模式没有曲子音频播放器
 	 * 跟练模式播放,跟练模式没有曲子音频播放器
 	 */
 	 */
 	simulatePlayAudio = () => {
 	simulatePlayAudio = () => {
-		console.log(333, metronomeData.followAudioIndex)
+		// console.log(333, metronomeData.followAudioIndex)
 		if (!metronomeData.initPlayerState) return;
 		if (!metronomeData.initPlayerState) return;
 		const beatVolume = state.setting.beatVolume / 100
 		const beatVolume = state.setting.beatVolume / 100
 		// this.source = metronomeData.followAudioIndex === 1 ? this.source1 : this.source2;
 		// 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 { OpenSheetMusicDisplay } from "/osmd-extended/src";
 import { browser, getBehaviorId } from "/src/utils";
 import { browser, getBehaviorId } from "/src/utils";
 import { api_musicPracticeRecordSave } from "../../page-instrument/api";
 import { api_musicPracticeRecordSave } from "../../page-instrument/api";
+import { getQuery } from "/src/utils/queryString";
+
+const query: any = getQuery();
 
 
 export const followData = reactive({
 export const followData = reactive({
 	list: [] as any, // 频率列表
 	list: [] as any, // 频率列表
@@ -22,6 +25,7 @@ export const followData = reactive({
 
 
 // 记录跟练时长
 // 记录跟练时长
 const handleRecord = (total: number) => {
 const handleRecord = (total: number) => {
+	if (query.isCbs) return
 	if (total < 0) total = 0;
 	if (total < 0) total = 0;
 	const totalTime = total / 1000;
 	const totalTime = total / 1000;