+
-

1.
+

{{index+1}}.
{{ list.contentName }}
@@ -810,16 +809,6 @@
audioPlay() {
//console.log("开始播放");
let $this = this;
- // if(this.contentData.status!=9){
- // let completeType=this.curriculumData.completeSetup;
- // if(completeType==0){
- // //默认5秒后学习完成.
- // $this.handleTimeout= setTimeout(function() {$this.saveStudyInfo();}, 5000); //5秒后记录学习完成
- // }else{
- // //先记录进行中的学习内容
- // this.saveStudyItem();
- // }
- // }
},
audioPause() {
//console.log("暂停");
@@ -834,7 +823,7 @@
apiCoursePortal.detail(this.courseId, false).then(rs => {
if (rs.status == 200) {
//设置必须的字段
- if (rs.result.course.type == 20) {
+ if (rs.result.course.type == 20) { //有目录课程
rs.result.sections.forEach(sec => {
sec.status = 0; //加入状态表未开始
rs.result.contents.forEach(c => {
@@ -844,6 +833,19 @@
});
});
this.sectionList = rs.result.sections;
+ }else if(rs.result.course.type==10){ //无目录课程
+ rs.result.contents.forEach(c => {
+ c.status = 0; //
+ c.studyItemId = '';
+ c.lastStudyTime = 0;
+ if(c.sortIndex==2){
+ c.contentName='作业';
+ }else if(c.sortIndex==3){
+ c.contentName='考试';
+ }else if(c.sortIndex==4){
+ c.contentName='评估';
+ }
+ });
}
this.courseInfo = rs.result.course;
this.teachers = rs.result.teachers;
@@ -870,6 +872,7 @@
this.loadAuthorInfo(rs.result.teachers, userIds);
}
this.contentList = rs.result.contents;
+ //处理内容的名称
this.totalContent = rs.result.contents.length;
//加载学习的数据
this.loadStudyData();