Browse Source

feat: 取消评测优化

TIANYONG 1 năm trước cách đây
mục cha
commit
8a6dd1e93f
1 tập tin đã thay đổi với 12 bổ sung9 xóa
  1. 12 9
      src/view/evaluating/index.tsx

+ 12 - 9
src/view/evaluating/index.tsx

@@ -361,17 +361,17 @@ export const handleEndEvaluat = (isComplete = false) => {
 	// 结束录音
 	// api_stopRecording();
 	// 结束评测
+	endEvaluating({
+		musicScoreId: state.examSongId,
+	});
 	setTimeout(() => {
-		endEvaluating({
-			musicScoreId: state.examSongId,
+		showLoadingToast({
+			message: "评分中",
+			duration: 0,
+			overlay: true,
+			overlayClass: styles.scoreMode,
 		});
-	}, 500);
-	showLoadingToast({
-		message: "评分中",
-		duration: 0,
-		overlay: true,
-		overlayClass: styles.scoreMode,
-	});
+	}, 1000);
 	evaluatingData.isComplete = isComplete;
 	// 如果开启了摄像头, 结束录制视频
 	if (state.setting.camera) {
@@ -408,6 +408,9 @@ export const handleCancelEvaluat = () => {
 	cancelEvaluating();
 	// 停止播放
 	handleStopPlay();
+	endEvaluating({
+		musicScoreId: state.examSongId,
+	});
 	// 如果开启了摄像头, 结束录制视频
 	if (state.setting.camera) {
 		console.log("结束录制视频");