5in1 优化若干bug
This commit is contained in:
17
src/App.vue
17
src/App.vue
@@ -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 () => {
|
||||
|
||||
Reference in New Issue
Block a user