fix: 学习逻辑调整

This commit is contained in:
杨航
2025-09-19 10:54:16 +08:00
parent a895c928bd
commit e3b06ae6c5
+18 -12
View File
@@ -750,7 +750,9 @@ const closeStudy = () => {
}
onHide(() => {
changePlayItemId('')
closeStudy()
if(isPreview.value === 'S'){
closeStudy()
}
// socketStore.closeSocket()
//#ifdef APP-PLUS
uni.offKeyboardHeightChange(setHeight)
@@ -767,21 +769,25 @@ onShow(() => {
if (watchFlag.value === 1) return
// getData('2');
// initsocketTask()
sendMessage({
commond: 'STDY',
body: {
crsId: crsId.value,
teacherNo: choiceTeacher.value,
studyType: isPreview.value ? 'P' : 'S',
isContinue: isContinue.value,
stdyId: stdyId.value
}
})
if(isPreview.value === 'S'){
sendMessage({
commond: 'STDY',
body: {
crsId: crsId.value,
teacherNo: choiceTeacher.value,
studyType: isPreview.value ? 'P' : 'S',
isContinue: isContinue.value,
stdyId: stdyId.value
}
})
}
})
const watchFlag = ref(1)
onUnload(() => {
console.log('onUnload')
closeStudy()
if(isPreview.value === 'S'){
closeStudy()
}
// socketStore.closeSocket()
changePlayItemId('')
console.log(typeof teacherVoiceObj)