Merge pull request 'feat : 测试sso单点登录之后的重定向路径3' (#107) from master into prod
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/107
This commit is contained in:
@@ -189,7 +189,8 @@ router.beforeEach(async (to, form, next) => {
|
||||
NProgress.done()
|
||||
} else {
|
||||
sessionStorage.setItem('toView', JSON.stringify(to))
|
||||
next({path: '/api/auth/cas/login'})
|
||||
window.location.href = `${window.location.origin}/api/auth/cas/login`
|
||||
// next({path: '/api/auth/cas/login'})
|
||||
}
|
||||
} else {
|
||||
if (to.path === '/login'|| to.path === '/cas/login') {
|
||||
|
||||
@@ -29,6 +29,7 @@ serveice.interceptors.response.use(response=>{
|
||||
if (response.request.responseType === 'blob' || response.request.responseType === 'arraybuffer') {
|
||||
return response.data
|
||||
}
|
||||
console.log("windows", window.location.pathname)
|
||||
return response.data
|
||||
}, error => {
|
||||
let response = error.response
|
||||
@@ -42,6 +43,7 @@ serveice.interceptors.response.use(response=>{
|
||||
closeOnClickModal: false
|
||||
}).then(() => {
|
||||
removeToken()
|
||||
sessionStorage.setItem('toView', window.location.pathname)
|
||||
window.location = '/api/auth/cas/login'
|
||||
})
|
||||
return Promise.reject('会话已过期,请重新登录')
|
||||
|
||||
Reference in New Issue
Block a user