提交 dec61419 编写于 作者: guangjun.yang's avatar guangjun.yang

Merge branch 'dev-coursedetail-0817' of...

Merge branch 'dev-coursedetail-0817' of http://192.168.110.53/com.pica.cloud.education.frontend/pica-professional-exam into dev-coursedetail-0817

* 'dev-coursedetail-0817' of http://192.168.110.53/com.pica.cloud.education.frontend/pica-professional-exam:
  修改播放
  修改课件
  缺少参数
......@@ -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,14 +220,17 @@ export default {
}
this.reportLeave();
this.switchUrl(opts);
this.player.autoplay = true;
if (!this.enable) {
return;
}
const loop = () => {
if (this.loaded) {
this.player.play();
if (!this.player.paused) {
this.isPaused = false;
this.reportOnOff(1);
}
return null;
} else {
return setTimeout(() => {
......
......@@ -198,10 +198,10 @@ 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 : '');
this.pdfUrl = curtLecture.courseware ? getPdfFileUrl(curtLecture.courseware.filePath) : '';
// 付费课程-请去App查看;或可试看且时长为0
let enable = true;
if (showFlag === 10 || (trySeeFlag && !trySeeTime)) {
......@@ -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 };
......@@ -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
......@@ -561,7 +561,7 @@ export default {
border-radius: 15px;
}
}
/deep/.next-countdown{
.next-countdown{
position: absolute;
color: #fff;
right: 10px;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册