From 1ff685116866c67484875003814a57dffda6a206 Mon Sep 17 00:00:00 2001 From: fengchenchen Date: Fri, 24 Dec 2021 16:16:21 +0800 Subject: [PATCH] =?UTF-8?q?[update]-=E5=8D=95=E7=82=B9=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E7=9A=84=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/login.js | 2 +- src/permission.js | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) 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()