فهرست منبع

Merge branch 'feature-tianyong-newVersion' into ktyq-test-new

TIANYONG 2 ماه پیش
والد
کامیت
8fe2547b3e

+ 7 - 1
src/page-instrument/custom-plugins/recording-time/index.tsx

@@ -16,7 +16,9 @@ const handleRecord = () => {
 	recordData.starTime = Date.now();
 	if (total < 0) total = 0;
 	const totalTime = total / 1000;
-
+	const rate = state.basePlayRate * state.originAudioPlayRate; // 播放倍率    
+	// 如果是选段,则选选段开头小节的速度
+	const currentSpeed = state.sectionStatus && state.section.length === 2 && state.section[0].measureSpeed ? state.section[0].measureSpeed * state.basePlayRate : state.speed;
 	const body = {
 		clientType: storeData.user.clientType,
 		musicSheetId: state.examSongId,
@@ -27,6 +29,10 @@ const handleRecord = () => {
 		deviceType: browser().android ? "ANDROID" : "IOS",
 		behaviorId: getBehaviorId(),
 		sourceTime: getAudioDuration(), // 音频时长
+		instrumentId: state.instrumentId,
+        playRate: rate,
+		partIndex: state.partIndex, // 音轨
+        speed: currentSpeed, // 速度
 	};
 	api_musicPracticeRecordSave(body);
 };

+ 2 - 2
src/view/fingering/fingering-config.ts

@@ -347,11 +347,11 @@ export const matchVoicePart = (id: number | string, type: "SINGLE" | "CONCERT"):
         let pitchKey = sKey;
         if (typeof sKey === "string" && isNaN(Number(sKey)) ) {
           pitchKey = pitchKey.toLocaleLowerCase().replace(/ /g, "");
-          pitchKey = pitchKey.replace(/[_0-9]+$/, '');
+          pitchKey = pitchKey.replace(/[_0-9.]+$/, '');
         }
         if (typeof sKey === "string") {
           // 去掉声轨后面的数字
-          code = code.replace(/[_0-9]+$/, '');
+          code = code.replace(/[_0-9.]+$/, '');
         }
         if (pitchKey === code) {
           _track = subject[sKey];

+ 7 - 1
src/view/follow-practice/index.tsx

@@ -32,7 +32,9 @@ const handleRecord = (total: number) => {
 	if (query.isCbs) return
 	if (total < 0) total = 0;
 	const totalTime = total / 1000;
-
+	const rate = state.basePlayRate * state.originAudioPlayRate; // 播放倍率    
+	// 如果是选段,则选选段开头小节的速度
+	const currentSpeed = state.sectionStatus && state.section.length === 2 && state.section[0].measureSpeed ? state.section[0].measureSpeed * state.basePlayRate : state.speed;
 	const body = {
 		clientType: storeData.user.clientType,
 		musicSheetId: state.examSongId,
@@ -43,6 +45,10 @@ const handleRecord = (total: number) => {
 		deviceType: browser().android ? "ANDROID" : "IOS",
 		behaviorId: getBehaviorId(),
 		sourceTime: getAudioDuration(), // 音频时长
+		instrumentId: state.instrumentId,
+        playRate: rate,
+		partIndex: state.partIndex, // 音轨
+        speed: currentSpeed, // 速度
 	};
 	api_musicPracticeRecordSave(body);
 };