fixed: 进入404页面不会触发获取菜单.
This commit is contained in:
@@ -18,9 +18,15 @@ export const DEFAULT_ROUTE_FULL_PATH = '/dashboard/workplace';
|
||||
*/
|
||||
export const WHITE_ROUTER_LIST = [
|
||||
{ name: LOGIN_ROUTE_NAME, children: [] },
|
||||
{ name: REDIRECT_ROUTE_NAME, children: [] },
|
||||
];
|
||||
|
||||
/**
|
||||
* 状态路由
|
||||
*/
|
||||
export const STATUS_ROUTER_LIST = [
|
||||
{ name: NOT_FOUND_ROUTER_NAME, children: [] },
|
||||
{ name: FORBIDDEN_ROUTER_NAME, children: [] },
|
||||
{ name: REDIRECT_ROUTE_NAME, children: [] },
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
@@ -53,7 +53,7 @@ export const REDIRECT_ROUTER: RouteRecordRaw = {
|
||||
* 403 页面
|
||||
*/
|
||||
export const FORBIDDEN_ROUTE: RouteRecordRaw = {
|
||||
path: '/:pathMatch(.*)*',
|
||||
path: '/403',
|
||||
name: FORBIDDEN_ROUTER_NAME,
|
||||
component: () => import('@/views/exception/forbidden/index.vue'),
|
||||
};
|
||||
@@ -62,7 +62,8 @@ export const FORBIDDEN_ROUTE: RouteRecordRaw = {
|
||||
* 404 页面
|
||||
*/
|
||||
export const NOT_FOUND_ROUTE: RouteRecordRaw = {
|
||||
path: '/:pathMatch(.*)*',
|
||||
// path: '/:pathMatch(.*)*',
|
||||
path: '/404',
|
||||
name: NOT_FOUND_ROUTER_NAME,
|
||||
component: () => import('@/views/exception/not-found/index.vue'),
|
||||
};
|
||||
|
||||
@@ -7,14 +7,14 @@ const USER: AppRouteRecordRaw = {
|
||||
component: DEFAULT_LAYOUT,
|
||||
children: [
|
||||
{
|
||||
path: '/user/userChild1',
|
||||
name: 'userChild1',
|
||||
component: () => import('@/views/user/child1/index.vue'),
|
||||
name: 'userRole',
|
||||
path: '/user/role',
|
||||
component: () => import('@/views/user/role/index.vue'),
|
||||
},
|
||||
{
|
||||
path: '/user/userChild2',
|
||||
name: 'userChild2',
|
||||
component: () => import('@/views/user/child2/index.vue'),
|
||||
name: 'userUser',
|
||||
path: '/user/user',
|
||||
component: () => import('@/views/user/user/index.vue'),
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user