Commit 35e5169b by cocomilk2012

update

parent 7a0cbf32
Showing with 3 additions and 1 deletions
...@@ -83,6 +83,8 @@ function getAccessToken(authcode) { ...@@ -83,6 +83,8 @@ function getAccessToken(authcode) {
function getPathByTo(to, authcode_key) { function getPathByTo(to, authcode_key) {
let toPath = to.path || '/'; let toPath = to.path || '/';
for (let key in to.query) { for (let key in to.query) {
key = key.toLowerCase();
console.log('key=', key);
if (key == authcode_key) { if (key == authcode_key) {
continue; continue;
} }
...@@ -110,7 +112,7 @@ router.beforeEach((to, from, next) => { ...@@ -110,7 +112,7 @@ router.beforeEach((to, from, next) => {
if (!!authcode) { if (!!authcode) {
getAccessToken(authcode) getAccessToken(authcode)
.then((res) => { .then((res) => {
const redirectPath = getPathByTo(to, 'authCode'); const redirectPath = getPathByTo(to, 'authcode');
console.log('redirectPath=', redirectPath); console.log('redirectPath=', redirectPath);
//@ts-ignore //@ts-ignore
const accessToken: string = res; const accessToken: string = res;
......
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