fix: 非admin账号可以通过直接访问url方式访问系统设置页面

This commit is contained in:
fit2cloud-chenyw 2023-10-25 11:10:17 +08:00
parent 796edb0be5
commit e963a95ffc

View File

@ -49,6 +49,11 @@ router.beforeEach(async (to, from, next) => {
return pre
}, {})
}
if (!pathValid(to.path) && to.path !== '/404' && !to.path.startsWith('/de-link')) {
const firstPath = getFirstAuthMenu()
next({ path: firstPath || '/404' })
return
}
next()
return
}