guhongwei 5 年 前
コミット
3f501ceea0
3 ファイル変更44 行追加1 行削除
  1. 1 1
      src/layout/live/head.vue
  2. 6 0
      src/router/index.js
  3. 37 0
      src/views/live/home.vue

+ 1 - 1
src/layout/live/head.vue

@@ -31,7 +31,7 @@
           <div class="info">
             <ul>
               <li :class="isTab('index') ? 'active' : ''">
-                <a @click="turnTo('index')" target="">首页</a>
+                <a @click="turnTo('home')" target="">首页</a>
               </li>
               <li class="">
                 <a @click="turnTo('hall_index')">直播大厅</a>

+ 6 - 0
src/router/index.js

@@ -78,6 +78,12 @@ const live = [
     name: 'live_list',
     component: () => import('../views/live/hall/liveList.vue'),
   },
+  {
+    path: '/live/home',
+    meta: { title: '直播首页', subSite: true },
+    name: 'live_home',
+    component: () => import('../views/live/home.vue'),
+  },
 ];
 
 const routes = [

+ 37 - 0
src/views/live/home.vue

@@ -0,0 +1,37 @@
+<template>
+  <div id="home">
+    <el-row>
+      <el-col :span="24" class="home">
+        nihao
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'home',
+  props: {},
+  components: {},
+  data: () => ({}),
+  created() {},
+  methods: {},
+  computed: {
+    ...mapState(['user']),
+    pageTitle() {
+      return `${this.$route.meta.title}`;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.w_1200 {
+  width: 1200px;
+  margin: 0 auto;
+}
+</style>