mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-10 19:36:43 +08:00
首页页面
This commit is contained in:
@@ -770,7 +770,8 @@ export default {
|
||||
apiCoursePortal.detail(this.courseId,false).then(rs => {
|
||||
if (rs.status == 200) {
|
||||
//设置必须的字段
|
||||
rs.result.sections.forEach(sec => {
|
||||
if(rs.result.course.type == 20) {
|
||||
rs.result.sections.forEach(sec => {
|
||||
sec.status = 0; //加入状态表未开始
|
||||
rs.result.contents.forEach(c => {
|
||||
c.status = 0; //初始化状态 ,未开始
|
||||
@@ -779,6 +780,7 @@ export default {
|
||||
});
|
||||
});
|
||||
this.sectionList = rs.result.sections;
|
||||
}
|
||||
this.courseInfo = rs.result.course;
|
||||
this.teachers = rs.result.teachers;
|
||||
if (rs.result.teachers && rs.result.teachers.length > 0) {
|
||||
@@ -836,24 +838,26 @@ export default {
|
||||
}
|
||||
});
|
||||
});
|
||||
//如果没有,就定位第一项内容
|
||||
if (playIndex === -1) {
|
||||
// this.showRes(this.contentList[0]);
|
||||
this.showRes(this.catalogTree[0].children[0])
|
||||
} else {
|
||||
this.showRes(this.contentList[playIndex]);
|
||||
}
|
||||
|
||||
if(this.courseInfo.type == 10) {
|
||||
this.showRes(this.contentList[0]);
|
||||
} else {
|
||||
//如果没有,就定位第一项内容
|
||||
if (playIndex === -1) {
|
||||
// this.showRes(this.contentList[0]);
|
||||
this.showRes(this.catalogTree[0].children[0])
|
||||
} else {
|
||||
this.showRes(this.contentList[playIndex]);
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
this.$message.error('您还未报名');
|
||||
if (this.courseInfo.type == 10) {
|
||||
location.href = this.webBaseUrl + '/course/micro?id=' + this.courseId;
|
||||
} else {
|
||||
// if (this.courseInfo.type == 10) {
|
||||
// location.href = this.webBaseUrl + '/course/micro?id=' + this.courseId;
|
||||
// } else {
|
||||
location.href = this.webBaseUrl + '/course/detail?id=' + this.courseId;
|
||||
}
|
||||
// }
|
||||
}
|
||||
} else {
|
||||
this.$message.error(res.message);
|
||||
|
||||
Reference in New Issue
Block a user