diff --git a/src/pages/course/study.vue b/src/pages/course/study.vue
index 50aedcda..cfa8209c 100644
--- a/src/pages/course/study.vue
+++ b/src/pages/course/study.vue
@@ -165,6 +165,19 @@ const getData = async (flag) => {
if(body.stdyProgressFlag === 'N'){
step.value = 1
}else{
+ if(startPgrphId.value){
+ scrollToBottomNow()
+ choiceTeacher.value = body.choiceTeacher
+ sendMessage({
+ "commond" : 'STDY',
+ "body" : {
+ crsId: crsId.value,
+ teacherNo: choiceTeacher.value
+ }
+ })
+ step.value = 2
+ return
+ }
common.show('提示信息', '此门课程已有学习历史,请选择是否继续学习?',true, '重新开始','继续学习').then((res) => {
if(res) {
// 继续学习 , 获取学习历史接口
@@ -280,27 +293,20 @@ const pgrphNum = ref(1)
const showOrder = ref(0)
const isLastPgrph = ref(false)
// 获取段落
-const getGraphInfoUnStudy = () => {
+const getGraphInfoUnStudy = (flag = 0) => {
console.log(isLastPgrph.value)
let _id = new Date().getTime() + 'id'
- // if(isLastPgrph.value){
- // talkingList.value.push({
- // chatContent: '您已学完全部知识点!',
- // userInfo: {...choiceTeacherInfo.value},
- // type: 7,
- // id: _id
- // })
- // scrollToBottomNow()
- // // common.msg('您已学完全部知识点!')
- // return
- // }
- textChartApi({
- processType: 'PRGH-STDY',
- requestBody: JSON.stringify({
+ let _data = {
crsId: crsId.value,
stdyId: unref(stdyId),
stdyBatch: unref(stdyBatch)
- })
+ }
+ if(flag === 1 && !!startPgrphId.value){
+ _data.pgrphId = startPgrphId.value
+ }
+ textChartApi({
+ processType: 'PRGH-STDY',
+ requestBody: JSON.stringify(_data)
}).then(res=>{
let _body = res.body|| {}
console.log(_body)
@@ -504,7 +510,7 @@ const initsocketTask = () => {
stdyId.value = body.stdyId || ''
stdyBatch.value = body.stdyBatch || ''
logId.value = body.logId || ''
- getGraphInfoUnStudy()
+ getGraphInfoUnStudy(1)
}
}else{
if(['0005', 'QQ0005'].includes(res.rtnCode)) {
@@ -523,15 +529,15 @@ const sendMessage = (data) => {
unref(SocketObj).send(data)
}
// ws 结束
-
+const startPgrphId = ref('')
onLoad((params) => {
crsId.value = params.crsId||'';
crsNum.value = params.crsNum||'';
+ startPgrphId.value = params.pgrphId||'';
});
const showTalkingModel = ref(false)
// 录音
onMounted(()=>{
- console.log('init/111')
getData('1');
})
// onShow(()=>{
diff --git a/src/pages/courseDetail/components/knowledge.vue b/src/pages/courseDetail/components/knowledge.vue
index a43abe4e..05962621 100644
--- a/src/pages/courseDetail/components/knowledge.vue
+++ b/src/pages/courseDetail/components/knowledge.vue
@@ -4,7 +4,7 @@
-
+
知识点0{{ index + 1 }}
{{ item.pgrphContent }}
@@ -20,12 +20,14 @@
import common from '@/common/common';
-
+ const emit = defineEmits(['toStudyPrgh'])
const props = defineProps({
modelValue: Object
})
-
+ const toDetail = (item) => {
+ emit('toStudyPrgh', item)
+ }