|
@@ -20,6 +20,8 @@ import Layout from '@/layout'
|
|
|
roles: ['admin','editor'] control the page roles (you can set multiple roles)
|
|
|
title: 'title' the name show in sidebar and breadcrumb (recommend set)
|
|
|
icon: 'svg-name' the icon show in the sidebar
|
|
|
+ noCache: true if set true, the page will no be cached(default is false)
|
|
|
+ affix: true if set true, the tag will affix in the tags-view
|
|
|
breadcrumb: false if set false, the item will hidden in breadcrumb(default is true)
|
|
|
activeMenu: '/example/list' if set path, the sidebar will highlight the path you set
|
|
|
}
|
|
@@ -31,28 +33,49 @@ import Layout from '@/layout'
|
|
|
* all roles can be accessed
|
|
|
*/
|
|
|
export const constantRoutes = [
|
|
|
+ {
|
|
|
+ path: '/redirect',
|
|
|
+ component: Layout,
|
|
|
+ hidden: true,
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ path: '/redirect/:path*',
|
|
|
+ component: () => import('@/views/redirect/index')
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
{
|
|
|
path: '/login',
|
|
|
component: () => import('@/views/login/index'),
|
|
|
hidden: true
|
|
|
},
|
|
|
-
|
|
|
+ {
|
|
|
+ path: '/auth-redirect',
|
|
|
+ component: () => import('@/views/login/auth-redirect'),
|
|
|
+ hidden: true
|
|
|
+ },
|
|
|
{
|
|
|
path: '/404',
|
|
|
- component: () => import('@/views/404'),
|
|
|
+ component: () => import('@/views/error-page/404'),
|
|
|
+ hidden: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/401',
|
|
|
+ component: () => import('@/views/error-page/401'),
|
|
|
hidden: true
|
|
|
},
|
|
|
-
|
|
|
{
|
|
|
path: '/',
|
|
|
component: Layout,
|
|
|
redirect: '/dashboard',
|
|
|
- children: [{
|
|
|
- path: 'dashboard',
|
|
|
- name: 'Dashboard',
|
|
|
- component: () => import('@/views/dashboard/index'),
|
|
|
- meta: { title: '首页', icon: 'dashboard', affix: true }
|
|
|
- }]
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ path: 'dashboard',
|
|
|
+ component: () => import('@/views/dashboard/index'),
|
|
|
+ name: 'Dashboard',
|
|
|
+ meta: { title: '首页', icon: 'dashboard', affix: true }
|
|
|
+ }
|
|
|
+ ]
|
|
|
},
|
|
|
{
|
|
|
path: '/club',
|
|
@@ -89,7 +112,6 @@ export const constantRoutes = [
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
-
|
|
|
{
|
|
|
path: '/goods',
|
|
|
component: Layout,
|
|
@@ -265,7 +287,13 @@ export const constantRoutes = [
|
|
|
meta: { title: '修改密码', icon: 'eye' }
|
|
|
}
|
|
|
]
|
|
|
- },
|
|
|
+ }
|
|
|
+]
|
|
|
+/**
|
|
|
+ * asyncRoutes
|
|
|
+ * the routes that need to be dynamically loaded based on user roles
|
|
|
+ */
|
|
|
+export const asyncRoutes = [
|
|
|
// 404 page must be placed at the end !!!
|
|
|
{ path: '*', redirect: '/404', hidden: true }
|
|
|
]
|