zouyu
2023-11-17 d8ac6057eaad648687699e25a575f3b7b8c1b102
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<template>
  <div></div>
</template>
<script>
import { mapGetters } from 'vuex'
export default {
  data() {
    return {
      SSO: window.location.hash
    }
  },
  created() {
    this.initLogin()
    console.log(this.SSO)
  },
  computed: {
    ...mapGetters(['tagWel'])
  },
  methods: {
    initLogin() {
      const code = this.SSO.split('&')[0].split('=')[1]
      console.log(code)
 
      if (code) {
        this.$store.dispatch('LoginBySSO', code).then(() => {
          this.$router.push({ path: this.tagWel.value })
        })
      }
    }
  }
}
</script>
<style scoped></style>