防止调试

This commit is contained in:
haozq 2024-12-13 09:35:10 +08:00
parent 2cecb97652
commit 287c51fed2
3 changed files with 20 additions and 9 deletions

View File

@ -62,7 +62,7 @@ function login(){
}
},error(event, xhr, settings, error){
console.log(error)
console.log("网络异常")
}
})

View File

@ -26,8 +26,8 @@ $(document).ajaxSuccess(function (event, xhr, settings, data) {
});
// 请求失败后的拦截器
$(document).ajaxError(function (event, xhr, settings, error) {
error(event, xhr, settings, error);
$(document).ajaxError(function (event, xhr, settings, er) {
error(event, xhr, settings, er);
});
// 修改请求数据的函数

View File

@ -7,9 +7,20 @@ function success(data,textStatus, jqXhr){
}
// console.log("数据调用成功")
}
/**
* 异常调用
*/
function error(event, xhr, settings, error){
console.log("error")
}
function error(event, xhr, settings, er){
console.error(event);
console.error(xhr);
console.error(settings);
console.error(er);
}
(() => {
function ban() {
setInterval(() => {
debugger;
}, 50);
}
try {
ban();
} catch (err) { }
})();