浏览代码

修改BUG

JutarryWu 4 天之前
父节点
当前提交
3057e06ed6
共有 1 个文件被更改,包括 0 次插入18 次删除
  1. 0 18
      src/layout/components/NavBar/components/NavbarRight.vue

+ 0 - 18
src/layout/components/NavBar/components/NavbarRight.vue

@@ -42,9 +42,7 @@
 import { useAppStore, useTagsViewStore, useUserStore, useSettingsStore } from '@/store'
 import defaultSettings from '@/settings'
 import { DeviceEnum } from '@/enums/DeviceEnum'
-import { useSocket } from '@/utils/websoket'
 
-const { socket } = useSocket()
 const appStore = useAppStore()
 const tagsViewStore = useTagsViewStore()
 const userStore = useUserStore()
@@ -77,22 +75,6 @@ function logout() {
       })
   })
 }
-
-onMounted(() => {
-  socket.on('message', (data: any) => {
-    // 若Electron关闭窗口,则注销并退出系统
-    if (data === 'close-win-after') {
-      userStore
-        .logout()
-        .then(() => {
-          tagsViewStore.delAllViews()
-        })
-        .then(() => {
-          router.push(`/login?redirect=${route.fullPath}`)
-        })
-    }
-  })
-})
 </script>
 <style lang="scss" scoped>
 .setting-item {