From 4200f1b952432175d6a1737869ce253b59eeec1d Mon Sep 17 00:00:00 2001 From: 18571350067 Date: Tue, 28 Dec 2021 19:01:10 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=BE=E4=BB=B6=E9=A2=84=E8=A7=88=E6=A0=B9?= =?UTF-8?q?=E6=8D=AE=E8=A7=86=E9=A2=91=E6=98=BE=E7=A4=BA=E5=AE=83=E7=9A=84?= =?UTF-8?q?=E5=B0=81=E9=9D=A2=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/course/CoursewareAddOrUpdate.vue | 2 -- src/views/course/CoursewarePreview.vue | 12 +++++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) 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] + } },