reghao 1 năm trước cách đây
mục cha
commit
64ced4d97b
1 tập tin đã thay đổi với 109 bổ sung81 xóa
  1. 109 81
      src/router/index.js

+ 109 - 81
src/router/index.js

@@ -54,22 +54,22 @@ const FavlistImage = () => import('views/my/FavlistImage')
 const HistoryIndex = () => import('views/my/History')
 const CamList = () => import('views/cam/CamList')
 
-// 发布稿件
-const PostPublishVideo = () => import('components/upload/PublishVideo')
-const PostPublishAudio = () => import('components/upload/PublishAudio')
-const PostPublishAlbum = () => import('components/upload/PublishImage')
-const PostPublishArticle = () => import('components/upload/PublishArticle')
-const PostPublishFile = () => import('components/upload/PublishFile')
-
+// ********************************************************************************************************************
 // 稿件列表
+const PostList = () => import('views/post/PostList')
+const PostPublishVideo = () => import('components/upload/PublishVideo')
 const UserPostVideo = () => import('views/post/VideoPost')
 const PostEditVideo = () => import('components/upload/EditVideo')
+const PostPublishAudio = () => import('components/upload/PublishAudio')
 const UserPostAudio = () => import('views/post/AudioPost')
 const PostEditAudio = () => import('components/upload/EditAudio')
+const PostPublishAlbum = () => import('components/upload/PublishImage')
 const UserPostImage = () => import('views/post/ImagePost')
 const PostEditImage = () => import('components/upload/EditImage')
+const PostPublishArticle = () => import('components/upload/PublishArticle')
 const UserPostArticle = () => import('views/post/ArticlePost')
 const PostEditArticle = () => import('components/upload/EditArticle')
+const PostPublishFile = () => import('components/upload/PublishFile')
 
 // ********************************************************************************************************************
 // 使用安装路由插件
@@ -154,6 +154,20 @@ const routes = [
       }
     ]
   },
+  {
+    path: '/post',
+    name: 'PostList',
+    component: PostList,
+    meta: { needAuth: true },
+    children: [
+      {
+        path: '/post/video',
+        name: '视频稿件',
+        component: UserPostVideo,
+        meta: { needAuth: true }
+      },
+    ]
+  },
   {
     path: '/my/post/list',
     name: 'MyPostList',
@@ -261,12 +275,6 @@ const routes = [
     ]
   },
   // ********************************************************************************************************************
-  {
-    path: '/timeline',
-    name: 'TimelineIndex',
-    component: TimelineIndex,
-    meta: { needAuth: true }
-  },
   {
     path: '/my/post/edit/video/:videoId',
     name: 'PostEditVideo',
@@ -292,70 +300,78 @@ const routes = [
     meta: { needAuth: true }
   },
   {
-    path: '/',
+    path: '/user',
     name: 'Index',
     component: Index,
     meta: { needAuth: true },
     children: [
       {
         path: '',
-        name: 'Home',
-        component: Home,
+        name: 'User',
+        component: () => import('@/views/404.vue'),
         meta: { needAuth: false }
       },
       {
-        path: '/video',
-        name: 'VideoIndex',
-        component: VideoIndex,
+        path: '/user/:id',
+        name: 'UserHome',
+        component: UserHome,
         meta: { needAuth: false }
       },
       {
-        path: '/shortvideo',
-        name: 'ShortVideoIndex',
-        component: ShortVideoIndex,
+        path: '/user/:id/video',
+        name: 'UserVideo',
+        component: UserVideo,
         meta: { needAuth: false }
       },
       {
-        path: '/video/:id',
-        name: 'VideoPage',
-        component: VideoPage,
+        path: '/user/:id/image',
+        name: 'UserImage',
+        component: UserImage,
         meta: { needAuth: false }
       },
       {
-        path: '/vidlist/:id',
-        name: 'VideoList',
-        component: VideoList,
+        path: '/user/:id/audio',
+        name: 'UserAudio',
+        component: UserAudio,
         meta: { needAuth: false }
       },
       {
-        path: '/audio',
-        name: 'AudioIndex',
-        component: AudioIndex,
+        path: '/user/:id/article',
+        name: 'UserArticle',
+        component: UserArticle,
         meta: { needAuth: false }
       },
       {
-        path: '/audio/:audioId',
-        name: 'AudioPage',
-        component: AudioPage,
+        path: '/user/:id/following',
+        name: 'UserRelation',
+        component: UserRelation,
         meta: { needAuth: false }
       },
       {
-        path: '/image',
-        name: 'ImageIndex',
-        component: ImageIndex,
+        path: '/user/:id/follower',
+        name: 'UserRelation',
+        component: UserRelation,
         meta: { needAuth: false }
-      },
+      }
+    ]
+  },
+  {
+    path: '/',
+    name: 'Index',
+    component: Index,
+    meta: { needAuth: true },
+    children: [
       {
-        path: '/image/album/:albumId',
-        name: 'ImagePage',
-        component: ImagePage,
+        path: '',
+        name: 'Home',
+        component: Home,
         meta: { needAuth: false }
       },
       {
-        path: '/article',
-        name: 'ArticleIndex',
-        component: ArticleIndex,
-        meta: { needAuth: false }
+        path: '/timeline',
+        name: 'TimelineIndex',
+        component: TimelineIndex,
+        meta: { needAuth: true }
       },
       {
         path: '/stream',
@@ -363,12 +379,6 @@ const routes = [
         component: MessageStream,
         meta: { needAuth: false }
       },
-      {
-        path: '/article/:articleId',
-        name: 'ArticlePage',
-        component: ArticlePage,
-        meta: { needAuth: false }
-      },
       {
         path: '/discover',
         name: 'DiscoverIndex',
@@ -382,63 +392,81 @@ const routes = [
         meta: { needAuth: false }
       },
       {
-        path: '/user/:id',
-        name: 'UserHome',
-        component: UserHome,
+        path: '/map',
+        name: 'AMap',
+        component: AMap,
         meta: { needAuth: false }
       },
       {
-        path: '/user/:id/video',
-        name: 'UserVideo',
-        component: UserVideo,
+        path: '/bdmap',
+        name: 'BdMap',
+        component: BdMap,
         meta: { needAuth: false }
       },
       {
-        path: '/user/:id/image',
-        name: 'UserImage',
-        component: UserImage,
+        path: '/amap',
+        name: 'AMap',
+        component: AMap,
         meta: { needAuth: false }
       },
       {
-        path: '/user/:id/audio',
-        name: 'UserAudio',
-        component: UserAudio,
+        path: '/shortvideo',
+        name: 'ShortVideoIndex',
+        component: ShortVideoIndex,
         meta: { needAuth: false }
       },
       {
-        path: '/user/:id/article',
-        name: 'UserArticle',
-        component: UserArticle,
+        path: '/video',
+        name: 'VideoIndex',
+        component: VideoIndex,
         meta: { needAuth: false }
       },
       {
-        path: '/user/:id/following',
-        name: 'UserRelation',
-        component: UserRelation,
+        path: '/video/:id',
+        name: 'VideoPage',
+        component: VideoPage,
         meta: { needAuth: false }
       },
       {
-        path: '/user/:id/follower',
-        name: 'UserRelation',
-        component: UserRelation,
+        path: '/vidlist/:id',
+        name: 'VideoList',
+        component: VideoList,
         meta: { needAuth: false }
       },
       {
-        path: '/map',
-        name: 'AMap',
-        component: AMap,
+        path: '/audio',
+        name: 'AudioIndex',
+        component: AudioIndex,
         meta: { needAuth: false }
       },
       {
-        path: '/bdmap',
-        name: 'BdMap',
-        component: BdMap,
+        path: '/audio/:audioId',
+        name: 'AudioPage',
+        component: AudioPage,
         meta: { needAuth: false }
       },
       {
-        path: '/amap',
-        name: 'AMap',
-        component: AMap,
+        path: '/image',
+        name: 'ImageIndex',
+        component: ImageIndex,
+        meta: { needAuth: false }
+      },
+      {
+        path: '/image/album/:albumId',
+        name: 'ImagePage',
+        component: ImagePage,
+        meta: { needAuth: false }
+      },
+      {
+        path: '/article',
+        name: 'ArticleIndex',
+        component: ArticleIndex,
+        meta: { needAuth: false }
+      },
+      {
+        path: '/article/:articleId',
+        name: 'ArticlePage',
+        component: ArticlePage,
         meta: { needAuth: false }
       }
     ]