|
|
@@ -1,8 +1,12 @@
|
|
|
import VueRouter from 'vue-router'
|
|
|
import Vue from 'vue'
|
|
|
+import MyRouter from './my'
|
|
|
+import AdminRouter from './admin'
|
|
|
+import UserRouter from './user'
|
|
|
import MallRouter from './mall'
|
|
|
import DiskRouter from './disk'
|
|
|
-import AdminRouter from './admin'
|
|
|
+import PostRouter from './post'
|
|
|
+import CamRouter from './cam'
|
|
|
|
|
|
// 懒加载引入页面组件,es6语法
|
|
|
// ********************************************************************************************************************
|
|
|
@@ -17,8 +21,6 @@ const VideoIndex = () => import('views/home/Video')
|
|
|
const ShortVideoIndex = () => import('views/home/ShortVideo')
|
|
|
const VideoPage = () => import('views/home/VideoPage')
|
|
|
const VideoList = () => import('views/home/VideoList')
|
|
|
-const LivePage = () => import('views/cam/LivePage')
|
|
|
-const RecordPage = () => import('views/cam/RecordPage')
|
|
|
const AudioIndex = () => import('views/home/Audio')
|
|
|
const AudioPage = () => import('views/home/AudioPage')
|
|
|
const ImageIndex = () => import('views/home/Image')
|
|
|
@@ -31,330 +33,17 @@ const DiscoverIndex = () => import('views/home/Discover')
|
|
|
const BdMap = () => import('views/home/BdMap')
|
|
|
const AMap = () => import('views/home/AMap')
|
|
|
|
|
|
-// ********************************************************************************************************************
|
|
|
-// 用户前台主页
|
|
|
-const UserHome = () => import('views/user/Home')
|
|
|
-const UserVideo = () => import('views/user/Home')
|
|
|
-const UserImage = () => import('views/user/Home')
|
|
|
-const UserAudio = () => import('views/user/Home')
|
|
|
-const UserArticle = () => import('views/user/Home')
|
|
|
-const UserRelation = () => import('views/user/UserRelation')
|
|
|
-
|
|
|
-// ********************************************************************************************************************
|
|
|
-// 用户后台主页
|
|
|
-const My = () => import('views/my/My')
|
|
|
-const MyProfile = () => import('views/my/MyProfile')
|
|
|
-const MyContact = () => import('views/my/MyContact')
|
|
|
-const MyRealname = () => import('views/my/MyRealname')
|
|
|
-const MessageIndex = () => import('views/my/Message')
|
|
|
-const MyVip = () => import('views/my/MyVip')
|
|
|
-const MyWallet = () => import('views/my/MyWallet')
|
|
|
-const FavlistVideo = () => import('views/my/FavlistVideo')
|
|
|
-const FavlistImage = () => import('views/my/FavlistImage')
|
|
|
-const HistoryIndex = () => import('views/my/History')
|
|
|
-const CamList = () => import('views/cam/CamList')
|
|
|
-
|
|
|
-// ********************************************************************************************************************
|
|
|
-// 稿件列表
|
|
|
-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')
|
|
|
-
|
|
|
// ********************************************************************************************************************
|
|
|
// 使用安装路由插件
|
|
|
Vue.use(VueRouter)
|
|
|
const routes = [
|
|
|
+ MyRouter,
|
|
|
+ AdminRouter,
|
|
|
+ UserRouter,
|
|
|
MallRouter,
|
|
|
DiskRouter,
|
|
|
- AdminRouter,
|
|
|
- {
|
|
|
- path: '/my',
|
|
|
- name: 'My',
|
|
|
- component: My,
|
|
|
- meta: { needAuth: true },
|
|
|
- children: [
|
|
|
- {
|
|
|
- path: '',
|
|
|
- name: '个人资料',
|
|
|
- component: MyProfile,
|
|
|
- meta: { needAuth: true }
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/my/account/contact',
|
|
|
- name: '联系人',
|
|
|
- component: MyContact,
|
|
|
- meta: { needAuth: true }
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/my/account/realname',
|
|
|
- name: '实名认证',
|
|
|
- component: MyRealname,
|
|
|
- meta: { needAuth: true }
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/my/account/vip',
|
|
|
- name: '小会员',
|
|
|
- component: MyVip,
|
|
|
- meta: { needAuth: true }
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/my/account/wallet',
|
|
|
- name: '钱包',
|
|
|
- component: MyWallet,
|
|
|
- meta: { needAuth: true }
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/my/post/publish',
|
|
|
- name: 'MyPostPublish',
|
|
|
- component: My,
|
|
|
- meta: { needAuth: true },
|
|
|
- children: [
|
|
|
- {
|
|
|
- path: '/my/post/publish/video',
|
|
|
- name: '发布视频',
|
|
|
- component: PostPublishVideo,
|
|
|
- meta: { needAuth: true }
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/my/post/publish/audio',
|
|
|
- name: '发布音频',
|
|
|
- component: PostPublishAudio,
|
|
|
- meta: { needAuth: true }
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/my/post/publish/image',
|
|
|
- name: '发布相册',
|
|
|
- component: PostPublishAlbum,
|
|
|
- meta: { needAuth: true }
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/my/post/publish/article',
|
|
|
- name: '发布文章',
|
|
|
- component: PostPublishArticle,
|
|
|
- meta: { needAuth: true }
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/my/post/publish/file',
|
|
|
- name: '发布文件',
|
|
|
- component: PostPublishFile,
|
|
|
- meta: { needAuth: true }
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- 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',
|
|
|
- component: My,
|
|
|
- meta: { needAuth: true },
|
|
|
- children: [
|
|
|
- {
|
|
|
- path: '/my/post/list/video',
|
|
|
- name: '视频稿件',
|
|
|
- component: UserPostVideo,
|
|
|
- meta: { needAuth: true }
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/my/post/list/audio',
|
|
|
- name: '音频稿件',
|
|
|
- component: UserPostAudio,
|
|
|
- meta: { needAuth: true }
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/my/post/list/image',
|
|
|
- name: '相册稿件',
|
|
|
- component: UserPostImage,
|
|
|
- meta: { needAuth: true }
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/my/post/list/article',
|
|
|
- name: '文章稿件',
|
|
|
- component: UserPostArticle,
|
|
|
- meta: { needAuth: true }
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/my/favlist',
|
|
|
- name: 'MyFavlist',
|
|
|
- component: My,
|
|
|
- meta: { needAuth: true },
|
|
|
- children: [
|
|
|
- {
|
|
|
- path: '/my/favlist/video',
|
|
|
- name: '视频收藏',
|
|
|
- component: FavlistVideo,
|
|
|
- meta: { needAuth: true }
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/my/favlist/image',
|
|
|
- name: '相册收藏',
|
|
|
- component: FavlistImage,
|
|
|
- meta: { needAuth: true }
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/my/visit',
|
|
|
- name: 'MyVisit',
|
|
|
- component: My,
|
|
|
- meta: { needAuth: true },
|
|
|
- children: [
|
|
|
- {
|
|
|
- path: '/my/visit',
|
|
|
- name: '浏览记录',
|
|
|
- component: HistoryIndex,
|
|
|
- meta: { needAuth: true }
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/my/message',
|
|
|
- name: 'MyMessage',
|
|
|
- component: My,
|
|
|
- meta: { needAuth: true },
|
|
|
- children: [
|
|
|
- {
|
|
|
- path: '/my/message/receive',
|
|
|
- name: '收到的消息',
|
|
|
- component: MessageIndex,
|
|
|
- meta: { needAuth: true }
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/my/cam',
|
|
|
- name: 'MyCam',
|
|
|
- component: My,
|
|
|
- meta: { needAuth: true },
|
|
|
- children: [
|
|
|
- {
|
|
|
- path: '/my/cam/list',
|
|
|
- name: '摄像头列表',
|
|
|
- component: CamList,
|
|
|
- meta: { needAuth: true }
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/my/cam/live/:camId',
|
|
|
- name: 'LivePage',
|
|
|
- component: LivePage,
|
|
|
- meta: { needAuth: true }
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/my/cam/record/:camId',
|
|
|
- name: 'RecordPage',
|
|
|
- component: RecordPage,
|
|
|
- meta: { needAuth: true }
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- // ********************************************************************************************************************
|
|
|
- {
|
|
|
- path: '/my/post/edit/video/:videoId',
|
|
|
- name: 'PostEditVideo',
|
|
|
- component: PostEditVideo,
|
|
|
- meta: { needAuth: true }
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/my/post/edit/audio/:audioId',
|
|
|
- name: 'PostEditAudio',
|
|
|
- component: PostEditAudio,
|
|
|
- meta: { needAuth: true }
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/my/post/edit/album/:albumId',
|
|
|
- name: 'PostEditImage',
|
|
|
- component: PostEditImage,
|
|
|
- meta: { needAuth: true }
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/my/post/edit/article/:articleId',
|
|
|
- name: 'PostEditArticle',
|
|
|
- component: PostEditArticle,
|
|
|
- meta: { needAuth: true }
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/user',
|
|
|
- name: 'Index',
|
|
|
- component: Index,
|
|
|
- meta: { needAuth: true },
|
|
|
- children: [
|
|
|
- {
|
|
|
- path: '',
|
|
|
- name: 'User',
|
|
|
- component: () => import('@/views/404.vue'),
|
|
|
- meta: { needAuth: false }
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/user/:id',
|
|
|
- name: 'UserHome',
|
|
|
- component: UserHome,
|
|
|
- meta: { needAuth: false }
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/user/:id/video',
|
|
|
- name: 'UserVideo',
|
|
|
- component: UserVideo,
|
|
|
- meta: { needAuth: false }
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/user/:id/image',
|
|
|
- name: 'UserImage',
|
|
|
- component: UserImage,
|
|
|
- meta: { needAuth: false }
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/user/:id/audio',
|
|
|
- name: 'UserAudio',
|
|
|
- component: UserAudio,
|
|
|
- meta: { needAuth: false }
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/user/:id/article',
|
|
|
- name: 'UserArticle',
|
|
|
- component: UserArticle,
|
|
|
- meta: { needAuth: false }
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/user/:id/following',
|
|
|
- name: 'UserRelation',
|
|
|
- component: UserRelation,
|
|
|
- meta: { needAuth: false }
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/user/:id/follower',
|
|
|
- name: 'UserRelation',
|
|
|
- component: UserRelation,
|
|
|
- meta: { needAuth: false }
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
+ PostRouter,
|
|
|
+ CamRouter,
|
|
|
{
|
|
|
path: '/',
|
|
|
name: 'Index',
|