diff --git a/src/views/course/CoursewareAddOrUpdate.vue b/src/views/course/CoursewareAddOrUpdate.vue index a227c38..d3354bf 100644 --- a/src/views/course/CoursewareAddOrUpdate.vue +++ b/src/views/course/CoursewareAddOrUpdate.vue @@ -526,7 +526,6 @@ export default { this.fileUpload.textForm.courseId = this.$route.query.courseId this.fileUpload.textForm.type = this.fileUpload.tabkey this.fileUpload.textForm.videoPath = this.videoPath - console.log('aaaaaa', this.fileUpload.textForm) this.fileUpload.textForm.ifResources = this.$route.query.ifResources || 0 let form = {} form = this.fileUpload.textForm @@ -606,7 +605,6 @@ export default { this.fileUpload.videoForm = this.courseware this.fileUpload.videoForm.ifResources = this.ifResources || 0; this.fileUpload.videoForm.disabled = false - console.log("1111111",this.fileUpload.videoForm); } if (this.courseware.type == '2') { diff --git a/src/views/course/CoursewarePreview.vue b/src/views/course/CoursewarePreview.vue index 05e46b1..c476095 100644 --- a/src/views/course/CoursewarePreview.vue +++ b/src/views/course/CoursewarePreview.vue @@ -105,6 +105,7 @@ export default { }, data() { return { + images:[], type: 1, isactive: 0, queryParam: { coursewareId: this.$route.query.coursewareId || this.coursewareId }, @@ -128,7 +129,7 @@ export default { // 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 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) @@ -172,6 +178,10 @@ export default { // 加载视频 this.playerOptions.sources = [] this.playerOptions.sources.push({ type: 'video/mp4', src: path }) + console.log("index",index); + console.log("images",this.images); + this.playerOptions.poster = this.images[index] + } },