Commit b749dca0 by xiexiaoqin

fix: 401 login

parent e959b906
...@@ -39,13 +39,14 @@ export default function xFetch({ url, method, data, type }) { ...@@ -39,13 +39,14 @@ export default function xFetch({ url, method, data, type }) {
fail: function (err) { fail: function (err) {
if (err && err.status == 401) { if (err && err.status == 401) {
login(); login();
}
if (err.errorMsg === 'socket is closed') {
} else { } else {
console.log(err) if (err.errorMsg === 'socket is closed') {
alertOnce((err && err.errorMsg) || '网络异常,请重试', rejects, err);
} else {
alertOnce((err && err.errorMsg) || '网络异常,请重试', 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