diff --git a/src/layout/index.vue b/src/layout/index.vue index e2fe03f..d2a4861 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -34,7 +34,7 @@ 个人信息 - + 退出 @@ -147,6 +147,9 @@ export default { }, methods: { async logout() { + if (this.$store.state.app.isInElectron) { + return + } await this.$store.dispatch('app/clearLayout') await this.$store.dispatch("user/logout"); this.$router.push(`/login`); diff --git a/src/store/modules/app.js b/src/store/modules/app.js index 39327f0..43cefb0 100644 --- a/src/store/modules/app.js +++ b/src/store/modules/app.js @@ -11,6 +11,7 @@ const state = { }, device: "desktop", workerLayout: {}, + isInElectron: window.process?.versions?.hasOwnProperty("electron"), isInIframe: false, }; const getter = {