From 63d3a5d6228b87dbb6ba4b3a515e7d1eeff6b9f7 Mon Sep 17 00:00:00 2001 From: BoBoooooo <17746714@qq.com> Date: Thu, 18 Oct 2018 16:41:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9nav?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/user.js | 2 ++ src/views/layout/components/Navbar.vue | 6 ++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/store/modules/user.js b/src/store/modules/user.js index f26c355..4a518d1 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -92,7 +92,9 @@ const user = { logout().then(res => { commit('SET_TOKEN', '') removeToken() + location.reload() resolve() + }) }) diff --git a/src/views/layout/components/Navbar.vue b/src/views/layout/components/Navbar.vue index cfec7ad..094b8a4 100644 --- a/src/views/layout/components/Navbar.vue +++ b/src/views/layout/components/Navbar.vue @@ -54,9 +54,7 @@ Screenfull, this.$store.dispatch('ToggleSideBar') }, logout() { - this.$store.dispatch('FedLogOut').then(() => { - location.reload() // 为了重新实例化vue-router对象 避免bug - }) + this.$store.dispatch('FedLogOut') }, changepassword() { @@ -98,7 +96,7 @@ Screenfull, } .screenfull { position: absolute; - right: 90px; + right: 120px; top: 14px; color: red;