Commit 356c52db by xiexiaoqin

fix: 401 login

parent ae2cbaa7
......@@ -39,13 +39,14 @@ export default function xFetch({ url, method, data, type }) {
fail: function (err) {
if (err && err.status == 401) {
login();
}
if (err.errorMsg === 'socket is closed') {
} else {
console.log(err)
alertOnce((err && err.errorMsg) || '网络异常,请重试' + err.status, rejects, err);
if (err.errorMsg === 'socket is closed') {
} else {
alertOnce((err && err.errorMsg) || '网络异常,请重试' + err.status, rejects, err);
}
}
}
});
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment