|
@@ -24,6 +24,7 @@ import { getAudioDuration } from "/src/view/audio-list";
|
|
|
import { debounce } from "/src/utils";
|
|
|
import { EvaluatingResultDriver } from "../../custom-plugins/guide-driver";
|
|
|
import { api_recordAudioUpload } from "/src/helpers/communication";
|
|
|
+import { uploadErrorLog } from '/src/hooks/errorLog/uploadLog'
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: "evaluatResult",
|
|
@@ -74,20 +75,26 @@ export default defineComponent({
|
|
|
body.lessonDetailId = query.evaluatingRecord
|
|
|
}
|
|
|
data.saveLoading = true;
|
|
|
- const res = await api_musicPracticeRecordSave(body);
|
|
|
- if (res?.code === 200) {
|
|
|
- evaluatingData.resultData.recordId = res.data;
|
|
|
- // 如果评测结果没有返回音频,需要调用api通知APP端上传音频
|
|
|
- if (!evaluatingData.resultData.url && evaluatingData.resultData.recordId) {
|
|
|
- api_recordAudioUpload({
|
|
|
- recordId: evaluatingData.resultData.recordId
|
|
|
- })
|
|
|
+ try {
|
|
|
+ const res = await api_musicPracticeRecordSave(body);
|
|
|
+ if (res?.code === 200) {
|
|
|
+ evaluatingData.resultData.recordId = res.data;
|
|
|
+ // 如果评测结果没有返回音频,需要调用api通知APP端上传音频
|
|
|
+ if (!evaluatingData.resultData.url && evaluatingData.resultData.recordId) {
|
|
|
+ api_recordAudioUpload({
|
|
|
+ recordId: evaluatingData.resultData.recordId
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
- } else {
|
|
|
+ } catch (err:any) {
|
|
|
+ const contentError = `reason: ${err?.message || ''};stack: ${err?.stack || ''};bizId: ${state.examSongId || query.id || ''};partIndex: ${query["part-index"] || state.partIndex || 0};partName: ${decodeURIComponent(query["part-name"] || '') || ''};`;
|
|
|
+ uploadErrorLog(contentError)
|
|
|
+ evaluatingData.resulstMode = false
|
|
|
showToast({
|
|
|
message: "评测服务异常,请稍后重试",
|
|
|
});
|
|
|
}
|
|
|
+ state.isLoading = false
|
|
|
evaluatingData.needReplayEvaluat = evaluatingData.oneselfCancleEvaluating ? true : false;
|
|
|
data.saveLoading = false;
|
|
|
};
|