5in1 优化若干bug

This commit is contained in:
2026-03-03 14:36:25 +08:00
parent b6f8586efa
commit e1c132ead9
6 changed files with 32 additions and 9 deletions

View File

@@ -163,6 +163,13 @@ const startHealthCheck = () => {
if (result.success && result.code === 40400) {
alert('当前账号已在其他地方登录,请重新登录')
localStorage.removeItem(USER_KEY)
// 隐藏所有 BrowserView 并停止自动化,防止视图悬浮在登录页上方
try {
await window.electronAPI.hideViews()
await handleStopAll()
} catch (e) {
console.warn('[App] 清理视图失败:', e)
}
currentPage.value = 'login'
}
} catch (error) {
@@ -226,8 +233,16 @@ const handleLogout = async () => {
if (isElectron()) {
await window.electronAPI.logout()
}
localStorage.removeItem(USER_KEY)
try {
await window.electronAPI.hideViews()
await handleStopAll()
} catch (e) {
console.warn('[App] 清理视图失败:', e)
}
currentPage.value = 'login'
localStorage.removeItem(USER_KEY)
// currentPage.value = 'login'
}
const handleStopAll = async () => {