浏览代码

fix: logout exception

Casper Dai 3 年之前
父节点
当前提交
e0481c1dad
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/layout/components/Navbar/index.vue

+ 1 - 1
src/layout/components/Navbar/index.vue

@@ -48,8 +48,8 @@ export default {
   },
   methods: {
     async logout () {
+      this.$router.replace('/')
       await this.$store.dispatch('user/logout')
-      this.$router.push(`/login?redirect=${this.$route.fullPath}`)
     }
   }
 }