diff --git a/src/api/login.js b/src/api/login.js index ef0ebeb..587c44d 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -65,7 +65,7 @@ export function logout(logoutToken) { */ export function thirdLogin(token) { return axios({ - url: `/sys/thirdLogin/getLoginUser/${token}`, + url: `/company/getLoginUser/${token}`, method: 'get', headers: { 'Content-Type': 'application/json;charset=UTF-8' diff --git a/src/permission.js b/src/permission.js index 38e7616..14bd5dc 100644 --- a/src/permission.js +++ b/src/permission.js @@ -51,22 +51,21 @@ router.beforeEach(async (to, from, next) => { const redirect = decodeURIComponent(from.query.redirect || to.path) if (to.path === redirect) { // hack方法 确保addRoutes已完成 ,set the replace: true so the navigation will not leave a history record - // next({ ...to, replace: true }) + next({ ...to, replace: true }) } else { // 跳转到目的路由 - // next({ path: redirect }) + next({ path: redirect }) } }) }) .catch((e) => { - console.log(e, '%%%%%%%%%%') /* notification.error({ message: '系统提示', description: '请求用户信息失败,请重试!' })*/ - // store.dispatch('Logout').then(() => { - // next({ path: '/user/login', query: { redirect: to.fullPath } }) - // }) + store.dispatch('Logout').then(() => { + next({ path: '/user/login', query: { redirect: to.fullPath } }) + }) }) } else { next()