logout.vue 367 B

1234567891011121314151617181920212223
  1. <template>
  2. <div></div>
  3. </template>
  4. <script>
  5. import { Toast } from 'vant'
  6. export default {
  7. name: 'Logout',
  8. data() {
  9. return {}
  10. },
  11. watch: {},
  12. mounted() {
  13. this.$store.dispatch('user/cleanCache').then(res => {
  14. Toast('退出成功')
  15. this.$router.push('/login')
  16. })
  17. },
  18. methods: {}
  19. }
  20. </script>