优化
This commit is contained in:
parent
d230c2dc98
commit
bebeb2c816
@ -164,6 +164,9 @@ function permissionClick() {
|
|||||||
}
|
}
|
||||||
localStorage.setItem('currentInfo', JSON.stringify(currentInfo))
|
localStorage.setItem('currentInfo', JSON.stringify(currentInfo))
|
||||||
}
|
}
|
||||||
|
function routerlink(){
|
||||||
|
router.push({ path: '/UserLogin' })
|
||||||
|
}
|
||||||
function logout() {
|
function logout() {
|
||||||
ElMessageBox.confirm(
|
ElMessageBox.confirm(
|
||||||
'确定退出登录?',
|
'确定退出登录?',
|
||||||
@ -179,12 +182,7 @@ function logout() {
|
|||||||
localStorage.removeItem('userInfo')
|
localStorage.removeItem('userInfo')
|
||||||
localStorage.removeItem('permissions')
|
localStorage.removeItem('permissions')
|
||||||
localStorage.removeItem('currentInfo')
|
localStorage.removeItem('currentInfo')
|
||||||
const router = useRouter()
|
routerlink()
|
||||||
router.push({ path: '/UserLogin' })
|
|
||||||
.catch((err:any) => {
|
|
||||||
console.error("路由跳转失败:", err)
|
|
||||||
// ElMessage.error("跳转失败,请检查路由配置")
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
.catch(() => { })
|
.catch(() => { })
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user