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>
<div class="container">
<header>
<div>404</div>
<div>找不到该页面</div>
</header>
</div>
</template>
<script>
import { ssoLogin } from "@/api/user"
import store from "@/store"
export default {
name: "Sso",
components: {},
data() {
return {}
},
beforeRouteEnter(to, from, next) {
// store.commit("user/setAccessToken", "05152131-f2e5-44b7-b3af-61f8f0c1bf2d");
// next("/");
ssoLogin( to.query.token || "" )
.then((res) => {
store.commit("user/setAccessToken", res.access_token)
next("/")
})
.catch((e) => {
next()
})
},
mounted() {},
methods: {},
}
</script>
<style lang="scss" scoped>
header {
font-size: 22px;
}
</style>