|
@@ -1,10 +1,10 @@
|
|
|
-import Vue from 'vue'
|
|
|
-import Router from 'vue-router'
|
|
|
+import Vue from 'vue';
|
|
|
+import Router from 'vue-router';
|
|
|
|
|
|
-Vue.use(Router)
|
|
|
+Vue.use(Router);
|
|
|
|
|
|
|
|
|
-import Layout from '@/layout'
|
|
|
+import Layout from '@/layout';
|
|
|
|
|
|
|
|
|
* Note: sub-menu only appear when route children.length >= 1
|
|
@@ -47,135 +47,450 @@ export const constantRoutes = [
|
|
|
path: '/',
|
|
|
component: Layout,
|
|
|
redirect: '/dashboard',
|
|
|
- children: [{
|
|
|
- path: 'dashboard',
|
|
|
- name: 'Dashboard',
|
|
|
- component: () => import('@/views/dashboard/index'),
|
|
|
- meta: { title: 'Dashboard', icon: 'dashboard' }
|
|
|
- }]
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ path: 'dashboard',
|
|
|
+ name: 'Dashboard',
|
|
|
+ component: () => import('@/views/dashboard/index'),
|
|
|
+ meta: {
|
|
|
+ title: 'Dashboard',
|
|
|
+ icon: 'dashboard'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ path: '/form',
|
|
|
+ component: Layout,
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ path: 'index',
|
|
|
+ name: 'Form',
|
|
|
+ component: () => import('@/views/form/index'),
|
|
|
+ meta: {
|
|
|
+ title: 'Form',
|
|
|
+ icon: 'form'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/baseManagement',
|
|
|
+ component: Layout,
|
|
|
+ redirect: '/baseManagement/BannerManagement',
|
|
|
+ name: '基础管理',
|
|
|
+ meta: {
|
|
|
+ title: '基础管理',
|
|
|
+ icon: 'el-icon-s-help'
|
|
|
+ },
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ path: 'BannerManagement',
|
|
|
+ name: 'Banner管理',
|
|
|
+ component: () =>
|
|
|
+ import('@/views/baseManagement/bannerManagement/index'),
|
|
|
+ meta: {
|
|
|
+ title: 'Banner管理'
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: 'InfoManagement',
|
|
|
+ name: '资讯管理',
|
|
|
+ component: () => import('@/views/baseManagement/infoManagement/index'),
|
|
|
+ meta: {
|
|
|
+ title: '资讯管理'
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: 'ProblemFeedbackManagement',
|
|
|
+ name: '问题反馈管理',
|
|
|
+ component: () =>
|
|
|
+ import('@/views/baseManagement/problemFeedbackManagement/index'),
|
|
|
+ meta: {
|
|
|
+ title: '问题反馈管理'
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/photographerManagement',
|
|
|
+ component: Layout,
|
|
|
+ redirect: '/photographerManagement/PhotographerVerify',
|
|
|
+ name: '摄影师管理',
|
|
|
+ meta: {
|
|
|
+ title: '摄影师管理',
|
|
|
+ icon: 'el-icon-s-help'
|
|
|
+ },
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ path: 'PhotographerVerify',
|
|
|
+ name: '摄影师审核',
|
|
|
+ component: () =>
|
|
|
+ import('@/views/photographerManagement/photographerVerify/index'),
|
|
|
+ meta: {
|
|
|
+ title: '摄影师审核'
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: 'PhotoVerify',
|
|
|
+ name: '照片管理',
|
|
|
+ component: () =>
|
|
|
+ import('@/views/photographerManagement/photoVerify/index'),
|
|
|
+ meta: {
|
|
|
+ title: '照片管理'
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
},
|
|
|
|
|
|
{
|
|
|
- path: '/example',
|
|
|
+ path: '/pointsManagement',
|
|
|
component: Layout,
|
|
|
- redirect: '/example/table',
|
|
|
- name: 'Example',
|
|
|
- meta: { title: 'Example', icon: 'el-icon-s-help' },
|
|
|
+ redirect: '/pointsManagement/PointsDetail',
|
|
|
+ name: '积分管理',
|
|
|
+ meta: {
|
|
|
+ title: '积分管理',
|
|
|
+ icon: 'el-icon-s-help'
|
|
|
+ },
|
|
|
children: [
|
|
|
{
|
|
|
- path: 'table',
|
|
|
- name: 'Table',
|
|
|
- component: () => import('@/views/table/index'),
|
|
|
- meta: { title: 'Table', icon: 'table' }
|
|
|
+ path: 'PointsDetail',
|
|
|
+ name: '积分明细',
|
|
|
+ component: () => import('@/views/pointsManagement/pointsDetail/index'),
|
|
|
+ meta: {
|
|
|
+ title: '积分明细'
|
|
|
+
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
- path: 'tree',
|
|
|
- name: 'Tree',
|
|
|
- component: () => import('@/views/tree/index'),
|
|
|
- meta: { title: 'Tree', icon: 'tree' }
|
|
|
+ path: 'PointsSetting',
|
|
|
+ name: '积分设置',
|
|
|
+ component: () => import('@/views/pointsManagement/pointsSetting/index'),
|
|
|
+ meta: {
|
|
|
+ title: '积分设置'
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
|
|
|
{
|
|
|
- path: '/form',
|
|
|
+ path: '/sceneManagement',
|
|
|
component: Layout,
|
|
|
+ redirect: '/sceneManagement/SceneList',
|
|
|
+ name: '场景管理',
|
|
|
+ meta: {
|
|
|
+ title: '场景管理',
|
|
|
+ icon: 'el-icon-s-help'
|
|
|
+ },
|
|
|
children: [
|
|
|
{
|
|
|
- path: 'index',
|
|
|
- name: 'Form',
|
|
|
- component: () => import('@/views/form/index'),
|
|
|
- meta: { title: 'Form', icon: 'form' }
|
|
|
+ path: 'SceneList',
|
|
|
+ name: '场景列表',
|
|
|
+ component: () => import('@/views/sceneManagement/sceneList/index'),
|
|
|
+ meta: {
|
|
|
+ title: '场景列表'
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: 'SceneVerify',
|
|
|
+ name: '场景审核',
|
|
|
+ component: () => import('@/views/sceneManagement/sceneVerify/index'),
|
|
|
+ meta: {
|
|
|
+ title: '场景审核'
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ path: '/memberManagement',
|
|
|
+ component: Layout,
|
|
|
+ redirect: '/memberManagement/MemberLever',
|
|
|
+ name: '会员管理',
|
|
|
+ meta: {
|
|
|
+ title: '会员管理',
|
|
|
+ icon: 'el-icon-s-help'
|
|
|
+ },
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ path: 'MemberLever',
|
|
|
+ name: '会员等级',
|
|
|
+ component: () => import('@/views/memberManagement/memberLever/index'),
|
|
|
+ meta: {
|
|
|
+ title: '会员等级'
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: 'MemberList',
|
|
|
+ name: '会员列表',
|
|
|
+ component: () => import('@/views/memberManagement/memberList/index'),
|
|
|
+ meta: {
|
|
|
+ title: '会员列表'
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ path: '/helpInfo',
|
|
|
+ component: Layout,
|
|
|
+ redirect: '/helpInfo/IssueType',
|
|
|
+ name: '帮助信息',
|
|
|
+ meta: {
|
|
|
+ title: '帮助信息',
|
|
|
+ icon: 'el-icon-s-help'
|
|
|
+ },
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ path: 'IssueType',
|
|
|
+ name: '问题分类',
|
|
|
+ component: () => import('@/views/helpInfo/issueType/index'),
|
|
|
+ meta: {
|
|
|
+ title: '问题分类'
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: 'Information',
|
|
|
+ name: '信息内容',
|
|
|
+ component: () => import('@/views/helpInfo/information/index'),
|
|
|
+ meta: {
|
|
|
+ title: '信息内容'
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ path: '/systemManagement',
|
|
|
+ component: Layout,
|
|
|
+ redirect: '/systemManagement/AccountManagement',
|
|
|
+ name: '系统管理',
|
|
|
+ meta: {
|
|
|
+ title: '系统管理',
|
|
|
+ icon: 'el-icon-s-help'
|
|
|
+ },
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ path: 'AccountManagement',
|
|
|
+ name: '账号列表',
|
|
|
+ component: () =>
|
|
|
+ import('@/views/systemManagement/accountManagement/index'),
|
|
|
+ meta: {
|
|
|
+ title: '账号列表'
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: 'RoleManagement',
|
|
|
+ name: '角色列表',
|
|
|
+ component: () =>
|
|
|
+ import('@/views/systemManagement/roleManagement/index'),
|
|
|
+ meta: {
|
|
|
+ title: '角色列表'
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ path: '/photoManagement',
|
|
|
+ component: Layout,
|
|
|
+ redirect: '/photoManagement/ImageGoodsManagement',
|
|
|
+ name: '图片库管理',
|
|
|
+ meta: {
|
|
|
+ title: '图片库管理',
|
|
|
+ icon: 'el-icon-s-help'
|
|
|
+ },
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ path: 'ImageGoodsManagement',
|
|
|
+ name: '照片商品管理',
|
|
|
+ component: () =>
|
|
|
+ import('@/views/photoManagement/imageGoodsManagement/index'),
|
|
|
+ meta: {
|
|
|
+ title: '照片商品管理'
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: 'EventsList',
|
|
|
+ name: '活动列表',
|
|
|
+ component: () => import('@/views/photoManagement/eventsList/index'),
|
|
|
+ meta: {
|
|
|
+ title: '活动列表'
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: 'UploadManagement',
|
|
|
+ name: '上传照片管理',
|
|
|
+ component: () =>
|
|
|
+ import('@/views/photoManagement/uploadManagement/index'),
|
|
|
+ meta: {
|
|
|
+ title: '上传照片管理'
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
|
|
|
{
|
|
|
- path: '/nested',
|
|
|
+ path: 'financialManagement',
|
|
|
component: Layout,
|
|
|
- redirect: '/nested/menu1',
|
|
|
- name: 'Nested',
|
|
|
+ redirect: '/financialManagement/OrderManagement',
|
|
|
+ name: '财务管理',
|
|
|
meta: {
|
|
|
- title: 'Nested',
|
|
|
- icon: 'nested'
|
|
|
+ title: '财务管理',
|
|
|
+ icon: 'el-icon-s-help'
|
|
|
},
|
|
|
children: [
|
|
|
{
|
|
|
- path: 'menu1',
|
|
|
- component: () => import('@/views/nested/menu1/index'),
|
|
|
- name: 'Menu1',
|
|
|
- meta: { title: 'Menu1' },
|
|
|
- children: [
|
|
|
- {
|
|
|
- path: 'menu1-1',
|
|
|
- component: () => import('@/views/nested/menu1/menu1-1'),
|
|
|
- name: 'Menu1-1',
|
|
|
- meta: { title: 'Menu1-1' }
|
|
|
- },
|
|
|
- {
|
|
|
- path: 'menu1-2',
|
|
|
- component: () => import('@/views/nested/menu1/menu1-2'),
|
|
|
- name: 'Menu1-2',
|
|
|
- meta: { title: 'Menu1-2' },
|
|
|
- children: [
|
|
|
- {
|
|
|
- path: 'menu1-2-1',
|
|
|
- component: () => import('@/views/nested/menu1/menu1-2/menu1-2-1'),
|
|
|
- name: 'Menu1-2-1',
|
|
|
- meta: { title: 'Menu1-2-1' }
|
|
|
- },
|
|
|
- {
|
|
|
- path: 'menu1-2-2',
|
|
|
- component: () => import('@/views/nested/menu1/menu1-2/menu1-2-2'),
|
|
|
- name: 'Menu1-2-2',
|
|
|
- meta: { title: 'Menu1-2-2' }
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- path: 'menu1-3',
|
|
|
- component: () => import('@/views/nested/menu1/menu1-3'),
|
|
|
- name: 'Menu1-3',
|
|
|
- meta: { title: 'Menu1-3' }
|
|
|
- }
|
|
|
- ]
|
|
|
+ path: 'OrderManagement',
|
|
|
+ name: '订单列表',
|
|
|
+ component: () =>
|
|
|
+ import('@/views/financialManagement/orderManagement/index'),
|
|
|
+ meta: {
|
|
|
+ title: '订单列表'
|
|
|
+
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
- path: 'menu2',
|
|
|
- component: () => import('@/views/nested/menu2/index'),
|
|
|
- name: 'Menu2',
|
|
|
- meta: { title: 'menu2' }
|
|
|
+ path: 'FundDetail',
|
|
|
+ name: '资金明细',
|
|
|
+ component: () => import('@/views/financialManagement/fundDetail/index'),
|
|
|
+ meta: {
|
|
|
+ title: '资金明细'
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
|
|
|
{
|
|
|
- path: 'external-link',
|
|
|
+ path: 'statistics',
|
|
|
component: Layout,
|
|
|
+ redirect: '/statistics/DownloadImage',
|
|
|
+ name: '数据统计',
|
|
|
+ meta: {
|
|
|
+ title: '数据统计',
|
|
|
+ icon: 'el-icon-s-help'
|
|
|
+ },
|
|
|
children: [
|
|
|
{
|
|
|
- path: 'https://panjiachen.github.io/vue-element-admin-site/#/',
|
|
|
- meta: { title: 'External Link', icon: 'link' }
|
|
|
+ path: 'DownloadImage',
|
|
|
+ name: '下载照片',
|
|
|
+ component: () => import('@/views/statistics/downloadImage/index'),
|
|
|
+ meta: {
|
|
|
+ title: '下载照片'
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: 'UploadImage',
|
|
|
+ name: '上传照片',
|
|
|
+ component: () => import('@/views/statistics/uploadImage/index'),
|
|
|
+ meta: {
|
|
|
+ title: '上传照片'
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: 'WithdrawalRecord',
|
|
|
+ name: '提现记录',
|
|
|
+ component: () => import('@/views/statistics/withdrawalRecord/index'),
|
|
|
+ meta: {
|
|
|
+ title: '提现记录'
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
|
|
|
|
|
|
- { path: '*', redirect: '/404', hidden: true }
|
|
|
-]
|
|
|
+ {
|
|
|
+ path: '*',
|
|
|
+ redirect: '/404',
|
|
|
+ hidden: true
|
|
|
+ }
|
|
|
+];
|
|
|
+
|
|
|
+
|
|
|
+ * asyncRoutes
|
|
|
+ * the routes that need to be dynamically loaded based on user roles
|
|
|
+ */
|
|
|
+export const asyncRoutes = [
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+];
|
|
|
|
|
|
-const createRouter = () => new Router({
|
|
|
-
|
|
|
- scrollBehavior: () => ({ y: 0 }),
|
|
|
- routes: constantRoutes
|
|
|
-})
|
|
|
+const createRouter = () =>
|
|
|
+ new Router({
|
|
|
+
|
|
|
+ scrollBehavior: () => ({
|
|
|
+ y: 0
|
|
|
+ }),
|
|
|
+ routes: constantRoutes
|
|
|
+ });
|
|
|
|
|
|
-const router = createRouter()
|
|
|
+const router = createRouter();
|
|
|
|
|
|
|
|
|
export function resetRouter() {
|
|
|
- const newRouter = createRouter()
|
|
|
- router.matcher = newRouter.matcher
|
|
|
+ const newRouter = createRouter();
|
|
|
+ router.matcher = newRouter.matcher;
|
|
|
}
|
|
|
|
|
|
-export default router
|
|
|
+export default router;
|