|
|
@ -273,6 +273,16 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
methods: { |
|
|
|
// 登陆后跳转逻辑 |
|
|
|
skipAfterLogin() { |
|
|
|
let href = localStorage.getItem("thePageAtExit"); |
|
|
|
if (href) { |
|
|
|
localStorage.removeItem("thePageAtExit"); |
|
|
|
location.href = href; |
|
|
|
} else { |
|
|
|
this.$router.replace({ name: "index" }); |
|
|
|
} |
|
|
|
}, |
|
|
|
// 获取公钥 |
|
|
|
getPubKey() { |
|
|
|
this.$http |
|
|
@ -365,7 +375,7 @@ export default { |
|
|
|
localStorage.setItem("userType", "work"); |
|
|
|
localStorage.setItem("showHeader", "0"); |
|
|
|
localStorage.setItem("token", res.data.token); |
|
|
|
this.$router.replace({ name: "home" }); |
|
|
|
this.skipAfterLogin(); |
|
|
|
}) |
|
|
|
.catch(() => {}); |
|
|
|
// epmet-ext9.elinkservice.cn/platform-admin |
|
|
@ -394,7 +404,7 @@ export default { |
|
|
|
localStorage.setItem("userType", "work"); |
|
|
|
|
|
|
|
localStorage.setItem("token", res.data.token); |
|
|
|
this.$router.replace({ name: "index" }); |
|
|
|
this.skipAfterLogin(); |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
this.endLoading(); |
|
|
|