| | |
| | | import { mapGetters } from 'vuex' |
| | | import Breadcrumb from '@/components/Breadcrumb' |
| | | import Hamburger from '@/components/Hamburger' |
| | | import { getCookie } from '@/utils/auth' |
| | | import { getCookie, removeCookie, removeToken } from '@/utils/auth' |
| | | import { logout } from '@/api/user' |
| | | import { resetRouter } from '@/router' |
| | | |
| | | export default { |
| | | components: { |
| | |
| | | }, |
| | | async logout() { |
| | | await this.$store.dispatch('user/logout') |
| | | this.$router.push(`/login?redirect=${this.$route.fullPath}`) |
| | | this.$message.success('退出成功!') |
| | | this.$router.push(`/login`) |
| | | } |
| | | } |
| | | } |