[update] OA单点登录后跳转待办页面
This commit is contained in:
+8
-4
@@ -127,10 +127,12 @@ router.beforeEach(async (to, from, next) => {
|
||||
if (to.path === '/user/login' && isOAuth2AppEnv()) {
|
||||
next({ path: OAUTH2_LOGIN_PAGE_PATH })
|
||||
} else {
|
||||
let path = to.path
|
||||
const path = to.fullPath
|
||||
// 在免登录白名单,直接进入
|
||||
if (to.path === '/user/login' && to.path !== process.env.VUE_APP_LOGIN_PAGE) {
|
||||
window.location.replace(process.env.VUE_APP_LOGIN_PAGE)
|
||||
const toPage = process.env.VUE_APP_LOGIN_PAGE.replace('/dashboard/analysis', path.replaceAll('&', '%26'))
|
||||
console.log(toPage)
|
||||
// window.location.replace(toPage)
|
||||
return
|
||||
}
|
||||
next()
|
||||
@@ -139,8 +141,10 @@ router.beforeEach(async (to, from, next) => {
|
||||
} else {
|
||||
// 如果当前是在OAuth2APP环境,就跳转到OAuth2登录页面
|
||||
const path = isOAuth2AppEnv() ? OAUTH2_LOGIN_PAGE_PATH : '/user/login'
|
||||
if (path === '/user/login' && path !== process.env.VUE_APP_LOGIN_PAGE) {
|
||||
window.location.replace(process.env.VUE_APP_LOGIN_PAGE)
|
||||
if (path === '/user/login' && to.path !== process.env.VUE_APP_LOGIN_PAGE) {
|
||||
const toPage = process.env.VUE_APP_LOGIN_PAGE.replace('/dashboard/analysis', to.fullPath.replaceAll('&', '%26'))
|
||||
console.log(toPage)
|
||||
// window.location.replace(toPage)
|
||||
return
|
||||
}
|
||||
next({ path: path, query: { redirect: to.fullPath } })
|
||||
|
||||
Reference in New Issue
Block a user