|
|
@@ -1,20 +1,21 @@
|
|
|
import VueRouter from 'vue-router'
|
|
|
import Vue from 'vue'
|
|
|
+import MallRouter from './mall'
|
|
|
+import DiskRouter from './disk'
|
|
|
+import AdminRouter from './admin'
|
|
|
|
|
|
// 懒加载引入页面组件,es6语法
|
|
|
// ********************************************************************************************************************
|
|
|
-// 应用主页
|
|
|
const Index = () => import('views/Index')
|
|
|
+
|
|
|
const Home = () => import('views/home/Index')
|
|
|
const TimelineIndex = () => import('views/home/Timeline')
|
|
|
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')
|
|
|
@@ -26,7 +27,6 @@ const Search = () => import('views/home/Search')
|
|
|
const DiscoverIndex = () => import('views/home/Discover')
|
|
|
const BdMap = () => import('views/home/BdMap')
|
|
|
const AMap = () => import('views/home/AMap')
|
|
|
-const Vip = () => import('views/vip/Vip')
|
|
|
|
|
|
// ********************************************************************************************************************
|
|
|
// 用户前台主页
|
|
|
@@ -43,16 +43,12 @@ 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')
|
|
|
|
|
|
// 发布稿件
|
|
|
@@ -72,45 +68,13 @@ const PostEditImage = () => import('components/upload/EditImage')
|
|
|
const UserPostArticle = () => import('views/post/ArticlePost')
|
|
|
const PostEditArticle = () => import('components/upload/EditArticle')
|
|
|
|
|
|
-// ********************************************************************************************************************
|
|
|
-// 后台主页
|
|
|
-// ********************************************************************************************************************
|
|
|
-const Admin = () => import('views/admin/Admin')
|
|
|
-const SiteConfig = () => import('views/admin/SiteConfig')
|
|
|
-const UserList = () => import('views/admin/UserList')
|
|
|
-const PostList = () => import('views/admin/PostList')
|
|
|
-const DataSource = () => import('views/admin/DataSource')
|
|
|
-
|
|
|
-// ********************************************************************************************************************
|
|
|
-// 网盘主页
|
|
|
-// ********************************************************************************************************************
|
|
|
-const Disk = () => import('views/disk/Disk')
|
|
|
-const DiskOverview = () => import('views/disk/DiskOverview')
|
|
|
-const FileList = () => import('views/disk/FileList')
|
|
|
-const UploadFile = () => import('views/disk/UploadFile')
|
|
|
-const FileTrash = () => import('views/disk/FileTrash')
|
|
|
-const FileImage = () => import('views/disk/FileImage')
|
|
|
-const FileVideo = () => import('views/disk/FileVideo')
|
|
|
-const FileAudio = () => import('views/disk/FileAudio')
|
|
|
-const FileText = () => import('views/disk/FileText')
|
|
|
-
|
|
|
-// ********************************************************************************************************************
|
|
|
-// 商城
|
|
|
-// ********************************************************************************************************************
|
|
|
-const Mall = () => import('views/mall/Mall')
|
|
|
-const Overview = () => import('views/mall/Overview')
|
|
|
-const Cart = () => import('views/mall/Cart')
|
|
|
-const Fav = () => import('views/mall/Fav')
|
|
|
-const Order = () => import('views/mall/Order')
|
|
|
-const ConfirmOrder = () => import('views/mall/ConfirmOrder')
|
|
|
-const Visit = () => import('views/mall/Visit')
|
|
|
-const Pay = () => import('views/mall/Pay')
|
|
|
-const Product = () => import('views/mall/Product')
|
|
|
-
|
|
|
// ********************************************************************************************************************
|
|
|
// 使用安装路由插件
|
|
|
Vue.use(VueRouter)
|
|
|
const routes = [
|
|
|
+ MallRouter,
|
|
|
+ DiskRouter,
|
|
|
+ AdminRouter,
|
|
|
{
|
|
|
path: '/my',
|
|
|
name: 'My',
|
|
|
@@ -279,18 +243,6 @@ const routes = [
|
|
|
component: CamList,
|
|
|
meta: { needAuth: true }
|
|
|
},
|
|
|
- /* {
|
|
|
- path: '/my/cam/live',
|
|
|
- name: '实时录像',
|
|
|
- component: LivePage,
|
|
|
- meta: { needAuth: true }
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/my/cam/record',
|
|
|
- name: '历史录像',
|
|
|
- component: RecordPage,
|
|
|
- meta: { needAuth: true }
|
|
|
- },*/
|
|
|
{
|
|
|
path: '/my/cam/live/:camId',
|
|
|
name: 'LivePage',
|
|
|
@@ -306,175 +258,6 @@ const routes = [
|
|
|
]
|
|
|
},
|
|
|
// ********************************************************************************************************************
|
|
|
- {
|
|
|
- path: '/admin',
|
|
|
- name: 'Admin',
|
|
|
- component: Admin,
|
|
|
- meta: { needAuth: true }
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/admin/site',
|
|
|
- name: '站点',
|
|
|
- component: Admin,
|
|
|
- meta: { needAuth: true },
|
|
|
- children: [
|
|
|
- {
|
|
|
- path: '/admin/site/config',
|
|
|
- name: '站点配置',
|
|
|
- component: SiteConfig,
|
|
|
- meta: { needAuth: true }
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/admin/account',
|
|
|
- name: '帐号',
|
|
|
- component: Admin,
|
|
|
- meta: { needAuth: true },
|
|
|
- children: [
|
|
|
- {
|
|
|
- path: '/admin/account/user',
|
|
|
- name: '用户列表',
|
|
|
- component: UserList,
|
|
|
- meta: { needAuth: true }
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/admin/content',
|
|
|
- name: '内容',
|
|
|
- component: Admin,
|
|
|
- meta: { needAuth: true },
|
|
|
- children: [
|
|
|
- {
|
|
|
- path: '/admin/content/video',
|
|
|
- name: '稿件列表',
|
|
|
- component: PostList,
|
|
|
- meta: { needAuth: true }
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/admin/content/datasource',
|
|
|
- name: '数据源',
|
|
|
- component: DataSource,
|
|
|
- meta: { needAuth: true }
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- // ********************************************************************************************************************
|
|
|
- {
|
|
|
- path: '/disk',
|
|
|
- name: 'Disk',
|
|
|
- component: Disk,
|
|
|
- meta: { needAuth: true },
|
|
|
- children: [
|
|
|
- {
|
|
|
- path: '',
|
|
|
- name: '概览',
|
|
|
- component: DiskOverview,
|
|
|
- meta: { needAuth: true }
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/disk/list',
|
|
|
- name: '文件',
|
|
|
- component: FileList,
|
|
|
- meta: { needAuth: true }
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/disk/upload',
|
|
|
- name: '上传',
|
|
|
- component: UploadFile,
|
|
|
- meta: { needAuth: true }
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/disk/image',
|
|
|
- name: '图片',
|
|
|
- component: FileImage,
|
|
|
- meta: { needAuth: true }
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/disk/video',
|
|
|
- name: '视频',
|
|
|
- component: FileVideo,
|
|
|
- meta: { needAuth: true }
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/disk/audio',
|
|
|
- name: '音频',
|
|
|
- component: FileAudio,
|
|
|
- meta: { needAuth: true }
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/disk/text',
|
|
|
- name: '文本',
|
|
|
- component: FileText,
|
|
|
- meta: { needAuth: true }
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/disk/trash',
|
|
|
- name: 'Trash',
|
|
|
- component: FileTrash,
|
|
|
- meta: { needAuth: true }
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- // ********************************************************************************************************************
|
|
|
- {
|
|
|
- path: '/mall',
|
|
|
- name: 'Mall',
|
|
|
- component: Mall,
|
|
|
- meta: { needAuth: false },
|
|
|
- children: [
|
|
|
- {
|
|
|
- path: '',
|
|
|
- name: '概览',
|
|
|
- component: Overview,
|
|
|
- meta: { needAuth: false }
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/mall/cart',
|
|
|
- name: '购物车',
|
|
|
- component: Cart,
|
|
|
- meta: { needAuth: false }
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/mall/fav',
|
|
|
- name: '收藏夹',
|
|
|
- component: Fav,
|
|
|
- meta: { needAuth: false }
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/mall/order',
|
|
|
- name: '订单',
|
|
|
- component: Order,
|
|
|
- meta: { needAuth: false }
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/mall/order/confirm',
|
|
|
- name: 'ConfirmOrder',
|
|
|
- component: ConfirmOrder,
|
|
|
- meta: { needAuth: false }
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/mall/visit',
|
|
|
- name: '浏览记录',
|
|
|
- component: Visit,
|
|
|
- meta: { needAuth: false }
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/mall/pay',
|
|
|
- name: 'Pay',
|
|
|
- component: Pay,
|
|
|
- meta: { needAuth: false }
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/mall/item',
|
|
|
- name: 'Product',
|
|
|
- component: Product,
|
|
|
- meta: { needAuth: false }
|
|
|
- },
|
|
|
- ]
|
|
|
- },
|
|
|
- // ********************************************************************************************************************
|
|
|
{
|
|
|
path: '/timeline',
|
|
|
name: 'TimelineIndex',
|
|
|
@@ -654,12 +437,6 @@ const routes = [
|
|
|
name: 'AMap',
|
|
|
component: AMap,
|
|
|
meta: { needAuth: false }
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/vip',
|
|
|
- name: 'Vip',
|
|
|
- component: Vip,
|
|
|
- meta: { needAuth: false }
|
|
|
}
|
|
|
]
|
|
|
},
|