课程学习-从指定知识点开始,
This commit is contained in:
+25
-19
@@ -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(()=>{
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<view class="blue-ball">
|
||||
<view class="ball"></view>
|
||||
</view>
|
||||
<view class="item-label">
|
||||
<view class="item-label" @click="toDetail(item)">
|
||||
<view class="fz-30 font_pf fw-400 mb-30">知识点0{{ index + 1 }}</view>
|
||||
<view class="fz-30 font_pf fw-400 mb-36">{{ item.pgrphContent }}</view>
|
||||
</view>
|
||||
@@ -20,12 +20,14 @@
|
||||
|
||||
|
||||
import common from '@/common/common';
|
||||
|
||||
const emit = defineEmits(['toStudyPrgh'])
|
||||
|
||||
const props = defineProps({
|
||||
modelValue: Object
|
||||
})
|
||||
|
||||
const toDetail = (item) => {
|
||||
emit('toStudyPrgh', item)
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
<introduceVue v-model="form"></introduceVue>
|
||||
</view>
|
||||
<view class="point" v-if="tabAct == 1">
|
||||
<knowledge v-model="form"></knowledge>
|
||||
<knowledge v-model="form" @toStudyPrgh="toStudyPrgh"></knowledge>
|
||||
</view>
|
||||
<view class="evaluate" v-if="tabAct == 2">
|
||||
<comment ref="commentRef" :crsNum="form.crsNum" :imgId="form.imgId"></comment>
|
||||
@@ -107,6 +107,9 @@
|
||||
commentRef.value.getData();
|
||||
}
|
||||
});
|
||||
const toStudyPrgh = (info)=>{
|
||||
common.navigateTo('/pages/course/study?crsNum='+crsNum.value+'&crsId='+form.value.crsId+'&pgrphId=' + info.pgrphId)
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
Reference in New Issue
Block a user