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
42
43
44
45
<template>
<div class="sso">
<h2>正在跳转...</h2>
</div>
</template>
<script>
export default {
mounted() {
let token = this.$route.query.token;
let siteid = this.$route.query.siteid;
console.log("token",token)
console.log("siteid",siteid)
if (token) {
console.log(111)
window.sessionStorage.setItem("token", token);
window.sessionStorage.setItem("siteid", siteid);
this.$router.push("/index"); // 有token直接跳转首页
} else {
console.log(222)
this.$message({
message: "没有权限,正在跳转登录页面...",
center: true,
});
setTimeout(function () {
window.location.href =
process.env.VUE_APP_PORTAL_URL == "undefined"
? "http://192.168.0.124:11072"
: process.env.VUE_APP_PORTAL_URL;
//this.$router.push('/login')
}, 3000);
}
},
};
</script>
<style>
.sso {
width: 300px;
height: 100px;
}
</style>