Browse Source

Merge branch 'feature-patch' into feature-tianyong-newVersion

TIANYONG 1 week ago
parent
commit
d1095ccaa3

+ 1 - 1
src/page-instrument/custom-plugins/guide-driver/index.tsx

@@ -1552,4 +1552,4 @@ export const EvaluatingReportDriver = defineComponent({
       </Teleport>
     );
   },
-});
+});

+ 2 - 0
src/page-instrument/custom-plugins/recording-time/index.tsx

@@ -16,6 +16,8 @@ const handleRecord = () => {
 	recordData.starTime = Date.now();
 	if (total < 0) total = 0;
 	const totalTime = total / 1000;
+	// 练习时长不足1秒,不提交记录
+	if (totalTime < 1) return; 
 	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;

+ 2 - 0
src/page-instrument/custom-plugins/work-home/index.tsx

@@ -87,6 +87,8 @@ export default defineComponent({
 		/** 添加作业记录 */
 		const addHomeworkRecored = async (extraType?: string) => {
 			let total = extraType === 'save' ? training.realThisTimeTotal : Math.floor((Date.now() - training.starTime) / 1000);
+			// 作业时长不足1秒,不提交记录
+			if (total < 1) return;
 			try {
 				let params: any = {
 					id: props.workeData.id,

+ 4 - 0
src/page-instrument/evaluat-model/evaluat-result/index.tsx

@@ -41,6 +41,10 @@ export default defineComponent({
     };
     /** 添加评测记录 */
     const handleAddRecord = async () => {
+      // 评测时长不足1秒,不生成记录
+      if (evaluatingData.resultData.playTime / 1000 < 1) {
+        return;
+      }
       console.log("结束", evaluatingData.resultData);
       /** 生成评测记录的时候,记录当前评测的谱面类型,用于评测报告默认展示的谱面类型 */
       evaluatingData.resultData.scoreData.musicType = state.musicRenderType;

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

@@ -32,6 +32,8 @@ const handleRecord = (total: number) => {
 	if (query.isCbs) return
 	if (total < 0) total = 0;
 	const totalTime = total / 1000;
+	// 跟练时长不足1秒,不生成记录
+	if (totalTime < 1) return; 
 	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;