82 lines
1.5 KiB
Vue
82 lines
1.5 KiB
Vue
<template>
|
||
<div>
|
||
<top></top>
|
||
<videoes :src='videoUrl.src'></videoes>
|
||
<view class="end-title">
|
||
<view @tap="change(0)" :class="{ btna: btnnum == 0 }">频道</view>
|
||
<view @tap="change(1)" :class="{ btna: btnnum == 1 }">评论</view>
|
||
</view>
|
||
<view class="end-cont" :class="{ dis: btnnum == 0 }">
|
||
<tvlist></tvlist>
|
||
</view>
|
||
<view class="end-cont" :class="{ dis: btnnum == 1 }">
|
||
<comment :comment-list="CommentArr"></comment>
|
||
</view>
|
||
</div>
|
||
</template>
|
||
|
||
<script>
|
||
export default {
|
||
//此页面需要调包河TV评论接口,拿到值保存,然后传到comment组件中去
|
||
data() {
|
||
return {
|
||
btnnum: 0,
|
||
videoUrl: [],
|
||
CommentArr: [],
|
||
dataList: [],
|
||
};
|
||
},
|
||
onLoad(el) {
|
||
this.dataList = el;
|
||
},
|
||
created() {
|
||
console.log(this.dataList.id);
|
||
console.log(this.dataList.url);
|
||
console.log(this.videoUrl.src);
|
||
|
||
this.videoUrl.push({
|
||
type: "audio/x-mpegurl",
|
||
src: this.dataList.url,
|
||
});
|
||
this.getTvComment();
|
||
},
|
||
methods: {
|
||
change(e) {
|
||
this.btnnum = e;
|
||
},
|
||
async getTvComment() {
|
||
let res = await this.$http.index.channelComment({
|
||
object_id: this.dataList.id,
|
||
});
|
||
this.CommentArr = res.list;
|
||
},
|
||
|
||
},
|
||
};
|
||
</script>
|
||
|
||
<style scoped>
|
||
.end-title {
|
||
display: flex;
|
||
height: 120rpx;
|
||
line-height: 120rpx;
|
||
}
|
||
.end-title view {
|
||
flex-grow: 1;
|
||
text-align: center;
|
||
}
|
||
.end-cont {
|
||
display: none;
|
||
}
|
||
.btna {
|
||
color: #ffffff;
|
||
color: red;
|
||
}
|
||
.dis {
|
||
display: block;
|
||
}
|
||
uni-video {
|
||
width: 100%;
|
||
}
|
||
</style>
|