mirror of
https://gitee.com/myxzgzs/boyue-vue-pro.git
synced 2025-08-09 08:52:44 +08:00
28 lines
515 B
Vue
28 lines
515 B
Vue
![]() |
<template>
|
|||
|
<div>登录成功!</div>
|
|||
|
</template>
|
|||
|
|
|||
|
<script>
|
|||
|
import { getToken, setToken, removeToken } from '@/utils/auth'
|
|||
|
|
|||
|
export default {
|
|||
|
created() {
|
|||
|
var token = this.getOauthToken();
|
|||
|
setToken(token);
|
|||
|
this.$router.push({ path: this.redirect || "/" }).catch(() => {});
|
|||
|
},
|
|||
|
methods: {
|
|||
|
getOauthToken() {
|
|||
|
console.log(this);
|
|||
|
var h = window.location.href;
|
|||
|
var token = "token=";
|
|||
|
return h.substring(h.indexOf(token)+token.length);
|
|||
|
}
|
|||
|
},
|
|||
|
}
|
|||
|
</script>
|
|||
|
|
|||
|
<style>
|
|||
|
|
|||
|
</style>
|