作者:金牛梁浩_934 | 来源:互联网 | 2023-06-05 05:39
$(document).ajaxError(function (e, xhr, options, data) {12345678910 if (xhr.status === 403) { do
$(document).ajaxError(function (e, xhr, options, data) {
1 2 3 4 5 6 7 8 9 10
| if (xhr.status === 403) {
dosomething;
} else if (xhr.status === 0){
alert("当前网络状态不佳哦,请稍后重试");
} else if (xhr.status === 500){
alert("服务器挂掉了,请稍后重试");
} else {
alert("当前网络状态不佳哦,请稍后重试");
}
}) |