注:当token和refreshToken失效时,需要退出到IDS登录页,清除cookie,然后再重定向至登录页
fetch(url, {
method: 'GET',
headers: {
'Accept': 'application/json, text/plain, */*',
'Content-Type': 'application/json',
'Cache-Control': ' no-cache'
}
}).then((res:any)=>{
const keys = document.cookie.match(/[^ =;]+(?=\=)/g);
keys.map((item: any) => {
document.cookie = `${item}=;path=/;domain=.zhishinet.com;max-age=0`;
});
window.location.href = (window as GlobalDefinitions).hempConfig.zAuth + "/logOff";})
.catch((err:any)=>{
window.location.href = (window as GlobalDefinitions).hempConfig.zAuth + "/logOff";
});
}