mirror of
https://gitee.com/apiadmin/ApiAdmin.git
synced 2025-04-06 03:58:00 +08:00
modified Ajax相应404和500错误
This commit is contained in:
parent
1b386296d8
commit
6eb7f963bc
@ -100,6 +100,16 @@
|
||||
}
|
||||
}, 1000*data.wait);
|
||||
}
|
||||
},
|
||||
statusCode: {
|
||||
404: function() {
|
||||
loadingBox.modal('hide');
|
||||
$.alertMsg('页面未找到');
|
||||
},
|
||||
500: function () {
|
||||
loadingBox.modal('hide');
|
||||
$.alertMsg('服务器内部错误,请联系管理员!');
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
@ -157,7 +167,15 @@
|
||||
$.ajax({
|
||||
type: "PUT",
|
||||
url: target,
|
||||
data: query
|
||||
data: query,
|
||||
statusCode: {
|
||||
404: function() {
|
||||
$.alertMsg('页面未找到');
|
||||
},
|
||||
500: function () {
|
||||
$.alertMsg('服务器内部错误,请联系管理员!');
|
||||
}
|
||||
}
|
||||
}).done(function( data ) {
|
||||
var wait = 1000*data.wait;
|
||||
if (data.code == 1) {
|
||||
@ -204,7 +222,15 @@
|
||||
$.ajax({
|
||||
type: "DELETE",
|
||||
url: url,
|
||||
data: urlData
|
||||
data: urlData,
|
||||
statusCode: {
|
||||
404: function () {
|
||||
$.alertMsg('页面未找到');
|
||||
},
|
||||
500: function () {
|
||||
$.alertMsg('服务器内部错误,请联系管理员!');
|
||||
}
|
||||
}
|
||||
}).done(function( data ) {
|
||||
var wait = 1000*data.wait;
|
||||
if (data.code == 1) {
|
||||
@ -250,7 +276,15 @@
|
||||
$.ajax({
|
||||
type: "PUT",
|
||||
url: url,
|
||||
data: urlData
|
||||
data: urlData,
|
||||
statusCode: {
|
||||
404: function () {
|
||||
$.alertMsg('页面未找到');
|
||||
},
|
||||
500: function () {
|
||||
$.alertMsg('服务器内部错误,请联系管理员!');
|
||||
}
|
||||
}
|
||||
}).done(function( data ) {
|
||||
var wait = 1000*data.wait;
|
||||
if (data.code == 1) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user