【修改】登录市场和方法统一修改

This commit is contained in:
zer0Black
2022-04-17 23:13:28 +08:00
parent b5ac2c4a1b
commit 4dcbaf5b57
9 changed files with 29 additions and 34 deletions
+1 -8
View File
@@ -14,7 +14,6 @@ whiteList.push(OAUTH2_LOGIN_PAGE_PATH)
router.beforeEach((to, from, next) => {
NProgress.start() // start progress bar
if (Vue.ls.get(ACCESS_TOKEN)) {
/* has token */
if (to.path === '/user/login' || to.path === OAUTH2_LOGIN_PAGE_PATH) {
@@ -66,13 +65,7 @@ router.beforeEach((to, from, next) => {
})
})
.catch(() => {
/* notification.error({
message: '系统提示',
description: '请求用户信息失败,请重试!'
})*/
store.dispatch('Logout').then(() => {
next({ path: '/user/login', query: { redirect: to.fullPath } })
})
return Promise.reject()
})
} else {
next()