Recently, the front-end ajax will be buried, so I wonder if it can be handled uniformly.
Later, I found ajaxSetup to uniformly encapsulate the error and function inside.
<script type="text/javascript">
$.ajaxSetup({error:function( xhr,error,status ){
console.log(this.url)
}})
$.ajax({url:'Abc1111111111111',success:function(data){
console.log(data);
}})
</script>
By getting the url, the corresponding business is found and processed uniformly.