xiejun
2023-09-25 8470a4ae665d8b7f7621479c09664c7a3ff0f210
Source/UBCS-WEB/src/page/login/sso.vue
@@ -1,12 +1,12 @@
<template>
</template>
<script>
import {ssoLogin} from "@/api/system/user.js"
import {mapGetters} from "vuex";
import {setStore} from "@/util/store";
export default {
  name: "sso",
  data() {
@@ -20,10 +20,13 @@
  created() {
    this.onLoad()
  },
  methods: {
    onLoad() {
      this.PathString=this.$route.query.empCode;
      //URL传递参数时 会将字符串中的 %2B 也就是+号转换为空格。
      this.PathString = decodeURIComponent(this.$route.query.empCode.replace(/\s/g, '+'));
      //console.log(this.$route);
      //console.log(this.PathString);
      this.$store.dispatch("LoginBySso", { PathString: this.PathString }).then((res) => {
        console.log('res', res)
        this.$router.push({ path: this.tagWel.value });
@@ -32,7 +35,7 @@
  }
}
</script>
<style scoped>
</style>
</style>