王震
2023-12-13 67da82f0b0c24df5f19bbfcfec63801d9ae902d8
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
<template>
  <div></div>
</template>
<script>
import { mapGetters } from 'vuex'
export default {
  data() {
    return {
      SSO: window.location.hash
    }
  },
  created() {
    this.initLogin()
  },
  computed: {
    ...mapGetters(['tagWel'])
  },
  methods: {
    initLogin() {
      const code = this.SSO.split('&')[0].split('=')[1]
 
      if (code) {
        this.$store.dispatch('LoginBySSO', code).then(() => {
          this.$router.push({ path: this.tagWel.value })
        })
      }
    }
  }
}
</script>
<style scoped></style>