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
34
35
36
37
38
39
40
41
| <template>
|
| </template>
|
| <script>
| import {ssoLogin} from "@/api/system/user.js"
| import {mapGetters} from "vuex";
| import {setStore} from "@/util/store";
|
| export default {
| name: "sso",
| data() {
| return {
| PathString:'',
| }
| },
| computed: {
| ...mapGetters(["tagWel"])
| },
| created() {
| this.onLoad()
| },
|
| methods: {
| onLoad() {
| //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 });
| })
| }
| }
| }
| </script>
|
| <style scoped>
|
| </style>
|
|