课件预览根据视频显示它的封面图
This commit is contained in:
parent
36c9db5960
commit
4200f1b952
|
@ -526,7 +526,6 @@ export default {
|
||||||
this.fileUpload.textForm.courseId = this.$route.query.courseId
|
this.fileUpload.textForm.courseId = this.$route.query.courseId
|
||||||
this.fileUpload.textForm.type = this.fileUpload.tabkey
|
this.fileUpload.textForm.type = this.fileUpload.tabkey
|
||||||
this.fileUpload.textForm.videoPath = this.videoPath
|
this.fileUpload.textForm.videoPath = this.videoPath
|
||||||
console.log('aaaaaa', this.fileUpload.textForm)
|
|
||||||
this.fileUpload.textForm.ifResources = this.$route.query.ifResources || 0
|
this.fileUpload.textForm.ifResources = this.$route.query.ifResources || 0
|
||||||
let form = {}
|
let form = {}
|
||||||
form = this.fileUpload.textForm
|
form = this.fileUpload.textForm
|
||||||
|
@ -606,7 +605,6 @@ export default {
|
||||||
this.fileUpload.videoForm = this.courseware
|
this.fileUpload.videoForm = this.courseware
|
||||||
this.fileUpload.videoForm.ifResources = this.ifResources || 0;
|
this.fileUpload.videoForm.ifResources = this.ifResources || 0;
|
||||||
this.fileUpload.videoForm.disabled = false
|
this.fileUpload.videoForm.disabled = false
|
||||||
console.log("1111111",this.fileUpload.videoForm);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.courseware.type == '2') {
|
if (this.courseware.type == '2') {
|
||||||
|
|
|
@ -105,6 +105,7 @@ export default {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
images:[],
|
||||||
type: 1,
|
type: 1,
|
||||||
isactive: 0,
|
isactive: 0,
|
||||||
queryParam: { coursewareId: this.$route.query.coursewareId || this.coursewareId },
|
queryParam: { coursewareId: this.$route.query.coursewareId || this.coursewareId },
|
||||||
|
@ -128,7 +129,7 @@ export default {
|
||||||
// src: this.videoPath,
|
// src: this.videoPath,
|
||||||
// },
|
// },
|
||||||
],
|
],
|
||||||
poster: 'https://pica.zhimg.com/v2-c79ec963f532b2ad2749d5c71353c0d0_1440w.jpg?source=172ae18b', //封面图片
|
// poster: 'https://pica.zhimg.com/v2-c79ec963f532b2ad2749d5c71353c0d0_1440w.jpg?source=172ae18b', //封面图片
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -139,6 +140,11 @@ export default {
|
||||||
//课件内容
|
//课件内容
|
||||||
this.courseware = res.data
|
this.courseware = res.data
|
||||||
if (this.courseware.videoList.length > 0) {
|
if (this.courseware.videoList.length > 0) {
|
||||||
|
//视频截取的封面图
|
||||||
|
if (this.courseware.image != '' || this.courseware.image) {
|
||||||
|
this.images = this.courseware.image.split(",");
|
||||||
|
this.playerOptions.poster = this.images[0];
|
||||||
|
}
|
||||||
//课件视频展现
|
//课件视频展现
|
||||||
if (this.courseware.type == '1') this.play(this.courseware.videoList[0].path, 0)
|
if (this.courseware.type == '1') this.play(this.courseware.videoList[0].path, 0)
|
||||||
|
|
||||||
|
@ -172,6 +178,10 @@ export default {
|
||||||
// 加载视频
|
// 加载视频
|
||||||
this.playerOptions.sources = []
|
this.playerOptions.sources = []
|
||||||
this.playerOptions.sources.push({ type: 'video/mp4', src: path })
|
this.playerOptions.sources.push({ type: 'video/mp4', src: path })
|
||||||
|
console.log("index",index);
|
||||||
|
console.log("images",this.images);
|
||||||
|
this.playerOptions.poster = this.images[index]
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue