feat : 测试sso单点登录之后的重定向路径4
This commit is contained in:
@@ -29,7 +29,8 @@ serveice.interceptors.response.use(response => {
|
||||
if (response.request.responseType === 'blob' || response.request.responseType === 'arraybuffer') {
|
||||
return response.data
|
||||
}
|
||||
console.log("windows", window.location.pathname)
|
||||
console.log("window.location.pathname", window.location.pathname)
|
||||
console.log("windows", window.location.search)
|
||||
return response.data
|
||||
}, error => {
|
||||
let response = error.response
|
||||
@@ -43,8 +44,13 @@ serveice.interceptors.response.use(response => {
|
||||
closeOnClickModal: false
|
||||
}).then(() => {
|
||||
removeToken()
|
||||
sessionStorage.setItem('toView', window.location.pathname)
|
||||
window.location = '/api/auth/cas/login'
|
||||
let path = window.location.pathname;
|
||||
let query = window.location.search
|
||||
sessionStorage.setItem('toView', JSON.stringify({
|
||||
path: path,
|
||||
query: query
|
||||
}))
|
||||
window.location.href = `${window.location.origin}/api/auth/cas/login`
|
||||
})
|
||||
return Promise.reject('会话已过期,请重新登录')
|
||||
case 402:
|
||||
|
||||
Reference in New Issue
Block a user