|
@@ -6,6 +6,12 @@ Vue.use(Router)
|
|
|
/* Layout */
|
|
|
import Layout from '@/layout'
|
|
|
|
|
|
+/* Router Modules */
|
|
|
+import clubRouter from './modules/club'
|
|
|
+import goodsRouter from './modules/goods'
|
|
|
+import orderRouter from './modules/order'
|
|
|
+import financeRouter from './modules/finance'
|
|
|
+import otherRouter from './modules/other'
|
|
|
/**
|
|
|
* Note: sub-menu only appear when route children.length >= 1
|
|
|
* Detail see: https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html
|
|
@@ -76,195 +82,6 @@ export const constantRoutes = [
|
|
|
meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true }
|
|
|
}
|
|
|
]
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/club',
|
|
|
- component: Layout,
|
|
|
- redirect: '/club/list',
|
|
|
- name: 'Club',
|
|
|
- meta: { title: '会所管理', icon: 'tree' },
|
|
|
- children: [
|
|
|
- {
|
|
|
- path: 'list',
|
|
|
- name: 'List',
|
|
|
- component: () => import('@/views/club/list'),
|
|
|
- meta: { title: '会所列表', icon: 'list' }
|
|
|
- },
|
|
|
- {
|
|
|
- path: 'form',
|
|
|
- name: 'Form',
|
|
|
- component: () => import('@/views/club/form'),
|
|
|
- meta: { title: '上线会所', icon: 'form' }
|
|
|
- },
|
|
|
- {
|
|
|
- path: 'operateList',
|
|
|
- component: () => import('@/views/club/operateList'),
|
|
|
- name: 'OperateList',
|
|
|
- meta: { title: '查看运营人员', noCache: true, activeMenu: '/club/list' },
|
|
|
- hidden: true
|
|
|
- },
|
|
|
- {
|
|
|
- path: 'editForm',
|
|
|
- component: () => import('@/views/club/editForm'),
|
|
|
- name: 'EditForm',
|
|
|
- meta: { title: '编辑会所', noCache: true, activeMenu: '/club/list' },
|
|
|
- hidden: true
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/goods',
|
|
|
- component: Layout,
|
|
|
- redirect: '/goods/list',
|
|
|
- name: 'Goods',
|
|
|
- meta: { title: '商品管理', icon: 'shopping' },
|
|
|
- children: [
|
|
|
- {
|
|
|
- path: 'category',
|
|
|
- name: 'Category',
|
|
|
- component: () => import('@/views/goods/category'),
|
|
|
- meta: { title: '商品分类', icon: 'component' }
|
|
|
- },
|
|
|
- {
|
|
|
- path: 'category/edit/:id(\\d+)',
|
|
|
- name: 'EditCategory',
|
|
|
- component: () => import('@/views/goods/category-edit'),
|
|
|
- meta: { title: '编辑分类', noCache: true, activeMenu: '/goods/category' },
|
|
|
- hidden: true
|
|
|
- },
|
|
|
- {
|
|
|
- path: 'category/create',
|
|
|
- name: 'CreateCategory',
|
|
|
- component: () => import('@/views/goods/category-create'),
|
|
|
- meta: { title: '添加分类', noCache: true, activeMenu: '/goods/category' },
|
|
|
- hidden: true
|
|
|
- },
|
|
|
- {
|
|
|
- path: 'list',
|
|
|
- name: 'List',
|
|
|
- component: () => import('@/views/goods/list'),
|
|
|
- meta: { title: '商品列表', icon: 'list' }
|
|
|
- },
|
|
|
- {
|
|
|
- path: 'list/select/:type(\\d+)',
|
|
|
- name: 'SelectProduct',
|
|
|
- component: () => import('@/views/goods/list-select'),
|
|
|
- meta: { title: '添加商品', noCache: true, activeMenu: '/goods/list' },
|
|
|
- hidden: true
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/order',
|
|
|
- component: Layout,
|
|
|
- redirect: '/order/list',
|
|
|
- name: 'Order',
|
|
|
- meta: { title: '订单管理', icon: 'documentation' },
|
|
|
- children: [
|
|
|
- {
|
|
|
- path: 'list',
|
|
|
- name: 'List',
|
|
|
- component: () => import('@/views/order/list'),
|
|
|
- meta: { title: '订单列表', icon: 'list' }
|
|
|
- },
|
|
|
- {
|
|
|
- path: 'refund',
|
|
|
- name: 'Refund',
|
|
|
- component: () => import('@/views/order/refund'),
|
|
|
- meta: { title: '用户退款列表', icon: 'skill' }
|
|
|
- },
|
|
|
- {
|
|
|
- path: 'refund/detail/:id(\\d+)',
|
|
|
- name: 'RefundDeatil',
|
|
|
- component: () => import('@/views/order/refund-detail'),
|
|
|
- meta: { title: '用户退款详情', noCache: true, activeMenu: '/order/refund' },
|
|
|
- hidden: true
|
|
|
- },
|
|
|
- {
|
|
|
- path: 'detail/:id(\\d+)',
|
|
|
- name: 'Detail',
|
|
|
- component: () => import('@/views/order/detail'),
|
|
|
- meta: { title: '订单详情', noCache: true, activeMenu: '/order/list' },
|
|
|
- hidden: true
|
|
|
- },
|
|
|
- {
|
|
|
- path: 'logistics/:id(\\d+)',
|
|
|
- name: 'logistics',
|
|
|
- component: () => import('@/views/order/logistics'),
|
|
|
- meta: { title: '发货记录', noCache: true, activeMenu: '/order/list' },
|
|
|
- hidden: true
|
|
|
- },
|
|
|
- {
|
|
|
- path: 'refund-record/:id(\\d+)',
|
|
|
- name: 'RefundRecord',
|
|
|
- component: () => import('@/views/order/refund-record'),
|
|
|
- meta: { title: '收退款记录', noCache: true, activeMenu: '/order/list' },
|
|
|
- hidden: true
|
|
|
- },
|
|
|
- {
|
|
|
- path: 'refund-return/:id(\\d+)',
|
|
|
- name: 'RefundRreturn',
|
|
|
- component: () => import('@/views/order/refund-return'),
|
|
|
- meta: { title: '退款(退货)记录', noCache: true, activeMenu: '/order/list' },
|
|
|
- hidden: true
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
-
|
|
|
- {
|
|
|
- path: '/finance',
|
|
|
- component: Layout,
|
|
|
- redirect: '/finance/list',
|
|
|
- name: 'Finance',
|
|
|
- meta: { title: '财务管理', icon: 'money' },
|
|
|
- children: [
|
|
|
- {
|
|
|
- path: 'list',
|
|
|
- name: 'List',
|
|
|
- component: () => import('@/views/finance/list'),
|
|
|
- meta: { title: '对账列表', icon: 'list' }
|
|
|
- },
|
|
|
- {
|
|
|
- path: 'refund',
|
|
|
- name: 'Refund',
|
|
|
- component: () => import('@/views/finance/refund'),
|
|
|
- meta: { title: '退款管理', icon: 'skill' }
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
-
|
|
|
- {
|
|
|
- path: '/other',
|
|
|
- component: Layout,
|
|
|
- redirect: '/other/about',
|
|
|
- name: 'Other',
|
|
|
- meta: { title: '其他设置', icon: 'example' },
|
|
|
- children: [
|
|
|
- {
|
|
|
- path: 'about',
|
|
|
- name: 'About',
|
|
|
- component: () => import('@/views/other/about'),
|
|
|
- meta: { title: '关于我们', icon: 'peoples' }
|
|
|
- },
|
|
|
- {
|
|
|
- path: 'after',
|
|
|
- name: 'After',
|
|
|
- component: () => import('@/views/other/after'),
|
|
|
- meta: { title: '售后无忧', icon: 'star' }
|
|
|
- },
|
|
|
- {
|
|
|
- path: 'notes',
|
|
|
- name: 'Notes',
|
|
|
- component: () => import('@/views/other/notes'),
|
|
|
- meta: { title: '购物须知', icon: 'form' }
|
|
|
- },
|
|
|
- {
|
|
|
- path: 'password',
|
|
|
- name: 'Password',
|
|
|
- component: () => import('@/views/other/password'),
|
|
|
- meta: { title: '修改密码', icon: 'eye' }
|
|
|
- }
|
|
|
- ]
|
|
|
}
|
|
|
]
|
|
|
/**
|
|
@@ -272,15 +89,11 @@ export const constantRoutes = [
|
|
|
* the routes that need to be dynamically loaded based on user roles
|
|
|
*/
|
|
|
export const asyncRoutes = [
|
|
|
- {
|
|
|
- path: '/goods',
|
|
|
- component: Layout,
|
|
|
- redirect: '/goods/list',
|
|
|
- name: 'Goods',
|
|
|
- meta: { title: '商品管理', icon: 'shopping' },
|
|
|
- hidden: true,
|
|
|
- children: []
|
|
|
- },
|
|
|
+ clubRouter,
|
|
|
+ goodsRouter,
|
|
|
+ orderRouter,
|
|
|
+ financeRouter,
|
|
|
+ otherRouter,
|
|
|
// 404 page must be placed at the end !!!
|
|
|
{ path: '*', redirect: '/404', hidden: true }
|
|
|
]
|