From b65f545b92e8bb275e5ee1f03b70b1ee94074a80 Mon Sep 17 00:00:00 2001 From: johnniang Date: Tue, 30 Apr 2019 11:36:22 +0800 Subject: [PATCH] Complete logout procedure --- src/components/Tools/UserMenu.vue | 4 ++-- src/permission.js | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/components/Tools/UserMenu.vue b/src/components/Tools/UserMenu.vue index 6429e343..0fb351d1 100644 --- a/src/components/Tools/UserMenu.vue +++ b/src/components/Tools/UserMenu.vue @@ -80,7 +80,7 @@ export default { this.loadOptions() }, methods: { - ...mapActions(['Logout']), + ...mapActions(['logout']), ...mapGetters(['nickname']), handleLogout() { const that = this @@ -90,7 +90,7 @@ export default { content: '真的要注销登录吗 ?', onOk() { return that - .Logout({}) + .logout({}) .then(() => { window.location.reload() }) diff --git a/src/permission.js b/src/permission.js index 4cb0456c..a1f1ceed 100644 --- a/src/permission.js +++ b/src/permission.js @@ -21,6 +21,7 @@ router.beforeEach((to, from, next) => { // TODO Get installation status next() + NProgress.done() return } @@ -28,12 +29,10 @@ router.beforeEach((to, from, next) => { // Check whitelist if (whiteList.includes(to.name)) { next() + NProgress.done() return } next({ name: 'Login', query: { redirect: to.fullPath } }) -}) - -router.afterEach(() => { NProgress.done() })