|
@@ -0,0 +1,79 @@
|
|
|
|
+<template>
|
|
|
|
+ <div id="live">
|
|
|
|
+ <el-row>
|
|
|
|
+ <el-col :span="24" class="style">
|
|
|
|
+ <el-col :span="24" class="top">
|
|
|
|
+ <NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="24" class="main">
|
|
|
|
+ <liveframe :liveList="liveList"></liveframe>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ </div>
|
|
|
|
+</template>
|
|
|
|
+
|
|
|
|
+<script>
|
|
|
|
+import liveframe from './live/live.vue';
|
|
|
|
+import NavBar from '@/layout/common/topTitle.vue';
|
|
|
|
+import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
|
+const { mapActions: liveroom } = createNamespacedHelpers('liveroom');
|
|
|
|
+export default {
|
|
|
|
+ metaInfo: { title: '直播列表' },
|
|
|
|
+ name: 'live',
|
|
|
|
+ props: {},
|
|
|
|
+ components: {
|
|
|
|
+ NavBar, //头部导航
|
|
|
|
+ liveframe, //直播列表
|
|
|
|
+ },
|
|
|
|
+ data: function() {
|
|
|
|
+ return {
|
|
|
|
+ title: '',
|
|
|
|
+ isleftarrow: '',
|
|
|
|
+ transitionName: 'fade',
|
|
|
|
+ navShow: true,
|
|
|
|
+ // 直播列表
|
|
|
|
+ liveList: [],
|
|
|
|
+ };
|
|
|
|
+ },
|
|
|
|
+ created() {
|
|
|
|
+ this.search();
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+ ...liveroom(['query']),
|
|
|
|
+ async search() {
|
|
|
|
+ const res = await this.query({ status: '1' });
|
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
|
+ this.$set(this, `liveList`, res.data);
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ computed: { ...mapState(['user']) },
|
|
|
|
+ mounted() {
|
|
|
|
+ this.title = this.$route.meta.title;
|
|
|
|
+ this.isleftarrow = this.$route.meta.isleftarrow;
|
|
|
|
+ },
|
|
|
|
+ watch: {
|
|
|
|
+ $route(to, from) {
|
|
|
|
+ this.title = to.meta.title;
|
|
|
|
+ this.isleftarrow = to.meta.isleftarrow;
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+};
|
|
|
|
+</script>
|
|
|
|
+
|
|
|
|
+<style lang="less" scoped>
|
|
|
|
+.style {
|
|
|
|
+ width: 100%;
|
|
|
|
+ min-height: 667px;
|
|
|
|
+ position: relative;
|
|
|
|
+ background-color: #f9fafc;
|
|
|
|
+}
|
|
|
|
+.top {
|
|
|
|
+ height: 46px;
|
|
|
|
+ overflow: hidden;
|
|
|
|
+}
|
|
|
|
+.main {
|
|
|
|
+ min-height: 570px;
|
|
|
|
+}
|
|
|
|
+</style>
|