diff --git a/src/pages/course/study.vue b/src/pages/course/study.vue index 69db110d..783baf9e 100644 --- a/src/pages/course/study.vue +++ b/src/pages/course/study.vue @@ -163,6 +163,7 @@ const { statusBarHeight } = uni.getWindowInfo() const pageTopPadding = computed(() => statusBarHeight + 'px') +const isContinue = ref('N') // 初始化数据 const getData = async flag => { try { @@ -199,12 +200,14 @@ const getData = async flag => { // 继续学习 , 获取学习历史接口 // 滚动到最下面 scrollToBottomNow() + isContinue.value = "Y" sendMessage({ commond: 'STDY', body: { crsId: crsId.value, teacherNo: choiceTeacher.value, - studyType: isPreview.value ? 'P' : 'S' + studyType: isPreview.value ? 'P' : 'S', + isContinue: isContinue.value } }) step.value = 2 @@ -361,13 +364,16 @@ const canAnswerText = computed(() => { return '每个问题最多连续发送五次答案!' }) +const oldStdyId = ref('') // 获取段落 const getGraphInfoUnStudy = (flag = 0) => { let _id = new Date().getTime() + 'id' let _data = { crsId: crsId.value, stdyId: unref(stdyId), - stdyBatch: unref(stdyBatch) + stdyBatch: unref(stdyBatch), + oldStdyId: unref(oldStdyId), + isContinue: isContinue.value } if (flag === 1 && !!startPgrphId.value) { _data.pgrphId = startPgrphId.value @@ -510,7 +516,9 @@ const nextQuestionSuccess = (info, type = 'next') => { requestBody: JSON.stringify({ stdyId: unref(stdyId), pgrphId: info?.pgrphId, - logId: info?.logId + logId: info?.logId, + oldStdyId: unref(oldStdyId), + isContinue: isContinue.value }) }).then(res => { talkingList.value.push({ @@ -659,6 +667,7 @@ const initsocketTask = () => { if (commond === 'STDYBTH' && !stdyId.value) { stdyId.value = body.stdyId || '' stdyBatch.value = body.stdyBatch || '' + oldStdyId.value = body.oldStdyId || '' logId.value = body.logId || '' getGraphInfoUnStudy(1) step.value = 2