diff --git a/src/pages/course/components/talkingItem.vue b/src/pages/course/components/talkingItem.vue index 6bf7d34b..c183e345 100644 --- a/src/pages/course/components/talkingItem.vue +++ b/src/pages/course/components/talkingItem.vue @@ -593,8 +593,6 @@ itemVoice.value = res.tempFilePath; talkVoiceObj.value.src = res.tempFilePath; // 判斷是否在當前頁面 - // unref(dataInfo)?.id - console.log(unref(isGettingId), unref(dataInfo)?.id) if(unref(isGettingId) === unref(dataInfo)?.id){ talkVoiceObj.value.play(); } diff --git a/src/pages/course/study.vue b/src/pages/course/study.vue index 2f9951a3..18d12ee1 100644 --- a/src/pages/course/study.vue +++ b/src/pages/course/study.vue @@ -322,11 +322,9 @@ // 关闭播放状态 const changePlayItemId = (id = '') => { activeVoiceTalkingItemId.value = id - // if(activeVoiceTalkingItemId.value === id){ - // activeVoiceTalkingItemId.value = '' - // }else{ - // activeVoiceTalkingItemId.value = id - // } + if(id == ''){ + storageStore.setGettingVoiceId(id); + } } // 选择的教师对象信息 const choiceTeacherInfo = computed(() => { @@ -811,7 +809,7 @@ teacherVoiceObj.src = '' } catch {} - storageStore.setStorage('setGettingVoiceId', ''); + storageStore.setGettingVoiceId(''); // common.show('提示信息', '检测到您已离开,即将退出学习页面。',false, '','确认').then((res) => { // common.redirectTo(`/pages/courseDetail/index?crsId=${crsId.value}&crsNum=${crsNum.value}&from=study`) // }).finally(() => {})