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