<template>
  <div id="test01">
    <!-- test01 -->
  </div>
</template>

<script>
import axios from 'axios'
import { getToken, setToken, removeToken } from '@/utils/auth'
export default {
  data () {
    return {}
  },
  created() {
    this.jump()
  },
  mounted() {
  },
  methods: {
    jump() {
      axios.post('https://test-sy.derom.com/ruoyi-admin/login/sso').then(res => {
        if (res.data.code === 200) {
          let token = res.data.token
          setToken(token)
          this.$store.commit('SET_TOKEN', token)
          this.$store.dispatch("GetInfo").then(() => {})
          this.$store.dispatch("GenerateRoutes").then(() => {})
          this.$router.push({ path: "/system/user" })
        }
      })
    }
  }
}
</script>