소스 검색

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}`)
     }
   }
 }