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

缺少参数

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