补充判断接口返回为空的场景,避免未正确捕获登录过期状态
@@ -3916,7 +3916,7 @@ const addOp3 = async (userTime: any, loadTime: any, object: any, status: any) =>
const res = await axios.get('https://pbl.cocorobo.cn/api/pbl/selectUser', {
params: { userid: props.userid }
})
- if (res == 201) {
+ if (res == 201 || res.length == 0) {
message.error('登录已过期,请重新登录')
return
}