<template>
  <div class="container">
    <header>
      <div>404</div>
      <div>找不到该页面</div>
    </header>
  </div>
</template>

<script>
import { ssoLogin } from "@/api/user"
import store from "@/store"

export default {
  name: "Sso",
  components: {},
  data() {
    return {}
  },
  beforeRouteEnter(to, from, next) {
    // store.commit("user/setAccessToken", "05152131-f2e5-44b7-b3af-61f8f0c1bf2d");
    // next("/");
    ssoLogin( to.query.token || "" )
      .then((res) => {
        store.commit("user/setAccessToken", res.access_token)
        next("/")
      })
      .catch((e) => {
        next()
      })
  },
  mounted() {},
  methods: {},
}
</script>

<style lang="scss" scoped>
header {
  font-size: 22px;
}
</style>
