Jelajahi Sumber

新增合成

liushengqiang 1 tahun lalu
induk
melakukan
ef670c0aa8

+ 8 - 0
src/helpers/communication.ts

@@ -294,3 +294,11 @@ export const api_cloudAccompanyMessage = (audioFileUrl: string) => {
 		},
 	});
 };
+
+/** 合成音频传伴奏弹窗 */
+export const api_openAdjustRecording = (content: any) => {
+	postMessage({
+		api: "openAdjustRecording",
+		content,
+	});
+};

+ 6 - 2
src/page-instrument/evaluat-model/index.tsx

@@ -17,7 +17,7 @@ import { getNoteByMeasuresSlursStart } from "/src/helpers/formateMusic";
 import { Icon, Popup, showToast } from "vant";
 import EvaluatResult from "./evaluat-result";
 import EvaluatAudio from "./evaluat-audio";
-import { api_getDeviceDelay, api_proxyServiceMessage, api_videoUpdate, getEarphone } from "/src/helpers/communication";
+import { api_getDeviceDelay, api_openAdjustRecording, api_proxyServiceMessage, api_videoUpdate, getEarphone } from "/src/helpers/communication";
 import EvaluatShare from "./evaluat-share";
 import { Vue3Lottie } from "vue3-lottie";
 import startData from "./data/start.json";
@@ -187,7 +187,11 @@ export default defineComponent({
 		const handleEvaluatResult = (type: "practise" | "tryagain" | "look" | "share" | "update") => {
 			if (type === "update") {
 				// 上传云端
-				evaluatModel.evaluatUpdateAudio = true;
+				// evaluatModel.evaluatUpdateAudio = true;
+				api_openAdjustRecording({
+					recordId: evaluatingData.resultData?.recordIdStr || evaluatingData.resultData?.recordId,
+					title: state.examSongName || '曲谱演奏',
+				});
 				return;
 			} else if (type === "share") {
 				// 分享