refactor: bc 方法增加ajax请求错误时显示地址
This commit is contained in:
parent
21c8080a1f
commit
59cd001c74
|
@ -200,7 +200,10 @@
|
||||||
success(result);
|
success(result);
|
||||||
},
|
},
|
||||||
error: function (XMLHttpRequest, textStatus, errorThrown) {
|
error: function (XMLHttpRequest, textStatus, errorThrown) {
|
||||||
if (window.toastr) toastr.error(XMLHttpRequest.status === 500 ? '后台应用程序错误' : errorThrown, '程序错误');
|
if (window.toastr) {
|
||||||
|
if (errorThrown === '') errorThrown = url;
|
||||||
|
toastr.error(XMLHttpRequest.status === 500 ? '后台应用程序错误' : errorThrown, '程序错误');
|
||||||
|
}
|
||||||
success(false);
|
success(false);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue