Commit 2230ae50 by 展昭

update

parent c00bfb1f
Showing with 2 additions and 4 deletions
...@@ -79,7 +79,8 @@ async function getToken(access_token, appid, redirectPath) { ...@@ -79,7 +79,8 @@ async function getToken(access_token, appid, redirectPath) {
if (res.status == 200) { if (res.status == 200) {
const accessToken = res.data.access_token; const accessToken = res.data.access_token;
localStorage.setItem("token", accessToken); localStorage.setItem("token", accessToken);
this.$router.push(redirectPath); console.log('redirectPath=', redirectPath);
window.location.href = redirectPath;
} }
}, },
err => { err => {
...@@ -100,9 +101,7 @@ function getPathByTo(to, authcode_key) { ...@@ -100,9 +101,7 @@ function getPathByTo(to, authcode_key) {
toPath += toPath.indexOf("?") > -1 ? "&" : "?"; toPath += toPath.indexOf("?") > -1 ? "&" : "?";
toPath += `${key}=${to.query[key]}`; toPath += `${key}=${to.query[key]}`;
} }
toPath = toPath.indexOf('?') > -1 ? toPath + "&t=" + (new Date()).valueOf() : toPath + "?t=" + (new Date()).valueOf(); toPath = toPath.indexOf('?') > -1 ? toPath + "&t=" + (new Date()).valueOf() : toPath + "?t=" + (new Date()).valueOf();
return toPath; return toPath;
} }
...@@ -118,7 +117,6 @@ router.beforeEach((to, from, next) => { ...@@ -118,7 +117,6 @@ router.beforeEach((to, from, next) => {
console.log('err=', err); console.log('err=', err);
}) })
} else { } else {
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