fix: 重新学,重新设置logId

This commit is contained in:
yanghang
2025-07-18 13:55:30 +08:00
parent 91dbb839f9
commit d81d8316b1
+9 -9
View File
@@ -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(()=>{