【修改】登录市场和方法统一修改
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user