import Vue from 'vue'
import Vuex from 'vuex'
// import router from '@/router'
import { logout } from '@/api/my'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {},
  getters: {},
  mutations: {},
  actions: {
    logout() {
      return logout().then(() => {
        // router.push('/')
        window.location.href = '/'
      })
    }
  }
})
