diff --git a/src/pages/course/components/touchBtn.vue b/src/pages/course/components/touchBtn.vue index 9bc227b7..f5f51a2e 100644 --- a/src/pages/course/components/touchBtn.vue +++ b/src/pages/course/components/touchBtn.vue @@ -69,17 +69,11 @@ const audioObj = uni.createInnerAudioContext() const recordObjCom = ref({}) const initRecord = () => { recordObjCom.value = uni.getRecorderManager() + startRecord() + stopRecord() unref(recordObjCom)?.onStop((res, duration)=>{ audioPath.value = res.tempFilePath - uni.saveFile({ - tempFilePath:res.tempFilePath, - success:(res)=>{ - console.log(res) - } - }) }) - unref(recordObjCom).start({format:'mp3'}) - stopRecord() } const startRecord = () => { unref(recordObjCom).start({format:'mp3'}) diff --git a/src/pages/course/study.vue b/src/pages/course/study.vue index 9da2eb2c..04cfc0fa 100644 --- a/src/pages/course/study.vue +++ b/src/pages/course/study.vue @@ -121,7 +121,7 @@