单败重构

This commit is contained in:
Kunagisa 2025-08-05 17:10:06 +08:00
parent afd5323ade
commit a72c6fcd2c

View File

@ -378,18 +378,18 @@ const viewAuthorMaps = (username) => {
const navigateToTool = async (path, requiredPrivileges) => {
try {
const userInfo = await getUserInfo()
if (!userInfo) {
router.push('/backend/login')
return
}
if (requiredPrivileges && !hasPrivilegeWithTemp(userInfo, requiredPrivileges)) {
//
alert('权限不足,需要相应权限才能使用此工具')
return
}
// const userInfo = await getUserInfo()
// if (!userInfo) {
// router.push('/backend/login')
// return
// }
//
// if (requiredPrivileges && !hasPrivilegeWithTemp(userInfo, requiredPrivileges)) {
// //
// alert('使')
// return
// }
//
router.push(path)
} catch (error) {
router.push('/backend/login')