单败重构
This commit is contained in:
parent
afd5323ade
commit
a72c6fcd2c
@ -378,18 +378,18 @@ const viewAuthorMaps = (username) => {
|
|||||||
|
|
||||||
const navigateToTool = async (path, requiredPrivileges) => {
|
const navigateToTool = async (path, requiredPrivileges) => {
|
||||||
try {
|
try {
|
||||||
const userInfo = await getUserInfo()
|
// const userInfo = await getUserInfo()
|
||||||
if (!userInfo) {
|
// if (!userInfo) {
|
||||||
router.push('/backend/login')
|
// router.push('/backend/login')
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
if (requiredPrivileges && !hasPrivilegeWithTemp(userInfo, requiredPrivileges)) {
|
// if (requiredPrivileges && !hasPrivilegeWithTemp(userInfo, requiredPrivileges)) {
|
||||||
// 显示权限不足提示
|
// // 显示权限不足提示
|
||||||
alert('权限不足,需要相应权限才能使用此工具')
|
// alert('权限不足,需要相应权限才能使用此工具')
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
router.push(path)
|
router.push(path)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
router.push('/backend/login')
|
router.push('/backend/login')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user