1
This commit is contained in:
@@ -150,6 +150,12 @@ async function handleLoginSuccess(data: { token: string; permissions?: string })
|
||||
}
|
||||
|
||||
async function logout() {
|
||||
|
||||
const token = await authApi.getToken()
|
||||
if (token) {
|
||||
await authApi.logout(token)
|
||||
}
|
||||
|
||||
await authApi.deleteTokenCache()
|
||||
// 清理前端状态
|
||||
isAuthenticated.value = false
|
||||
@@ -158,7 +164,8 @@ async function logout() {
|
||||
showAuthDialog.value = true
|
||||
showDeviceDialog.value = false
|
||||
|
||||
// 关闭SSE连接
|
||||
// 关闭SSE连接`-+++++++
|
||||
|
||||
SSEManager.disconnect()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user