浏览代码

feat: 添加重新评测消息监听

TIANYONG 11 月之前
父节点
当前提交
f44909f342

文件差异内容过多而无法显示
+ 0 - 0
dist/js/index-22f77862.js


文件差异内容过多而无法显示
+ 0 - 0
dist/js/index-bc83f0d6.js


文件差异内容过多而无法显示
+ 0 - 0
dist/js/index-legacy-a2aebe6d.js


文件差异内容过多而无法显示
+ 0 - 0
dist/js/index-legacy-f79b7117.js


文件差异内容过多而无法显示
+ 0 - 0
dist/js/instrument-231cf6a9.js


文件差异内容过多而无法显示
+ 0 - 0
dist/js/instrument-legacy-63843779.js


文件差异内容过多而无法显示
+ 0 - 0
dist/js/polyfills-d533eab3.js


+ 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>

部分文件因为文件数量过多而无法显示