Files
ClassContent/历届学生/逯帅帅/项目开发/上课项目/uniapp在包河/pages/videolive/videolive.vue
2024-09-27 02:06:13 +08:00

76 lines
1.7 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<div class="big">
<top></top>
<videoes :src="live.play_url"></videoes>
<div class="apps">
<p class="p1">{{ live.title }}</p>
<p class="p2">{{ live.viewer_count }}人预约</p>
<div class="jianjie">
<div class="left">
<img src="/static/img/icon/give_thumbs-up.png" />
<p>{{ live.collection_count }}</p>
</div>
<div class="right" @click="dianji">
<p>简介</p>
<img
:src="
stat
? '/static/img/icon/open-close.png'
: '/static/img/icon/open-just.png'
"
/>
<div class="aaa" v-show="stat">{{ live.des }}</div>
</div>
</div>
<div class="msg" v-if="live.appointment_count == 2">
<p>{{ live.start_time }}</p>
<img src="/static/img/yuyue.png" />
</div>
</div>
<comment></comment>
</div>
</template>
<script>
//appointment_count==0表示正在直播,appointment_count==2表示有预约
export default {
data() {
return {
stat: false,
live: [],
el:{}
};
},
created() {
this.liveDetail();
console.log('----------',this.el.id);
},
onLoad(el){
this.el=el;
},
methods: {
dianji() {
this.stat = !this.stat;
},
//直播详情接口
async liveDetail() {
let res = await this.$http.index.liveDetail({
//id:478,482
live_id: this.el.id,
});
this.live = res.live;
console.log(this.live);
},
},
};
</script>
<style lang='less' scoped>
@import "../../common/less/page/vidiolive.less";
uni-video {
width: 100%;
height: 422rpx;
}
</style>