mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-17 09:34:31 +08:00
增加数据备份功能
This commit is contained in:
+13
-10
@@ -66,16 +66,19 @@ _request.interceptors.response.use(async (response) => {
|
||||
history.push('/login');
|
||||
}
|
||||
} else {
|
||||
const res = await response.clone().json();
|
||||
if (res.code !== 200) {
|
||||
const msg = res.message || res.data;
|
||||
msg &&
|
||||
message.error({
|
||||
content: msg,
|
||||
style: { maxWidth: 500, margin: '0 auto' },
|
||||
});
|
||||
}
|
||||
return res;
|
||||
try {
|
||||
const res = await response.clone().json();
|
||||
if (res.code !== 200) {
|
||||
const msg = res.message || res.data;
|
||||
msg &&
|
||||
message.error({
|
||||
content: msg,
|
||||
style: { maxWidth: 500, margin: '0 auto' },
|
||||
});
|
||||
}
|
||||
return res;
|
||||
} catch (error) { }
|
||||
return response;
|
||||
}
|
||||
return response;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user