Bläddra i källkod

Merge branch 'feature-tianyong-newVersion' of http://git.dayaedu.com/liushengqiang/music-score into kt-dev

TIANYONG 1 år sedan
förälder
incheckning
2c3dedf433
2 ändrade filer med 16 tillägg och 2 borttagningar
  1. 6 1
      src/helpers/communication.ts
  2. 10 1
      src/page-instrument/evaluat-model/index.tsx

+ 6 - 1
src/helpers/communication.ts

@@ -536,4 +536,9 @@ export const simple_musicPage = (content: any) => {
 		api: "api_musicPage",
 		content,
 	});
-};
+};
+
+/** 监听重新评测消息 */
+export const api_retryEvaluating = (callback: any) => {
+	listenerMessage("retryEvaluating", callback);
+}

+ 10 - 1
src/page-instrument/evaluat-model/index.tsx

@@ -20,7 +20,8 @@ import {
   api_startDelayCheck,
   api_cancelDelayCheck,
   api_closeDelayCheck,
-  api_finishDelayCheck
+  api_finishDelayCheck,
+  api_retryEvaluating
  } from "/src/helpers/communication";
 import EvaluatShare from "./evaluat-share";
 import { Vue3Lottie } from "vue3-lottie";
@@ -302,6 +303,8 @@ export default defineComponent({
             title: state.examSongName || "曲谱演奏",
             coverImg: state.coverImg,
             speedRate: rate, // 播放倍率
+            musicRenderType: state.musicRenderType,
+            musicSheetId: state.examSongId,
           });
           return;
         }
@@ -412,6 +415,11 @@ export default defineComponent({
       }
     };
 
+    // 监听重复评测消息
+    const handRetryEvaluating = () => {
+      handleEvaluatResult('tryagain')
+    }
+
     onMounted(async () => {
       // 如果打开了延迟检测开关,需要先发送开始检测的消息
       if (state.setting.soundEffect) {
@@ -424,6 +432,7 @@ export default defineComponent({
       // handlePerformDetection();
       api_cancelDelayCheck(handleCancelDelayCheck);
       api_finishDelayCheck(handleFinishDelayCheck);
+      api_retryEvaluating(handRetryEvaluating);
     });
     return () => (
       <div>