Files
ClassContent/历届学生/17届课程/团队练手私活项目/h5share_code/src/views/Home.vue
2024-09-27 02:06:13 +08:00

104 lines
3.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="home">
<van-tabs v-model="active" title-inactive-color="#999999" title-active-color="#000000" line-width="0.307rem">
<van-tab title="包河radio"></van-tab>
<van-tab title="包河TV"></van-tab>
<van-tab title="融媒直播"></van-tab>
<van-tab title="组件测试">
<!-- 不要的注释不要删
VideoPlayback 视频 组件
videoBFUrl:String url地址 不传 会有默认
Recommended 相关推荐 组件
judges 排列格式 true 竖排 false 横排
recommendefLists 格式为 Array
OpenComments 打开评论组件
switch:Boolean true 显示 false 关闭
position:string 控制是否定位 block 不定位 fixed 定位到底部
Header 打卡app 组件
pots:string 控制 top 位置 传数数字
Allcomments 评论组件
commentsList:Array 数据
注:对于所有 Array 格式数据
要求为 数组包含对象格式 [{}]
无默认值
-->
<VideoPlayback :videoBFUrl="musicUrls" ref="child"></VideoPlayback>
<button @click="shutChild">暂停</button>
<button @click="showChild">打开</button>
<Recommended judges="true" :recommendefLists="recommendef"></Recommended>
<OpenComments switch="false" position="fixed"></OpenComments>
<Header pots="30"></Header>
<Allcomments :commentsList="allcommendef"></Allcomments>
</van-tab>
</van-tabs>
<router-view />
</div>
</template>
<script>
import VideoPlayback from "@/components/VideoPlayback.vue"
import Recommended from "@/components/Recommended.vue"
import OpenComments from "@/components/OpenComments.vue"
import Header from "@/components/Header.vue"
import Allcomments from "@/components/Allcomments.vue"
export default {
methods: {
showChild () {
this.$refs.child.videoPlay()
},
shutChild () {
this.$refs.child.videoPause()
}
},
data() {
return {
active: 0,
videoUrls:"https://hmbhresources-1251971253.cos.ap-shanghai.myqcloud.com/image/201910/30/videonew/291.mp4",
musicUrls:'http://pili-live-hls.908broadcast.ahtv.cn/908broadcast/908.m3u8?sign=8d1b27d4b57ffcc817e91c9dbf9218a9&t=5df77fbd',
recommendef:[
{
title: "文章标题dsadasdsadsadasdas",
icon: "https://hmbhresources-1251971253.cos.ap-shanghai.myqcloud.com/image/201910/30/videonew/291.bmp",
create_time: "1970-01-01 08:00:00"
},
{
title: "文章标题dsadasdsadsadasdas",
icon: "https://hmbhresources-1251971253.cos.ap-shanghai.myqcloud.com/image/201910/30/videonew/291.bmp",
create_time: "1970-01-01 08:00:00"
},
{
title: "文章标题dsadasdsadsadasdas",
icon: "https://hmbhresources-1251971253.cos.ap-shanghai.myqcloud.com/image/201910/30/videonew/291.bmp",
create_time: "1970-01-01 08:00:00"
},
{
title: "文章标题dsadasdsadsadasdas",
icon: "https://hmbhresources-1251971253.cos.ap-shanghai.myqcloud.com/image/201910/30/videonew/291.bmp",
create_time: "1970-01-01 08:00:00"
},
],
allcommendef: [
{
content: "这是内容这是内容",
create_time: "2017/7/17",
image: "http://hmbhresources-1251971253.cos.ap-shanghai.myqcloud.com/image/201911/13/1573613951969.jpg",
nick_name: "名称",
praise_count: 2
}
]
}
},
components:{
VideoPlayback,
Recommended,
OpenComments,
Header,
Allcomments
}
}
</script>
<style lang="stylus" scoped>
</style>