import { mapMutations } from 'vuex'
import { removeToken } from '@/libs/util'
export default {
  methods: {
    ...mapMutations(['setApiToken']),
    getApiToken (callback) {
      removeToken()
      this.api({
        apiName: 'creatApiToken',
        success: (res) => {
          this.setApiToken(res.data)
          callback()
        }
      })
    }
  }
}
