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