first commit

This commit is contained in:
编码猿
2024-09-27 02:06:13 +08:00
commit 852d94fbb9
36760 changed files with 3274413 additions and 0 deletions

View File

@@ -0,0 +1,55 @@
<template lang="pug">
.home
van-tabs(v-model='active' @click="changeContent")
van-tab( v-for="(item,index) in TabsTitle" :key="index" :title='item.text')
div(:is="component")
</template>
<script>
// @ is an alias to /src
// import HelloWorld from '@/components/Lower.vue';
import Radio from '@/views/Radio.vue';
import Tv from '@/views/Tv.vue';
import Live from '@/views/Live.vue';
export default {
name: 'Home',
components: {
Radio,
Tv,
Live
},
data() {
return {
active: 0,
component: Radio,
TabsTitle: [
{ id: 0, text: '包河Radio', components: Radio },
{ id: 1, text: '包河TV', components: Tv },
{ id: 2, text: '融媒直播', components: Live },
]
}
},
created() {
this.active = parseInt(this.$route.query.id)
this.component = this.TabsTitle[this.active].components
},
methods: {
changeContent(index) {
this.active = index
this.$router.push({
path: '/',
query: {
id: index
}
})
this.component = this.TabsTitle[this.active].components
}
}
};
</script>
<style scoped lang="stylus">
@import "~@styl/home.styl"
</style>

View File

@@ -0,0 +1,37 @@
<template lang="pug">
.live.content
.live_item(v-for="(i,index) in liveList")
router-link(:to="{ name: 'info', query: { id: i.id } }")
.item_content
img(:src="i.coverimage")
.view(v-if="i.status == 3") 直播时间:{{i.start_time}}
.status(:class="i.status == 10 ? 'orrgan' : i.status == 3 ? 'green' : i.status == 1 || i.status == 2 ? 'fs': ''") {{ i.status == 10 ? '正在直播' : i.status == 3 ? '直播预告' : i.status == 1 || i.status == 2 ? '回放': '' }}
.nums {{ i.status == 10 ? `${i.number}人看过` : i.status == 3 ? `${i.appointment_count}人预约` : i.status == 1 || i.status == 2 ? `${i.number}人看过`: '' }}
.text {{i.title}}
</template>
<script>
export default {
name: "Live",
data() {
return {
liveList: ""
}
},
created() {
this.getLiveList()
},
methods: {
async getLiveList() {
let res = await this.$http.IndexService.liveList({})
this.liveList = res.list
console.log("this.liveList: ", this.liveList)
}
}
}
</script>
<style scoped lang="stylus">
*@import "~@styl/live.styl"
</style>

View File

@@ -0,0 +1,71 @@
<template lang="pug">
.Newsdetail
headerComponents
.content
.newtitle
h2 暴降17度,合肥天气明起大反转,还有暴雨来袭!
.newtitleb
span 2019-10-07
span 08:00
span 浏览量238.0万
.list
h2 {{titel.title}}}
span {{create.create_time}}}
commentComponents
OpenCommentomponents
</template>
<script>
import headerComponents from "@/components/header.vue"
import commentComponents from "@/components/comment.vue"
import OpenCommentomponents from "@/components/OpenComment.vue"
import VideoComponents from "@/components/videPlayer.vue"
export default {
comments: {
headerComponents,
commentComponents,
OpenCommentomponents,
VideoComponents,
},
data() {
return {
id: this.$route.query.id,
titel: {},
create: {}
}
},
created() {
this.getnew()
},
methods: {
async getnew() {
let res = await this.$http.IndexService.newsDetail({
Newsdetail: this.id
});
this.titel = res.detail;
this.create = res.create_time
}
}
}
</script>
<style scoped lang="stylus">
.newtitle
width: 9.36rem;
height: 1.227rem;
line-height: 0.72rem;
letter-spacing: 0.013rem;
margin: 0.32rem 0.33rem 0.507rem 0.307rem
h2
font-size: 0.533rem;
color: #333333;
.newtitleb
width: 5.333rem;
height: 0.307rem;
font-size: 0.32rem;
color: #999999;
display flex
margin-left 0.293rem
justify-content space-between
</style>

View File

@@ -0,0 +1,113 @@
<template lang="pug">
.play_live
headerComponents
.content
VideoComponents(:videoUrl="playVideo")
.video_message
h2 {{liveList.title}}
.yy {{liveList.collection_count}}人预约
.item
.left
img(src="/img/icon/give_thumbs-up.png")
span {{liveList.like_count}}
.right(@click="showContent")
span 简介
img(v-if="!isShow" src="/img/icon/open-close.png")
img(v-else src="/img/icon/open-just.png")
.jianjie(v-show="isShow") 测试次卧和减肥贝加尔我逼疯就和我不放假好玩吧放假回
commentComponents(:commentList="CommentList")
OpenCommentomponents
</template>
<script>
import headerComponents from "@/components/header.vue"
import commentComponents from "@/components/comment.vue"
import OpenCommentomponents from "@/components/OpenComment.vue"
import VideoComponents from "@/components/videPlayer.vue"
export default {
components: {
headerComponents,
commentComponents,
OpenCommentomponents,
VideoComponents
},
data() {
return {
id: this.$route.query.id,
CommentList: [], // 保存直播的评论数据
liveList: {},
playVideo: {},
isShow: false
}
},
created() {
this.getInfo()
this.liveComment();
console.log(this.id)
},
methods: {
showContent() {
this.isShow = !this.isShow
},
async liveComment() {
let res = await this.$http.IndexService.liveComment({
object_id: this.id
})
this.CommentList = res.list
},
async getInfo() {
let res = await this.$http.IndexService.liveDetail({
live_id: this.id
});
this.liveList = res.live;
this.playVideo = {
type: "application/x-mpegURL",
src: this.liveList.hls_play_url
}
console.log("详情:",this.liveList)
}
}
}
</script>
<style scoped lang="stylus">
.video_message
padding 0.653rem 0.32rem 0 0.37rem
box-sizing border-box
h2
font-size: 0.48rem;
color: #333333;
margin-bottom 0.24rem
.yy
font-family: PingFangSC-Medium;
font-size: 0.307rem;
color: #999999;
.jianjie
margin-top 0.547rem
margin-bottom 0.52rem
font-size: 0.373rem;
line-height: 0.627rem;
color: #999999;
.item
display flex
justify-content space-between
span
font-size: 0.32rem;
color: #999999;
.left
img
width: 0.347rem;
height: 0.36rem;
vertical-align: middle;
margin-right 0.133rem
.right
img
width: 0.227rem;
height: 0.133rem;
margin-left 0.147rem
vertical-align: middle;
</style>

View File

@@ -0,0 +1,57 @@
<template lang="pug">
.radio.content
.radio_info
h2 {{RadioInfo.title}}
img(class="back" :src="RadioInfo.logo")
img.gif(:src="showPlay ? one : two")
.radio_action
img.refresh(src="/img/icon/live_broadcast_icon.png")
img.start(@click="StartPlay" :src="showPlay ? start : pause")
img.list(src="/img/icon/program_list_icon.png")
VideoPlayComponents(ref="video" :videoUrl="playUrl" :isHidden="true")
</template>
<script>
import VideoPlayComponents from "@/components/videPlayer.vue"
export default {
components: {
VideoPlayComponents
},
data() {
return {
RadioInfo: {},
showPlay: true, // 控制图片的切换 true radio_up false radio_stop
start: '/img/radio_up.png',
pause: '/img/radio_stop.png',
one: '/img/sound_spectrum.png',
two: '/img/sound_spectrum.gif',
playUrl: {}
}
},
created() {
this.getRadioList()
},
methods: {
async getRadioList() {
this.RadioInfo = await this.$http.IndexService.radio({});
this.playUrl = {
type: "application/x-mpegURL",
src: this.RadioInfo.play_url
}
},
StartPlay() {
if (this.showPlay) {
this.$refs.video.play()
} else {
this.$refs.video.pause()
}
this.showPlay = !this.showPlay
}
}
}
</script>
<style scoped lang="stylus">
@import "~@styl/radio.styl"
</style>

View File

@@ -0,0 +1,56 @@
<template lang="pug">
.ShareVideo
headerComponents
.content
VideoComponents(:videoUrl="videoObj")
RecommendComponents(:theme="1" :recommendList="recommend")
commentComponents
OpenCommentomponents
</template>
<script>
import headerComponents from "@/components/header.vue"
import VideoComponents from "@/components/videPlayer.vue"
import RecommendComponents from "@/components/Recommend.vue"
import commentComponents from "@/components/comment.vue"
import OpenCommentomponents from "@/components/OpenComment.vue"
export default {
components: {
VideoComponents,
headerComponents,
commentComponents,
RecommendComponents,
OpenCommentomponents
},
data() {
return {
id: this.$route.query.id,
comment: [],
detail: [],
recommend: [],
videoObj: {}
}
},
created() {
this.getVideInfo()
},
methods: {
async getVideInfo() {
let res = await this.$http.IndexService.videoDetail({
id: this.id
});
this.comment = res.comment
this.detail = res.detail
this.videoObj = {
type: "video/mp4",
src: this.detail.play_url
}
this.recommend = res.recommend
}
}
}
</script>
<style scoped lang="stylus">
</style>

View File

@@ -0,0 +1,33 @@
<template lang="pug">
.tv
.item(v-for="(item,index) in TvList" :key="index")
span {{item.title}}
img(src="/img/icon_gb.png")
</template>
<script>
export default {
data() {
return {
TvList: []
}
},
created() {
this.getTvList()
},
methods: {
async getTvList() {
// let res = await this.$http.get({
// url: '/channelList',
// data: { page: 1, count: 15 }
// });
this.TvList = await this.$http.IndexService.getTvList({ page: 1, count: 15 });
}
}
}
</script>
<style scoped lang="stylus">
@import "~@styl/tv.styl"
</style>

View File

@@ -0,0 +1,22 @@
<template lang="pug">
.tv ceshi
</template>
<script>
export default {
data() {
},
created() {
},
methods: {
async getTvList() {
}
}
}
</script>
<style scoped lang="stylus">
@import "~@styl/test.styl"
</style>

View File

@@ -0,0 +1,49 @@
<template lang="pug">
.newInfo
van-swipe(v-if=" Object.keys(interactDetail).length != 0 " @change='onChange')
van-swipe-item(v-for="(item,index) in interactDetail.image" :key="index")
img(:src="item")
template(#indicator)
.custom-indicator {{ currentIndex + 1 }}/{{interactDetail.image.length}}
</template>
<script>
export default {
data() {
return {
id: this.$route.query.id,
interactDetail: {},
currentIndex: 0
}
},
created() {
this.getTzInfo()
},
methods: {
onChange(index) {
this.currentIndex = index;
},
async getTzInfo() {
let res = await this.$http.IndexService.interactDetail({
id: this.id
});
this.interactDetail = res.detail
console.log("帖子详情:", this.interactDetail)
}
}
}
</script>
<style scoped lang="stylus">
.custom-indicator {
position: absolute;
right: 5px;
bottom: 5px;
padding: 2px 5px;
font-size: 12px;
background: rgba(0, 0, 0, 0.1);
}
</style>