Commit 6244e6bf by RuoYi

全局ajax提示

parent c1be1659
......@@ -138,13 +138,15 @@ function createMenuItem(dataUrl, menuName) {
return false;
}
/** 设置全局ajax超时处理 */
/** 设置全局ajax处理 */
$.ajaxSetup({
complete: function(XMLHttpRequest, textStatus) {
if (textStatus == "parsererror") {
$.modal.confirm("登陆超时!请重新登陆!", function() {
window.location.href = ctx + "login";
})
if (textStatus == 'timeout') {
$.modal.alertWarning("服务器超时,请稍后再试!");
$.modal.closeLoading();
} else if (textStatus == "parsererror") {
$.modal.alertWarning("服务器错误,请联系管理员!");
$.modal.closeLoading();
}
}
});
});
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