Merge branch 'stat' of codeup.aliyun.com:6265f483e4166464dc2f9c14/boeu/portal into stat

This commit is contained in:
weinan2087
2022-10-27 18:05:57 +08:00

View File

@@ -1050,11 +1050,19 @@
});
this.sectionList = rs.result.sections;
}else if(rs.result.course.type==10){ //无目录课程
rs.result.contents.forEach(c => {
//如果是多个的话,就需要过滤一下
let indexNum=0;
let delIndexs=[];
rs.result.contents.forEach((c,cidx) => {
c.status = 0; //
c.studyItemId = '';
c.lastStudyTime = 0;
if(c.sortIndex==2){
if(c.sortIndex==1){
indexNum++;
if(indexNum>1){
delIndexs.push(cidx);
}
}else if(c.sortIndex==2){
c.contentName='作业';
}else if(c.sortIndex==3){
c.contentName='考试';
@@ -1062,6 +1070,11 @@
c.contentName='评估';
}
});
if(delIndexs.length>0){
delIndexs.forEach(delIdx=>{
rs.result.contents.splice(delIdx,1);
})
}
}
this.courseInfo = rs.result.course;