提交 9072ab5d 编写于 作者: guofeng.chen's avatar guofeng.chen

缺少参数

上级 803a2791
......@@ -150,10 +150,10 @@ export default {
this.$store.dispatch('getUserInfo');
}
this.projectId = sessionStorage.getItem('projectId');
if (!this.projectId) {
this.$router.replace('/not-found');
return;
}
// if (!this.projectId) {
// this.$router.replace('/not-found');
// return;
// }
this.getCourseInfo();
this.getCourseQas();
const { height } = this.$el.querySelector('.video-box').getBoundingClientRect();
......@@ -164,8 +164,8 @@ export default {
},
methods: {
getCourseInfo() {
const { courseId = 6 } = this.$route.query;
const projectId = this.projectId || 797;
const { courseId = 5328 } = this.$route.query;
const projectId = this.projectId || 34037;
this.showLoading = true;
this.GET(`/contents/courses/${courseId}/pcCourseInfo`, { projectId }).then(res => {
this.showLoading = false;
......@@ -198,7 +198,7 @@ export default {
}
}
this.course = { ...courseHeader, intro, showFlag, trySeeFlag, trySeeTime };
const [chaptersAll, curtLecture] = this.getAllChapters(chapters, lectureResourceList, lastLecture, showFlag, trySeeFlag);
const [chaptersAll, curtLecture] = this.getAllChapters(chapters, lectureResourceList, lastLecture, showFlag, trySeeFlag, trySeeTime);
this.chapters = chaptersAll;
this.curtLectureId = curtLecture.lectureId;
this.pdfUrl = getPdfFileUrl(curtLecture.courseware ? curtLecture.courseware.filePath : '');
......@@ -227,7 +227,7 @@ export default {
});
},
// 将课件挂在目录上,获取播放id
getAllChapters(chapters, resList, lastLecture, showFlag, trySeeFlag) {
getAllChapters(chapters, resList, lastLecture, showFlag, trySeeFlag, trySeeTime) {
const lectureObj = {};
for (let item of resList) {
lectureObj[item.lectureId] = { ...item };
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册