|
@@ -214,17 +214,13 @@ export const handleStartBegin = async () => {
|
|
|
// console.log("🚀 ~ content:", evaluatingData.contentData, JSON.stringify(evaluatingData.contentData));
|
|
|
} catch (error) {}
|
|
|
const res = await startEvaluating(evaluatingData.contentData);
|
|
|
- startRecordingAudio();
|
|
|
- playMusic()
|
|
|
- evaluatingData.backtime = Date.now();
|
|
|
- evaluatingData.startBegin = true
|
|
|
- // if (res?.api !== "startEvaluating") {
|
|
|
- // Snackbar.error("请在APP端进行评测");
|
|
|
- // evaluatingData.startBegin = false;
|
|
|
- // return;
|
|
|
- // }
|
|
|
- // 开始录音
|
|
|
- // api_startRecording();
|
|
|
+ if (res?.api !== "startEvaluating") {
|
|
|
+ Snackbar.error("请在APP端进行评测");
|
|
|
+ evaluatingData.startBegin = false;
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ //开始录音
|
|
|
+ api_startRecording();
|
|
|
|
|
|
};
|
|
|
|
|
@@ -312,8 +308,7 @@ export const handleEndEvaluat = (isComplete = false) => {
|
|
|
if (!evaluatingData.startBegin || state.modeType !== "evaluating") return;
|
|
|
evaluatingData.startBegin = false;
|
|
|
// 结束录音
|
|
|
- // api_stopRecording();
|
|
|
- stopRecordingAudio();
|
|
|
+ api_stopRecording();
|
|
|
// 结束评测
|
|
|
endEvaluating({
|
|
|
musicScoreId: state.examSongId,
|
|
@@ -447,8 +442,6 @@ export default defineComponent({
|
|
|
clearSelection();
|
|
|
}
|
|
|
console.log("加载评测模块成功");
|
|
|
-
|
|
|
- createRecordAudio();
|
|
|
});
|
|
|
onUnmounted(() => {
|
|
|
removeResult(handleScoreResult);
|