权限跳转修改+预算填报修改
This commit is contained in:
@@ -66,7 +66,7 @@ router.beforeEach((to, from, next) => {
|
||||
// 根据 roles 权限生成可访问的路由表
|
||||
router.addRoutes(accessRoutes) // 动态添加可访问路由表
|
||||
const defaultPath = findDefaultPathFromMenus(userInfo.menus) || '/'
|
||||
store.commit('permission/SET_DEFAULT_PATH', defaultPath)
|
||||
store.dispatch('SetDefaultPath', defaultPath)
|
||||
// 仅当目标为根路径 '/' 时跳默认页;否则保持当前路径(含刷新场景),避免刷新被误判为“未匹配”而跳到默认页
|
||||
if (to.path === '/') {
|
||||
next({ path: defaultPath, replace: true })
|
||||
|
||||
Reference in New Issue
Block a user