From d81d8316b10cd9eaaf28305361b81a0945e998a4 Mon Sep 17 00:00:00 2001 From: yanghang Date: Fri, 18 Jul 2025 13:55:30 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=87=8D=E6=96=B0=E5=AD=A6=EF=BC=8C?= =?UTF-8?q?=E9=87=8D=E6=96=B0=E8=AE=BE=E7=BD=AElogId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/course/study.vue | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/pages/course/study.vue b/src/pages/course/study.vue index 4facd525..30abf488 100644 --- a/src/pages/course/study.vue +++ b/src/pages/course/study.vue @@ -547,7 +547,8 @@ const nextQuestionSuccess = (info, type='next') => { isQuestion: true } talkingList.value.push(lastTalkingInfo.value) - qstLogId.value = _body.chatBody.qstLogId + logId.value = _body.chatBody.logId + qstLogId.value = _body.chatBody.qstLogId || qstLogId.value scrollToBottomNow() }) } @@ -610,10 +611,7 @@ const initsocketTask = () => { }) } const reconnect = ()=> { - if(reconnectTimer || isManualClose.value) return - reconnectTimer = setTimeout(()=>{ - initsocketTask() - },3000) + initsocketTask() } const sendMessage = (data) => { unref(SocketObj).send(data) @@ -622,6 +620,7 @@ const sendMessage = (data) => { const startPgrphId = ref('') const imageId = ref('') onLoad((params) => { + watchFlag.value = 1 crsId.value = params.crsId||''; crsNum.value = params.crsNum||''; imageId.value = params.imgId || '' @@ -638,13 +637,14 @@ onHide(()=>{ if(watchFlag.value === 1) return changePlayItemId('') socketStore.closeSocket() - common.show('提示信息', '检测到您已离开,即将退出学习页面。',false, '','确认').then((res) => { - common.redirectTo(`/pages/courseDetail/index?crsId=${crsId.value}&crsNum=${crsNum.value}&from=study`) - }).finally(() => {}) + // common.show('提示信息', '检测到您已离开,即将退出学习页面。',false, '','确认').then((res) => { + // common.redirectTo(`/pages/courseDetail/index?crsId=${crsId.value}&crsNum=${crsNum.value}&from=study`) + // }).finally(() => {}) }) onShow(()=>{ if(watchFlag.value === 1) return - getData('2'); + // getData('2'); + initsocketTask() }) const watchFlag = ref(1) onUnload(()=>{