Merge branch 'master' of https://gitee.com/wjl2008_admin/medicine_app
This commit is contained in:
@@ -34,11 +34,11 @@
|
|||||||
<view>
|
<view>
|
||||||
<!-- <view v-if="courseInfo.mediaType ==1 && courseInfo.media != ''" style="width: 100%;height: 100%;text-align: center;" v-html="videoHTML">
|
<!-- <view v-if="courseInfo.mediaType ==1 && courseInfo.media != ''" style="width: 100%;height: 100%;text-align: center;" v-html="videoHTML">
|
||||||
</view> -->
|
</view> -->
|
||||||
|
<!-- <view class="container" >
|
||||||
<view class="container" v-if="courseInfo.mediaType ==1 && courseInfo.media != ''">
|
|
||||||
<div ref="videoContent" @tap="renderScript.handleClick" id="url-player-test"
|
<div ref="videoContent" @tap="renderScript.handleClick" id="url-player-test"
|
||||||
:videoData="videoData" :change:videoData="renderScript.receiveMsg"></div>
|
:videoData="videoData" :change:videoData="renderScript.receiveMsg"></div>
|
||||||
</view>
|
</view> -->
|
||||||
|
<!-- {{videoData}} -->
|
||||||
</view>
|
</view>
|
||||||
<!-- <rich-text v-if="courseInfo.content" class="content"
|
<!-- <rich-text v-if="courseInfo.content" class="content"
|
||||||
:nodes="formatRichText(courseInfo.content)"></rich-text> -->
|
:nodes="formatRichText(courseInfo.content)"></rich-text> -->
|
||||||
@@ -53,6 +53,7 @@
|
|||||||
<!-- <music-play :playData="playData"></music-play> -->
|
<!-- <music-play :playData="playData"></music-play> -->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// import musicPlay from '@/components/music.vue'
|
// import musicPlay from '@/components/music.vue'
|
||||||
import $http from '@/config/requestConfig.js';
|
import $http from '@/config/requestConfig.js';
|
||||||
@@ -159,7 +160,7 @@
|
|||||||
// musicPlay
|
// musicPlay
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
// this.getLive();//获取播放凭证
|
// this.getLive();//获取播放凭证
|
||||||
|
|
||||||
},
|
},
|
||||||
//方法
|
//方法
|
||||||
@@ -167,12 +168,14 @@
|
|||||||
// 获取数据
|
// 获取数据
|
||||||
getLive(playAuthsss) {
|
getLive(playAuthsss) {
|
||||||
//playAuth 是播放凭证 通过后端自己根据api去获取,返回时不知道为什么结束会带有 = 有时候甚至是2个 所以要截取等号 不然不能播放
|
//playAuth 是播放凭证 通过后端自己根据api去获取,返回时不知道为什么结束会带有 = 有时候甚至是2个 所以要截取等号 不然不能播放
|
||||||
var playAuth = playAuthsss.replace(/=/g, "");
|
var playAuth = this.playAuth.replace(/=/g, "");
|
||||||
|
// var playAuth = playAuthsss
|
||||||
this.videoData = {
|
this.videoData = {
|
||||||
// ...res.video,//视频其他信息
|
// ...res.video,//视频其他信息
|
||||||
videoId: this.videoId,//阿里云视频id
|
videoId: this.videoId,//阿里云视频id
|
||||||
playAuth: playAuth,//阿里云播放凭证
|
playAuth: this.playAuth,//阿里云播放凭证
|
||||||
};
|
};
|
||||||
|
console.log('到这')
|
||||||
this.playAuth = playAuth;
|
this.playAuth = playAuth;
|
||||||
this.$forceUpdate();
|
this.$forceUpdate();
|
||||||
|
|
||||||
@@ -350,8 +353,8 @@
|
|||||||
this.curId = id
|
this.curId = id
|
||||||
if (this.courseInfo.mediaType == 1 && this.courseInfo.media != '') {
|
if (this.courseInfo.mediaType == 1 && this.courseInfo.media != '') {
|
||||||
this.videoId = this.courseInfo.media
|
this.videoId = this.courseInfo.media
|
||||||
this.videoUrl = await this.getVideoPath(this.courseInfo.media)
|
this.playAuth = await this.getVideoPath(this.courseInfo.media)
|
||||||
this.getLive(this.videoUrl)
|
// this.getLive(this.playAuth)
|
||||||
console.log()
|
console.log()
|
||||||
// this.videoData = {
|
// this.videoData = {
|
||||||
// videoId: this.videoId,//阿里云视频id
|
// videoId: this.videoId,//阿里云视频id
|
||||||
@@ -445,7 +448,9 @@ export default {
|
|||||||
width: '100%', //容器的大小
|
width: '100%', //容器的大小
|
||||||
height: '600rpx', //容器的大小
|
height: '600rpx', //容器的大小
|
||||||
|
|
||||||
}, function(player) { });
|
}, function(player) {
|
||||||
|
console.log('走吗')
|
||||||
|
});
|
||||||
this.player = player;
|
this.player = player;
|
||||||
player.one('canplay', function() {
|
player.one('canplay', function() {
|
||||||
// console.log('canplay', this.player.tag);
|
// console.log('canplay', this.player.tag);
|
||||||
@@ -456,9 +461,9 @@ export default {
|
|||||||
checkValue() {
|
checkValue() {
|
||||||
console.log(this.videoId, this.videoData.playAuth, "1111888888")
|
console.log(this.videoId, this.videoData.playAuth, "1111888888")
|
||||||
if (!this.videoData.playAuth) {
|
if (!this.videoData.playAuth) {
|
||||||
setTimeout(() => {
|
// setTimeout(() => {
|
||||||
this.checkValue();
|
// this.checkValue();
|
||||||
}, 2000);
|
// }, 2000);
|
||||||
} else {
|
} else {
|
||||||
this.getLive();
|
this.getLive();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user