添加周期
This commit is contained in:
@@ -161,7 +161,7 @@ function createAxios<Data = any, T = ApiPromise<Data>>(
|
||||
})
|
||||
.catch(err => {
|
||||
// refresh_token + CAS 都过期 → 重新走CAS登录
|
||||
window.location.href = '/api/pqs-auth/oauth/lnCheck'
|
||||
//window.location.href = '/api/pqs-auth/oauth/lnCheck'
|
||||
return Promise.reject(err)
|
||||
})
|
||||
.finally(() => {
|
||||
@@ -215,10 +215,14 @@ function createAxios<Data = any, T = ApiPromise<Data>>(
|
||||
return Promise.reject(response.data)
|
||||
} else if (response.data.code == 'A0121') {
|
||||
//统一认证过期
|
||||
const casLogoutUrl =
|
||||
'http://privilege-epri.dcloud.ln.dc.sgcc.com.cn/cas/login?service=http://PQMonitoring.dcloud.ln.dc.sgcc.com.cn'
|
||||
window.location.href = casLogoutUrl
|
||||
|
||||
//const casLogoutUrl = 'http://privilege-epri.dcloud.ln.dc.sgcc.com.cn/cas/login?service=http://PQMonitoring.dcloud.ln.dc.sgcc.com.cn'
|
||||
// 1. 清空本地失效token、用户信息
|
||||
adminInfo.removeToken()
|
||||
adminInfo.reset()
|
||||
// 2. 跳转统一鉴权中转接口
|
||||
const authCheckUrl = '/api/pqs-auth/oauth/lnCheck'
|
||||
window.location.href = authCheckUrl
|
||||
// 中断请求
|
||||
return Promise.reject(response.data)
|
||||
} else {
|
||||
if (options.showCodeMessage) {
|
||||
|
||||
Reference in New Issue
Block a user