|
|
@ -52,11 +52,6 @@ function paramsFormat(params) { |
|
|
|
router.beforeEach((to, from, next) => { |
|
|
|
let urlParams = getQueryParams() |
|
|
|
if (urlParams.appId) { |
|
|
|
console.log( |
|
|
|
localStorage.getItem('appId') && urlParams.appId !== localStorage.getItem('appId'), |
|
|
|
urlParams.appId, |
|
|
|
localStorage.getItem('appId') |
|
|
|
) |
|
|
|
if (localStorage.getItem('appId') && urlParams.appId !== localStorage.getItem('appId')) { |
|
|
|
localStorage.removeItem('token') |
|
|
|
location.reload() |
|
|
@ -93,7 +88,6 @@ router.beforeEach((to, from, next) => { |
|
|
|
}) |
|
|
|
} else { |
|
|
|
if (getQueryStringByName('code')) { |
|
|
|
// return
|
|
|
|
login({ wxCode: getQueryStringByName('code') }).then(res => { |
|
|
|
localStorage.setItem('token', res.token) |
|
|
|
let state = decodeURIComponent(getQueryStringByName('state')) |
|
|
|