|
|
@@ -11,6 +11,8 @@ import componentsRouter from './modules/components'
|
|
|
import chartsRouter from './modules/charts'
|
|
|
import tableRouter from './modules/table'
|
|
|
import nestedRouter from './modules/nested'
|
|
|
+import shopRouter from '@/router/modules/shop'
|
|
|
+import profileRouter from '@/router/modules/profileRouter'
|
|
|
|
|
|
/**
|
|
|
* Note: sub-menu only appear when route children.length >= 1
|
|
|
@@ -83,7 +85,7 @@ export const constantRoutes = [
|
|
|
meta: { title: 'dashboard', icon: 'dashboard', affix: true }
|
|
|
}
|
|
|
]
|
|
|
- },
|
|
|
+ }
|
|
|
// {
|
|
|
// path: '/dashboard/index',
|
|
|
// component: Layout,
|
|
|
@@ -122,20 +124,6 @@ export const constantRoutes = [
|
|
|
// }
|
|
|
// ]
|
|
|
// },
|
|
|
- {
|
|
|
- path: '/profile',
|
|
|
- component: Layout,
|
|
|
- redirect: '/profile/index',
|
|
|
- hidden: true,
|
|
|
- children: [
|
|
|
- {
|
|
|
- path: 'index',
|
|
|
- component: () => import('@/views/profile/index'),
|
|
|
- name: 'Profile',
|
|
|
- meta: { title: 'profile', icon: 'user', noCache: true }
|
|
|
- }
|
|
|
- ]
|
|
|
- }
|
|
|
]
|
|
|
|
|
|
/**
|
|
|
@@ -143,29 +131,6 @@ export const constantRoutes = [
|
|
|
* the routes that need to be dynamically loaded based on user roles
|
|
|
*/
|
|
|
export const asyncRoutes = [
|
|
|
- {
|
|
|
- path: '/shop',
|
|
|
- component: Layout,
|
|
|
- redirect: '/shop/index',
|
|
|
- // alwaysShow: true,
|
|
|
- name: 'Shop',
|
|
|
- meta: {
|
|
|
- title: 'shop',
|
|
|
- icon: 'edit',
|
|
|
- // roles: ['admin', 'editor']
|
|
|
- },
|
|
|
- children: [
|
|
|
- {
|
|
|
- path: '/shop/index',
|
|
|
- component: () => import('@/views/shop/index'),
|
|
|
- name: 'IndexShop',
|
|
|
- meta: {
|
|
|
- title: 'indexShop',
|
|
|
- roles: ['admin', 'editor'] // or you can only set roles in sub nav
|
|
|
- }
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
{
|
|
|
path: '/permission',
|
|
|
component: Layout,
|
|
|
@@ -226,51 +191,53 @@ export const asyncRoutes = [
|
|
|
chartsRouter,
|
|
|
nestedRouter,
|
|
|
tableRouter,
|
|
|
+ shopRouter,
|
|
|
+ profileRouter,
|
|
|
|
|
|
- {
|
|
|
- path: '/example',
|
|
|
- component: Layout,
|
|
|
- redirect: '/example/list',
|
|
|
- name: 'Example',
|
|
|
- meta: {
|
|
|
- title: 'example',
|
|
|
- icon: 'el-icon-s-help'
|
|
|
- },
|
|
|
- children: [
|
|
|
- {
|
|
|
- path: 'create',
|
|
|
- component: () => import('@/views/example/create'),
|
|
|
- name: 'CreateArticle',
|
|
|
- meta: { title: 'createArticle', icon: 'edit' }
|
|
|
- },
|
|
|
- {
|
|
|
- path: 'edit/:id(\\d+)',
|
|
|
- component: () => import('@/views/example/edit'),
|
|
|
- name: 'EditArticle',
|
|
|
- meta: { title: 'editArticle', noCache: true, activeMenu: '/example/list' },
|
|
|
- hidden: true
|
|
|
- },
|
|
|
- {
|
|
|
- path: 'list',
|
|
|
- component: () => import('@/views/example/list'),
|
|
|
- name: 'ArticleList',
|
|
|
- meta: { title: 'articleList', icon: 'list' }
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // path: '/example',
|
|
|
+ // component: Layout,
|
|
|
+ // redirect: '/example/list',
|
|
|
+ // name: 'Example',
|
|
|
+ // meta: {
|
|
|
+ // title: 'example',
|
|
|
+ // icon: 'el-icon-s-help'
|
|
|
+ // },
|
|
|
+ // children: [
|
|
|
+ // {
|
|
|
+ // path: 'create',
|
|
|
+ // component: () => import('@/views/example/create'),
|
|
|
+ // name: 'CreateArticle',
|
|
|
+ // meta: { title: 'createArticle', icon: 'edit' }
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // path: 'edit/:id(\\d+)',
|
|
|
+ // component: () => import('@/views/example/edit'),
|
|
|
+ // name: 'EditArticle',
|
|
|
+ // meta: { title: 'editArticle', noCache: true, activeMenu: '/example/list' },
|
|
|
+ // hidden: true
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // path: 'list',
|
|
|
+ // component: () => import('@/views/example/list'),
|
|
|
+ // name: 'ArticleList',
|
|
|
+ // meta: { title: 'articleList', icon: 'list' }
|
|
|
+ // }
|
|
|
+ // ]
|
|
|
+ // },
|
|
|
|
|
|
- {
|
|
|
- path: '/tab',
|
|
|
- component: Layout,
|
|
|
- children: [
|
|
|
- {
|
|
|
- path: 'index',
|
|
|
- component: () => import('@/views/tab/index'),
|
|
|
- name: 'Tab',
|
|
|
- meta: { title: 'tab', icon: 'tab' }
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // path: '/tab',
|
|
|
+ // component: Layout,
|
|
|
+ // children: [
|
|
|
+ // {
|
|
|
+ // path: 'index',
|
|
|
+ // component: () => import('@/views/tab/index'),
|
|
|
+ // name: 'Tab',
|
|
|
+ // meta: { title: 'tab', icon: 'tab' }
|
|
|
+ // }
|
|
|
+ // ]
|
|
|
+ // },
|
|
|
|
|
|
{
|
|
|
path: '/error',
|
|
|
@@ -310,128 +277,128 @@ export const asyncRoutes = [
|
|
|
]
|
|
|
},
|
|
|
|
|
|
- {
|
|
|
- path: '/excel',
|
|
|
- component: Layout,
|
|
|
- redirect: '/excel/export-excel',
|
|
|
- name: 'Excel',
|
|
|
- meta: {
|
|
|
- title: 'excel',
|
|
|
- icon: 'excel'
|
|
|
- },
|
|
|
- children: [
|
|
|
- {
|
|
|
- path: 'export-excel',
|
|
|
- component: () => import('@/views/excel/export-excel'),
|
|
|
- name: 'ExportExcel',
|
|
|
- meta: { title: 'exportExcel' }
|
|
|
- },
|
|
|
- {
|
|
|
- path: 'export-selected-excel',
|
|
|
- component: () => import('@/views/excel/select-excel'),
|
|
|
- name: 'SelectExcel',
|
|
|
- meta: { title: 'selectExcel' }
|
|
|
- },
|
|
|
- {
|
|
|
- path: 'export-merge-header',
|
|
|
- component: () => import('@/views/excel/merge-header'),
|
|
|
- name: 'MergeHeader',
|
|
|
- meta: { title: 'mergeHeader' }
|
|
|
- },
|
|
|
- {
|
|
|
- path: 'upload-excel',
|
|
|
- component: () => import('@/views/excel/upload-excel'),
|
|
|
- name: 'UploadExcel',
|
|
|
- meta: { title: 'uploadExcel' }
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
-
|
|
|
- {
|
|
|
- path: '/zip',
|
|
|
- component: Layout,
|
|
|
- redirect: '/zip/download',
|
|
|
- alwaysShow: true,
|
|
|
- name: 'Zip',
|
|
|
- meta: { title: 'zip', icon: 'zip' },
|
|
|
- children: [
|
|
|
- {
|
|
|
- path: 'download',
|
|
|
- component: () => import('@/views/zip/index'),
|
|
|
- name: 'ExportZip',
|
|
|
- meta: { title: 'exportZip' }
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
-
|
|
|
- {
|
|
|
- path: '/pdf',
|
|
|
- component: Layout,
|
|
|
- redirect: '/pdf/index',
|
|
|
- children: [
|
|
|
- {
|
|
|
- path: 'index',
|
|
|
- component: () => import('@/views/pdf/index'),
|
|
|
- name: 'PDF',
|
|
|
- meta: { title: 'pdf', icon: 'pdf' }
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/pdf/download',
|
|
|
- component: () => import('@/views/pdf/download'),
|
|
|
- hidden: true
|
|
|
- },
|
|
|
-
|
|
|
- {
|
|
|
- path: '/theme',
|
|
|
- component: Layout,
|
|
|
- children: [
|
|
|
- {
|
|
|
- path: 'index',
|
|
|
- component: () => import('@/views/theme/index'),
|
|
|
- name: 'Theme',
|
|
|
- meta: { title: 'theme', icon: 'theme' }
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
-
|
|
|
- {
|
|
|
- path: '/clipboard',
|
|
|
- component: Layout,
|
|
|
- children: [
|
|
|
- {
|
|
|
- path: 'index',
|
|
|
- component: () => import('@/views/clipboard/index'),
|
|
|
- name: 'ClipboardDemo',
|
|
|
- meta: { title: 'clipboardDemo', icon: 'clipboard' }
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
-
|
|
|
- {
|
|
|
- path: '/i18n',
|
|
|
- component: Layout,
|
|
|
- children: [
|
|
|
- {
|
|
|
- path: 'index',
|
|
|
- component: () => import('@/views/i18n-demo/index'),
|
|
|
- name: 'I18n',
|
|
|
- meta: { title: 'i18n', icon: 'international' }
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // path: '/excel',
|
|
|
+ // component: Layout,
|
|
|
+ // redirect: '/excel/export-excel',
|
|
|
+ // name: 'Excel',
|
|
|
+ // meta: {
|
|
|
+ // title: 'excel',
|
|
|
+ // icon: 'excel'
|
|
|
+ // },
|
|
|
+ // children: [
|
|
|
+ // {
|
|
|
+ // path: 'export-excel',
|
|
|
+ // component: () => import('@/views/excel/export-excel'),
|
|
|
+ // name: 'ExportExcel',
|
|
|
+ // meta: { title: 'exportExcel' }
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // path: 'export-selected-excel',
|
|
|
+ // component: () => import('@/views/excel/select-excel'),
|
|
|
+ // name: 'SelectExcel',
|
|
|
+ // meta: { title: 'selectExcel' }
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // path: 'export-merge-header',
|
|
|
+ // component: () => import('@/views/excel/merge-header'),
|
|
|
+ // name: 'MergeHeader',
|
|
|
+ // meta: { title: 'mergeHeader' }
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // path: 'upload-excel',
|
|
|
+ // component: () => import('@/views/excel/upload-excel'),
|
|
|
+ // name: 'UploadExcel',
|
|
|
+ // meta: { title: 'uploadExcel' }
|
|
|
+ // }
|
|
|
+ // ]
|
|
|
+ // },
|
|
|
+ //
|
|
|
+ // {
|
|
|
+ // path: '/zip',
|
|
|
+ // component: Layout,
|
|
|
+ // redirect: '/zip/download',
|
|
|
+ // alwaysShow: true,
|
|
|
+ // name: 'Zip',
|
|
|
+ // meta: { title: 'zip', icon: 'zip' },
|
|
|
+ // children: [
|
|
|
+ // {
|
|
|
+ // path: 'download',
|
|
|
+ // component: () => import('@/views/zip/index'),
|
|
|
+ // name: 'ExportZip',
|
|
|
+ // meta: { title: 'exportZip' }
|
|
|
+ // }
|
|
|
+ // ]
|
|
|
+ // },
|
|
|
+ //
|
|
|
+ // {
|
|
|
+ // path: '/pdf',
|
|
|
+ // component: Layout,
|
|
|
+ // redirect: '/pdf/index',
|
|
|
+ // children: [
|
|
|
+ // {
|
|
|
+ // path: 'index',
|
|
|
+ // component: () => import('@/views/pdf/index'),
|
|
|
+ // name: 'PDF',
|
|
|
+ // meta: { title: 'pdf', icon: 'pdf' }
|
|
|
+ // }
|
|
|
+ // ]
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // path: '/pdf/download',
|
|
|
+ // component: () => import('@/views/pdf/download'),
|
|
|
+ // hidden: true
|
|
|
+ // },
|
|
|
+ //
|
|
|
+ // {
|
|
|
+ // path: '/theme',
|
|
|
+ // component: Layout,
|
|
|
+ // children: [
|
|
|
+ // {
|
|
|
+ // path: 'index',
|
|
|
+ // component: () => import('@/views/theme/index'),
|
|
|
+ // name: 'Theme',
|
|
|
+ // meta: { title: 'theme', icon: 'theme' }
|
|
|
+ // }
|
|
|
+ // ]
|
|
|
+ // },
|
|
|
+ //
|
|
|
+ // {
|
|
|
+ // path: '/clipboard',
|
|
|
+ // component: Layout,
|
|
|
+ // children: [
|
|
|
+ // {
|
|
|
+ // path: 'index',
|
|
|
+ // component: () => import('@/views/clipboard/index'),
|
|
|
+ // name: 'ClipboardDemo',
|
|
|
+ // meta: { title: 'clipboardDemo', icon: 'clipboard' }
|
|
|
+ // }
|
|
|
+ // ]
|
|
|
+ // },
|
|
|
|
|
|
- {
|
|
|
- path: 'external-link',
|
|
|
- component: Layout,
|
|
|
- children: [
|
|
|
- {
|
|
|
- path: 'https://github.com/PanJiaChen/vue-element-admin',
|
|
|
- meta: { title: 'externalLink', icon: 'link' }
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // path: '/i18n',
|
|
|
+ // component: Layout,
|
|
|
+ // children: [
|
|
|
+ // {
|
|
|
+ // path: 'index',
|
|
|
+ // component: () => import('@/views/i18n-demo/index'),
|
|
|
+ // name: 'I18n',
|
|
|
+ // meta: { title: 'i18n', icon: 'international' }
|
|
|
+ // }
|
|
|
+ // ]
|
|
|
+ // },
|
|
|
+ //
|
|
|
+ // {
|
|
|
+ // path: 'external-link',
|
|
|
+ // component: Layout,
|
|
|
+ // children: [
|
|
|
+ // {
|
|
|
+ // path: 'https://github.com/PanJiaChen/vue-element-admin',
|
|
|
+ // meta: { title: 'externalLink', icon: 'link' }
|
|
|
+ // }
|
|
|
+ // ]
|
|
|
+ // },
|
|
|
|
|
|
// 404 page must be placed at the end !!!
|
|
|
{ path: '*', redirect: '/404', hidden: true }
|