fix ; bug 测试知识点进入问题
This commit is contained in:
+13
-12
@@ -182,7 +182,7 @@ const getData = async (flag) => {
|
||||
// return
|
||||
// }
|
||||
try{
|
||||
await initsocketTask()
|
||||
initsocketTask()
|
||||
const { body } = await getCourseStudyInfoApi({crsId: crsId.value})
|
||||
teacherList.value = body.teacheList.map(t=>({
|
||||
...t,
|
||||
@@ -192,16 +192,18 @@ const getData = async (flag) => {
|
||||
if(body.stdyProgressFlag === 'N'){
|
||||
step.value = 1
|
||||
}else{
|
||||
choiceTeacher.value = body.choiceTeacher
|
||||
if(startPgrphId.value){
|
||||
choiceTeacher.value = body.choiceTeacher
|
||||
sendMessage({
|
||||
"commond" : 'STDY',
|
||||
"body" : {
|
||||
crsId: crsId.value,
|
||||
teacherNo: choiceTeacher.value
|
||||
}
|
||||
setTimeout(() => {
|
||||
sendMessage({
|
||||
"commond" : 'STDY',
|
||||
"body" : {
|
||||
crsId: crsId.value,
|
||||
teacherNo: choiceTeacher.value
|
||||
}
|
||||
},300)
|
||||
step.value = 2
|
||||
})
|
||||
step.value = 2
|
||||
return
|
||||
}
|
||||
common.show('提示', '系统检测到您已存在学习记录,要继续学习吗?',true, '重新学习','继续学习').then((res) => {
|
||||
@@ -209,7 +211,6 @@ const getData = async (flag) => {
|
||||
// 继续学习 , 获取学习历史接口
|
||||
// 滚动到最下面
|
||||
scrollToBottomNow()
|
||||
choiceTeacher.value = body.choiceTeacher
|
||||
sendMessage({
|
||||
"commond" : 'STDY',
|
||||
"body" : {
|
||||
@@ -587,8 +588,8 @@ const stdyId = ref('')
|
||||
const stdyBatch = ref('')
|
||||
const logId = ref('')
|
||||
// ws 初始化逻辑
|
||||
const initsocketTask = async () => {
|
||||
await socketStore.creatSocket()
|
||||
const initsocketTask = () => {
|
||||
socketStore.creatSocket()
|
||||
unref(SocketObj).on('message', (res)=>{
|
||||
const { rtnCode, body, commond } = JSON.parse(res.data)
|
||||
if(rtnCode === '0000'){
|
||||
|
||||
@@ -415,6 +415,13 @@ import {
|
||||
onShow(()=>{
|
||||
if(watchFlag.value === 1) return
|
||||
socketStore?.createSocket?.()
|
||||
sendMessage({
|
||||
"commond" : 'ASK-START',
|
||||
"body" : {
|
||||
mascotId: mascotId.value,
|
||||
deviceImei: ''
|
||||
}
|
||||
})
|
||||
})
|
||||
onUnload(()=>{
|
||||
watchFlag.value = 1
|
||||
|
||||
Reference in New Issue
Block a user