mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-07 18:06:47 +08:00
课程学习考试
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
<view class="paperinfo-item">
|
<view class="paperinfo-item">
|
||||||
<u-cell-group :border="false">
|
<u-cell-group :border="false">
|
||||||
<u-cell :border="false" icon="/static/images/icon/exam-duration.png" title="考试时长" :value="info.testDuration+'分钟'"></u-cell>
|
<u-cell :border="false" icon="/static/images/icon/exam-duration.png" title="考试时长" :value="info.testDuration+'分钟'"></u-cell>
|
||||||
<u-cell :border="false" icon="/static/images/icon/exam-times.png" title="考试次数" :value="info.times"></u-cell>
|
<u-cell :border="false" icon="/static/images/icon/exam-times.png" title="考试次数" :value="allowTimes"></u-cell>
|
||||||
<u-cell :border="false" icon="/static/images/icon/exam-score.png" title="及格线" :value="info.passLine"></u-cell>
|
<u-cell :border="false" icon="/static/images/icon/exam-score.png" title="及格线" :value="info.passLine"></u-cell>
|
||||||
<u-cell :border="false" v-if="studyItemId!=''" title="考试成绩" :value="lastScore"></u-cell>
|
<u-cell :border="false" v-if="studyItemId!=''" title="考试成绩" :value="lastScore"></u-cell>
|
||||||
<!--应该再显示最终成绩,最高一次或最后一次得分-->
|
<!--应该再显示最终成绩,最高一次或最后一次得分-->
|
||||||
@@ -74,6 +74,7 @@
|
|||||||
show:0,
|
show:0,
|
||||||
toLetter:numberToLetter,
|
toLetter:numberToLetter,
|
||||||
testType:getQuestionType,
|
testType:getQuestionType,
|
||||||
|
allowTimes:'无限制',
|
||||||
has:true,
|
has:true,
|
||||||
startTime:null,
|
startTime:null,
|
||||||
testStart: false,
|
testStart: false,
|
||||||
@@ -98,8 +99,10 @@
|
|||||||
loadExamInfo(){
|
loadExamInfo(){
|
||||||
apiCourse.getExam(this.content.id).then(res=>{
|
apiCourse.getExam(this.content.id).then(res=>{
|
||||||
if(res.status==200){
|
if(res.status==200){
|
||||||
|
if(res.result.times>0){
|
||||||
|
this.allowTimes=res.result.times;
|
||||||
|
}
|
||||||
this.info=res.result;
|
this.info=res.result;
|
||||||
|
|
||||||
}else if(res.status==404){
|
}else if(res.status==404){
|
||||||
//没有找到考试信息
|
//没有找到考试信息
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@@ -436,10 +436,7 @@
|
|||||||
treePopupWidth:'400px',
|
treePopupWidth:'400px',
|
||||||
fileBaseUrl:this.$config.fileUrl,
|
fileBaseUrl:this.$config.fileUrl,
|
||||||
curSection:{},//当前所在的章
|
curSection:{},//当前所在的章
|
||||||
curContent:{
|
curContent:{id:'',studyItemId:'',status:1},//当前的内容
|
||||||
studyItemId:'',
|
|
||||||
status:1
|
|
||||||
},//当前的内容
|
|
||||||
conLink:{openType:1,url:''},//外连接内容
|
conLink:{openType:1,url:''},//外连接内容
|
||||||
curriculumData:{url:'',isDrag:true,completeSetup:1,setupTage:0,second:0},// 课件内容
|
curriculumData:{url:'',isDrag:true,completeSetup:1,setupTage:0,second:0},// 课件内容
|
||||||
|
|
||||||
@@ -603,6 +600,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
let showConId=this.initContentId;
|
let showConId=this.initContentId;
|
||||||
|
//console.log(showConId,'showConId');
|
||||||
if(rs.result.course.type >10){
|
if(rs.result.course.type >10){
|
||||||
rs.result.sections.forEach(sec=>{
|
rs.result.sections.forEach(sec=>{
|
||||||
sec.status=1;//加入状态表未开始
|
sec.status=1;//加入状态表未开始
|
||||||
@@ -610,6 +608,7 @@
|
|||||||
c.status=1;//初始化状态 ,未开始
|
c.status=1;//初始化状态 ,未开始
|
||||||
c.studyItemId='';//初始化字段,学习条目id
|
c.studyItemId='';//初始化字段,学习条目id
|
||||||
c.lastStudyTime=0;
|
c.lastStudyTime=0;
|
||||||
|
|
||||||
if(showConId!='' && c.id==showConId){
|
if(showConId!='' && c.id==showConId){
|
||||||
$this.curContent=c;
|
$this.curContent=c;
|
||||||
$this.curSection=sec;
|
$this.curSection=sec;
|
||||||
@@ -642,6 +641,13 @@
|
|||||||
rs.result.contents.splice(delIdx,1);
|
rs.result.contents.splice(delIdx,1);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
//定位初始化数据
|
||||||
|
rs.result.contents.forEach((c,cidx) => {
|
||||||
|
if(showConId!='' && c.id==showConId){
|
||||||
|
$this.curContent=c;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
this.contentList=rs.result.contents;//内容列表
|
this.contentList=rs.result.contents;//内容列表
|
||||||
this.totalContent=rs.result.contents.length;//一共有向个可以播放的内容
|
this.totalContent=rs.result.contents.length;//一共有向个可以播放的内容
|
||||||
@@ -668,7 +674,7 @@
|
|||||||
})
|
})
|
||||||
});
|
});
|
||||||
//设置正在学习的章节
|
//设置正在学习的章节
|
||||||
if(this.curContent.studyItemId){
|
if(this.curContent.id){
|
||||||
this.playContent(this.curContent,0);
|
this.playContent(this.curContent,0);
|
||||||
//this.curSection=this.sectionList[0];
|
//this.curSection=this.sectionList[0];
|
||||||
}else{
|
}else{
|
||||||
@@ -816,7 +822,7 @@
|
|||||||
this.curriculumData.url=con.content;
|
this.curriculumData.url=con.content;
|
||||||
}
|
}
|
||||||
this.blobUrl=this.fileBaseUrl+this.curriculumData.url;
|
this.blobUrl=this.fileBaseUrl+this.curriculumData.url;
|
||||||
console.log(this.blobUrl,'this.blobUrl');
|
//console.log(this.blobUrl,'this.blobUrl');
|
||||||
}
|
}
|
||||||
this.curContent=con;
|
this.curContent=con;
|
||||||
this.catalogShow=false;
|
this.catalogShow=false;
|
||||||
|
|||||||
Reference in New Issue
Block a user