提交 50c89089 编写于 作者: guofeng.chen's avatar guofeng.chen

修改全屏

上级 78dce6ac
...@@ -49,11 +49,14 @@ export default { ...@@ -49,11 +49,14 @@ export default {
.course-covers-wrapper { .course-covers-wrapper {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
left: 0;
top: 50%;
width: 100%; width: 100%;
height: 210px; height: 210px;
background: rgba(0, 0, 0, 0.8); background: rgba(0, 0, 0, 0.8);
justify-content: center; justify-content: center;
align-content: center; align-content: center;
transform: translate3d(0, -50%, 0);
.tips { .tips {
display: inline-block; display: inline-block;
margin-bottom: 15px; margin-bottom: 15px;
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* GlobalWorkerOptions.workerSrc需要一个加载路径 * GlobalWorkerOptions.workerSrc需要一个加载路径
*/ */
import pdfJS from 'pdfjs-dist/es5/build/pdf'; import pdfJS from 'pdfjs-dist/es5/build/pdf';
pdfJS.GlobalWorkerOptions.workerSrc = 'https://cdn.bootcdn.net/ajax/libs/pdf.js/2.4.456/pdf.worker.min.js'; pdfJS.GlobalWorkerOptions.workerSrc = '//cdn.bootcdn.net/ajax/libs/pdf.js/2.4.456/pdf.worker.min.js';
import coverImg from '@/images/course/lock-big.png'; import coverImg from '@/images/course/lock-big.png';
export default { export default {
...@@ -37,7 +37,6 @@ export default { ...@@ -37,7 +37,6 @@ export default {
}, },
methods: { methods: {
async drawPDF() { async drawPDF() {
console.log('_____url_______', this.url);
if (!this.url) { if (!this.url) {
return; return;
} }
...@@ -86,7 +85,7 @@ export default { ...@@ -86,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, .8)'; cover.style.backgroundColor = 'rgba(255, 255, 255, .85)';
cover.onclick = () => { cover.onclick = () => {
if (!this.$store.getters.logged) { if (!this.$store.getters.logged) {
this.$store.dispatch('goLogin'); this.$store.dispatch('goLogin');
......
...@@ -102,6 +102,10 @@ import { formatLeftTimeObj } from '@/utils'; ...@@ -102,6 +102,10 @@ import { formatLeftTimeObj } from '@/utils';
export default { export default {
name: 'pica-video', name: 'pica-video',
props: { props: {
coverType: {
type: Number,
default: 0,
},
download: { download: {
type: Function, type: Function,
default: () => {} default: () => {}
...@@ -374,6 +378,7 @@ export default { ...@@ -374,6 +378,7 @@ export default {
this.finish = true; this.finish = true;
this.showReplay = true; this.showReplay = true;
this.provedOver = true; this.provedOver = true;
this.isFullScreen = false;
}, },
// 播放结束 // 播放结束
onEnded() { onEnded() {
...@@ -383,6 +388,11 @@ export default { ...@@ -383,6 +388,11 @@ export default {
this.player.style.display = 'none'; this.player.style.display = 'none';
} }
this.reportOnOff(2); this.reportOnOff(2);
this.$nextTick(() => {
if (this.coverType > 0 && this.coverType !== 13) {
this.isFullScreen = false;
}
})
}, },
onError() { onError() {
if (this.url) { if (this.url) {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="course-detail"> <div class="course-detail">
<!-- 视频 --> <!-- 视频 -->
<div class="video-box"> <div class="video-box">
<pica-video ref="picaVideo" @onVideoEnd="onVideoEnd" @onReplay="onReplay"> <pica-video ref="picaVideo" :coverType="coverType" @onVideoEnd="onVideoEnd" @onReplay="onReplay">
<!-- 试看结束 --> <!-- 试看结束 -->
<div class="cover" v-if="logged && coverType === 1"> <div class="cover" v-if="logged && coverType === 1">
<course-covers coverTips="试看结束<br />请来云鹊医App学习完整课程" :isSingle="true" rightBtnText="学习完整课程" @btnClick="btnClick" /> <course-covers coverTips="试看结束<br />请来云鹊医App学习完整课程" :isSingle="true" rightBtnText="学习完整课程" @btnClick="btnClick" />
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<course-covers coverTips="本课程为付费课程,请来云鹊医App学习" :isSingle="true" rightBtnText="去云鹊医App" @btnClick="btnClick" /> <course-covers coverTips="本课程为付费课程,请来云鹊医App学习" :isSingle="true" rightBtnText="去云鹊医App" @btnClick="btnClick" />
</div> </div>
<!-- 下一个提示 --> <!-- 下一个提示 -->
<div class="next-countdown" v-if="coverType === 3">3秒后播放下一节</div> <div class="next-countdown" v-if="coverType === 13">3秒后播放下一节</div>
<!-- 未学完提示 --> <!-- 未学完提示 -->
<div class="cover" v-if="logged && coverType === 4"> <div class="cover" v-if="logged && coverType === 4">
<course-covers coverTips="您已学习至最后一节<br />但本课程中仍有未学完的内容" :isSingle="true" rightBtnText="继续学完本课程" @btnClick="btnClick" /> <course-covers coverTips="您已学习至最后一节<br />但本课程中仍有未学完的内容" :isSingle="true" rightBtnText="继续学完本课程" @btnClick="btnClick" />
...@@ -165,7 +165,7 @@ export default { ...@@ -165,7 +165,7 @@ export default {
}, },
methods: { methods: {
getCourseInfo() { getCourseInfo() {
const { courseId = 2 } = this.$route.query; const { courseId = 6 } = this.$route.query;
const projectId = this.projectId || 797; 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 => {
...@@ -386,7 +386,7 @@ export default { ...@@ -386,7 +386,7 @@ export default {
} }
} else { // 3秒后播放下一个 } else { // 3秒后播放下一个
let next = chapters[curtI]['lectures'][curtJ + 1] || chapters[curtI + 1]['lectures'][0]; let next = chapters[curtI]['lectures'][curtJ + 1] || chapters[curtI + 1]['lectures'][0];
this.coverType = 3; this.coverType = 13;
setTimeout(() => { setTimeout(() => {
this.selectLecture(next); this.selectLecture(next);
}, 3000) }, 3000)
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册