index.vue 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <template>
  2. <div>
  3. <h4>请稍候...</h4>
  4. </div>
  5. </template>
  6. <script>
  7. import { mapGetters, mapMutations } from 'vuex'
  8. import adminapi from '@/api/system/admin'
  9. import authutils from '@/utils/authutils'
  10. export default {
  11. name: 'index',
  12. props: [],
  13. data() {
  14. return {}
  15. },
  16. created() {
  17. let token = this.$route.query.token
  18. console.log(token)
  19. this.$store.commit('setSsoToken', token)
  20. console.log(this.$store.state.ssoToken)
  21. this.$router.replace({ path: "/" })
  22. // this.$store.dispatch('layout/loadUserInfo').then(resp => {
  23. // console.log('store dispatch result ', resp)
  24. // // if (resp.result == 'success') {
  25. // if (resp.Result == 'success') {
  26. // let lastRoute = this.$store.getters['lastRoute']
  27. // console.log('last route ', lastRoute)
  28. // if (lastRoute) {
  29. // this.$router.replace(lastRoute)
  30. // } else {
  31. // this.$router.replace({path: "/"})
  32. // }
  33. // }else{
  34. // this.$router.replace('/nouser')
  35. // }
  36. // })
  37. },
  38. mounted() {
  39. },
  40. components: {}
  41. }
  42. </script>