解决不存在页面404跳转空白Bug
This commit is contained in:
parent
bcee37b84b
commit
15613e57ef
@ -23,6 +23,8 @@ router.beforeEach((to, from, next) => {
|
||||
// 拉取user_info
|
||||
const roles = res.roles
|
||||
store.dispatch('GenerateRoutes', { roles }).then(accessRoutes => {
|
||||
//添加404跳转
|
||||
accessRoutes.push({path: '*', redirect: '/404', hidden: true})
|
||||
// 测试 默认静态页面
|
||||
// store.dispatch('permission/generateRoutes', { roles }).then(accessRoutes => {
|
||||
// 根据roles权限生成可访问的路由表
|
||||
|
Loading…
x
Reference in New Issue
Block a user