Commit 544fb891 by cocomilk2012

update

parent c43100af
Showing with 4 additions and 1 deletions
......@@ -112,7 +112,6 @@ router.beforeEach((to, from, next) => {
console.log('authcode=', authcode);
if (!!authcode) {
getAccessToken(authcode)
.then((res) => {
......@@ -121,12 +120,16 @@ router.beforeEach((to, from, next) => {
//@ts-ignore
const accessToken: string = res;
localStorage.setItem('token', accessToken);
console.log('redirectPath=', redirectPath);
window.location.href = redirectPath;
})
.catch((err) => {
console.log('err=', err);
});
} else {
console.log('to.path=', to.path);
next();
}
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment