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

修改课件

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