reghao hai 23 horas
pai
achega
794d2fbaaf
Modificáronse 5 ficheiros con 30 adicións e 126 borrados
  1. 0 5
      src/components/layout/LoginBar.vue
  2. 1 2
      src/router/index.js
  3. 1 1
      src/router/user.js
  4. 28 61
      src/views/Index.vue
  5. 0 57
      src/views/vod/Index.vue

+ 0 - 5
src/components/layout/LoginBar.vue

@@ -15,11 +15,6 @@
         mode="horizontal"
       >
         <el-menu-item index="1">
-          <a href="/" style="text-decoration-line: none">
-            <span style="color: #007bff">VOD</span>
-          </a>
-        </el-menu-item>
-        <el-menu-item index="2">
           <a href="/blog" style="text-decoration-line: none">
             <span style="color: #007bff">Blog</span>
           </a>

+ 1 - 2
src/router/index.js

@@ -17,7 +17,6 @@ import BackgroundBlogRouter from './background_blog'
 
 // 懒加载引入页面组件,es6语法
 // ********************************************************************************************************************
-const Index = () => import('views/vod/Index')
 const ShareVideo = () => import('views/home/ShareVideo')
 
 const Home = () => import('views/home/Home')
@@ -32,10 +31,10 @@ const ImagePage = () => import('views/home/ImagePage')
 const PlaylistIndex = () => import('views/home/PlaylistIndex')
 const PlaylistView = () => import('views/home/PlaylistView')
 
+const Index = () => import('views/Index')
 const Login = () => import('views/Login')
 const Register = () => import('views/Register')
 const Forgot = () => import('views/Forgot')
-const Index0 = () => import('views/Index')
 const Background = () => import('views/admin/Background')
 const Dashboard = () => import('views/admin/Dashboard')
 

+ 1 - 1
src/router/user.js

@@ -1,4 +1,4 @@
-const Index = () => import('views/vod/Index')
+const Index = () => import('views/Index')
 // ********************************************************************************************************************
 // 用户前台主页
 // ********************************************************************************************************************

+ 28 - 61
src/views/Index.vue

@@ -1,90 +1,57 @@
 <template>
   <el-container>
     <el-main>
-      <el-col
-        v-for="(more, index) in moreList"
-        :key="index"
-        :md="6"
-        :sm="12"
-        :xs="12"
-        style="padding: 5px;"
-      >
-        <el-card class="box-card">
-          <div slot="header" class="clearfix">
-            <el-row>
-              <el-col :md="4">
-                <router-link target="_blank" :to="more.link">
-                  <el-avatar>
-                    <el-image :src="more.coverUrl" />
-                  </el-avatar>
-                </router-link>
-              </el-col>
-              <el-col :md="16">
-                <el-row style="padding: 5px;">
-                  <span v-html="more.title" />
-                </el-row>
-                <el-row style="padding: 5px;">
-                  <span v-html="more.desc" />
-                </el-row>
-              </el-col>
-            </el-row>
-          </div>
-        </el-card>
-      </el-col>
+      <nav-bar />
+      <router-view />
     </el-main>
   </el-container>
 </template>
 
 <script>
+import NavBar from 'components/layout/NavBar'
+
 export default {
   name: 'Index',
+  components: {
+    NavBar
+  },
   data() {
     return {
-      moreList: []
+      isCollapse: false,
+      navList: [
+        { path: '/my', name: '我的帐号', icon: 'el-icon-upload' }
+      ]
     }
   },
-  watch: {
+  /*  watch: {
     // 地址栏 url 发生变化时重新加载本页面
     $route() {
       this.$router.go()
     }
-  },
+  },*/
   created() {
     document.title = 'tnbapp'
-    this.getData()
   },
   methods: {
-    getData() {
-      this.moreList.push(
-        {
-          title: 'vod',
-          desc: 'VOD',
-          link: '/',
-          coverUrl: ''
-        },
-        {
-          title: 'blog',
-          desc: 'Blog',
-          link: '/blog',
-          coverUrl: ''
-        },
-        {
-          title: 'disk',
-          desc: 'Disk',
-          link: '/disk',
-          coverUrl: ''
-        },
-        {
-          title: 'devops',
-          desc: 'DevOps',
-          link: '/bg',
-          coverUrl: ''
-        }
-      )
+    handleOpen(key, keyPath) {
+      console.log(key, keyPath)
+    },
+    handleClose(key, keyPath) {
+      console.log(key, keyPath)
     }
   }
 }
 </script>
 
 <style>
+.el-menu-vertical-demo:not(.el-menu--collapse) {
+  width: 200px;
+  min-height: 800px;
+}
+
+#aside-style {
+  min-width: 120px;
+  max-width: 240px;
+  width: 30%;
+}
 </style>

+ 0 - 57
src/views/vod/Index.vue

@@ -1,57 +0,0 @@
-<template>
-  <el-container>
-    <el-main>
-      <nav-bar />
-      <router-view />
-    </el-main>
-  </el-container>
-</template>
-
-<script>
-import NavBar from 'components/layout/NavBar'
-
-export default {
-  name: 'Index',
-  components: {
-    NavBar
-  },
-  data() {
-    return {
-      isCollapse: false,
-      navList: [
-        { path: '/my', name: '我的帐号', icon: 'el-icon-upload' }
-      ]
-    }
-  },
-  /*  watch: {
-    // 地址栏 url 发生变化时重新加载本页面
-    $route() {
-      this.$router.go()
-    }
-  },*/
-  created() {
-    document.title = 'tnbapp'
-  },
-  methods: {
-    handleOpen(key, keyPath) {
-      console.log(key, keyPath)
-    },
-    handleClose(key, keyPath) {
-      console.log(key, keyPath)
-    }
-  }
-}
-</script>
-
-<style>
-.el-menu-vertical-demo:not(.el-menu--collapse) {
-  width: 200px;
-  min-height: 800px;
-}
-
-#aside-style {
-  min-width: 120px;
-  max-width: 240px;
-  width: 30%;
-}
-</style>