From 236aad7a70b173ce5060df5924827cfab19ed982 Mon Sep 17 00:00:00 2001 From: "@fawn-nine" <1271023382@qq.com> Date: Wed, 19 Jun 2024 16:24:56 +0800 Subject: [PATCH 1/2] 66 --- pages/course/illustrate.vue | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/pages/course/illustrate.vue b/pages/course/illustrate.vue index d7ea551..5f90fc1 100644 --- a/pages/course/illustrate.vue +++ b/pages/course/illustrate.vue @@ -35,10 +35,11 @@ - +
+ {{videoData}}
@@ -159,7 +160,7 @@ // musicPlay }, created() { - // this.getLive();//获取播放凭证 + // this.getLive();//获取播放凭证 }, //方法 @@ -167,12 +168,14 @@ // 获取数据 getLive(playAuthsss) { //playAuth 是播放凭证 通过后端自己根据api去获取,返回时不知道为什么结束会带有 = 有时候甚至是2个 所以要截取等号 不然不能播放 - var playAuth = playAuthsss.replace(/=/g, ""); + var playAuth = this.playAuth.replace(/=/g, ""); + // var playAuth = playAuthsss this.videoData = { // ...res.video,//视频其他信息 videoId: this.videoId,//阿里云视频id - playAuth: playAuth,//阿里云播放凭证 + playAuth: this.playAuth,//阿里云播放凭证 }; + console.log('到这') this.playAuth = playAuth; this.$forceUpdate(); @@ -350,8 +353,8 @@ this.curId = id if (this.courseInfo.mediaType == 1 && this.courseInfo.media != '') { this.videoId = this.courseInfo.media - this.videoUrl = await this.getVideoPath(this.courseInfo.media) - this.getLive(this.videoUrl) + this.playAuth = await this.getVideoPath(this.courseInfo.media) + this.getLive(this.playAuth) console.log() // this.videoData = { // videoId: this.videoId,//阿里云视频id @@ -456,9 +459,9 @@ export default { checkValue() { console.log(this.videoId, this.videoData.playAuth, "1111888888") if (!this.videoData.playAuth) { - setTimeout(() => { - this.checkValue(); - }, 2000); + // setTimeout(() => { + // this.checkValue(); + // }, 2000); } else { this.getLive(); } From 30b7e89f0517166c18c66c30b65dd0088665f44f Mon Sep 17 00:00:00 2001 From: "@fawn-nine" <1271023382@qq.com> Date: Wed, 19 Jun 2024 17:16:42 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=81=A2=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/course/illustrate.vue | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pages/course/illustrate.vue b/pages/course/illustrate.vue index 5f90fc1..6338110 100644 --- a/pages/course/illustrate.vue +++ b/pages/course/illustrate.vue @@ -34,12 +34,11 @@ - - + + @@ -54,6 +53,7 @@ +