spring
2025-04-09 58be07dbde1f3375d86204cb215c8372b615a01b
src/views/thirdpartylogin.vue
@@ -5,25 +5,18 @@
export default {
  data() {
    return {
      SSO: window.location.hash
    }
    };
  },
  created() {
    this.initLogin()
    console.log(this.SSO)
    this.initLogin();
  },
  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.$store.dispatch('LoginBySSO', {code: this.$route.query.code}).then(() => {
        this.$router.push({path: '/'});
      });
    }
  }
}
};
</script>
<style scoped></style>
<style scoped></style>