单败重构

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) => { 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')