8.15 登录过程中用户信息错误导致登录失败的业务处理

This commit is contained in:
jl-zhoujl2
2022-08-15 09:14:14 +08:00
parent c060f3fa23
commit 3fe854ff86
7 changed files with 85 additions and 59 deletions

View File

@ -38,10 +38,16 @@ const Loading: React.FC<{}> = () => {
await cooperReloadToken('', headers)
await getUserData(token, url, extra, 1)
} else if (userType == '2') {//专家
await refreshTokenApi(params, header).then(async res => {
if (res?.success == true) {
sessionStorage.setItem('Authorization', res?.data?.value);
await getUserData(token, url, extra, 1)
// await refreshTokenApi(params, header).then(async res => {
// if (res?.success == true) {
// sessionStorage.setItem('Authorization', res?.data?.value);
// await getUserData(token, url, extra, 1)
// }
// })
history.replace({
pathname: '/401',
query: {
code: '403',
}
})
}