diff --git a/src/api/common.js b/src/api/common.js index e98d8ae2..4656ddad 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -157,6 +157,7 @@ export function downloadVoiceFile(url) { uni.downloadFile({ url: `${baseUrl}${url}`, header, + timeout: 180000, success(result) { console.log(result) resolve(result) diff --git a/src/pages/course/study.vue b/src/pages/course/study.vue index 5c6c95fe..4999363d 100644 --- a/src/pages/course/study.vue +++ b/src/pages/course/study.vue @@ -806,6 +806,10 @@ //#ifdef APP-PLUS uni.offKeyboardHeightChange(setHeight) // #endif + try { + teacherVoiceObj?.stop() + teacherVoiceObj.src = '' + } catch {} // common.show('提示信息', '检测到您已离开,即将退出学习页面。',false, '','确认').then((res) => { // common.redirectTo(`/pages/courseDetail/index?crsId=${crsId.value}&crsNum=${crsNum.value}&from=study`) // }).finally(() => {})