提交 726818a2 编写于 作者: guofeng.chen's avatar guofeng.chen

修改课件

上级 9072ab5d
......@@ -85,7 +85,7 @@ export default {
cover.style.height = '100%';
cover.style.background = `url(${coverImg}) no-repeat center center`;
cover.style.backgroundSize = '50px auto';
cover.style.backgroundColor = 'rgba(255, 255, 255, .85)';
cover.style.backgroundColor = 'rgba(255, 255, 255, .95)';
cover.onclick = () => {
if (!this.$store.getters.logged) {
this.$store.dispatch('goLogin');
......
......@@ -220,6 +220,7 @@ export default {
}
this.reportLeave();
this.switchUrl(opts);
this.player.autoplay = true;
if (!this.enable) {
return;
}
......@@ -227,7 +228,9 @@ export default {
if (this.loaded) {
this.player.play();
this.isPaused = false;
this.reportOnOff(1);
if (!this.player.paused) {
this.reportOnOff(1);
}
return null;
} else {
return setTimeout(() => {
......
......@@ -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 = 5328 } = this.$route.query;
const projectId = this.projectId || 34037;
const { courseId = 6 } = this.$route.query;
const projectId = this.projectId || 797;
this.showLoading = true;
this.GET(`/contents/courses/${courseId}/pcCourseInfo`, { projectId }).then(res => {
this.showLoading = false;
......@@ -201,7 +201,7 @@ export default {
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 : '');
this.pdfUrl = curtLecture.courseware ? getPdfFileUrl(curtLecture.courseware.filePath) : '';
// 付费课程-请去App查看;或可试看且时长为0
let enable = true;
if (showFlag === 10 || (trySeeFlag && !trySeeTime)) {
......@@ -245,7 +245,7 @@ export default {
lecture.courseware = lectureObj[lectureId]
}
lecture.lectureNameText = `${j + 1}.${lecture.lectureName}`;
lecture.statusText = lecture.progress === 0 ? '未开始' : (lecture.progress === 1 ? '已学习' : `已学${lecture.progress * 100}%`);
lecture.statusText = lecture.progress === 0 ? '未开始' : (lecture.progress === 1 ? '已学习' : `已学${parseInt(lecture.progress * 100)}%`);
let btnText = '';
if (showFlag === 10 || (trySeeFlag && !trySeeTime)) {
btnText = ''; // 不可看
......@@ -322,7 +322,7 @@ export default {
this.coverType = 0;
}
this.curtLectureId = lecture.lectureId;
this.pdfUrl = getPdfFileUrl(lecture.courseware ? lecture.courseware.filePath : '');
this.pdfUrl = lecture.courseware ? getPdfFileUrl(lecture.courseware.filePath) : '';
let history = 0;
if (lecture.progress < 1) {
history = lecture.lastTime === 1 ? 0 : lecture.lastTime
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册