import { removeToken } from "@/auth/auth";
import { logout } from "@/api/login";
import Vue from "vue";

Vue.mixin({
  methods: {
    logout(cause = "") {
      // window._hmt.push(["_trackEvent", "退出", cause]);
      return logout().finally(() => {
        removeToken();
        this.$router.push("/login" + cause);
      });
    },
  },
});
