Commit 544fb891 by cocomilk2012

update

parent c43100af
Showing with 4 additions and 1 deletions
...@@ -112,7 +112,6 @@ router.beforeEach((to, from, next) => { ...@@ -112,7 +112,6 @@ router.beforeEach((to, from, next) => {
console.log('authcode=', authcode); console.log('authcode=', authcode);
if (!!authcode) { if (!!authcode) {
getAccessToken(authcode) getAccessToken(authcode)
.then((res) => { .then((res) => {
...@@ -121,12 +120,16 @@ router.beforeEach((to, from, next) => { ...@@ -121,12 +120,16 @@ router.beforeEach((to, from, next) => {
//@ts-ignore //@ts-ignore
const accessToken: string = res; const accessToken: string = res;
localStorage.setItem('token', accessToken); localStorage.setItem('token', accessToken);
console.log('redirectPath=', redirectPath);
window.location.href = redirectPath; window.location.href = redirectPath;
}) })
.catch((err) => { .catch((err) => {
console.log('err=', err); console.log('err=', err);
}); });
} else { } else {
console.log('to.path=', to.path);
next(); 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