修改界面

master
夜笙歌 4 years ago
parent b798e1d430
commit 729feacd78

@ -9,7 +9,7 @@ async function autoUpdate(url, interval, callback = () => {}, method = 'post') {
resolve(data) resolve(data)
}, },
error: function (reason) { error: function (reason) {
console.error(reason) setTimeout(() => autoUpdate(url, interval, callback, method), interval)
reject(reason) reject(reason)
} }
}) })

@ -537,16 +537,16 @@ function _stopIt(e) {
} }
/** 设置全局ajax处理 */ /** 设置全局ajax处理 */
$.ajaxSetup({ // $.ajaxSetup({
complete: function(XMLHttpRequest, textStatus) { // complete: function(XMLHttpRequest, textStatus) {
if (textStatus == 'timeout') { // if (textStatus == 'timeout') {
$.modal.alertWarning("服务器超时,请稍后再试!"); // $.modal.alertWarning("服务器超时,请稍后再试!");
$.modal.enable(); // $.modal.enable();
$.modal.closeLoading(); // $.modal.closeLoading();
} else if (textStatus == "parsererror" || textStatus == "error") { // } else if (textStatus == "parsererror" || textStatus == "error") {
$.modal.alertWarning("服务器错误,请联系管理员!"); // $.modal.alertWarning("服务器错误,请联系管理员!");
$.modal.enable(); // $.modal.enable();
$.modal.closeLoading(); // $.modal.closeLoading();
} // }
} // }
}); // });

Loading…
Cancel
Save