mirror of
https://gitee.com/apiadmin/ApiAdmin.git
synced 2025-04-06 03:58:00 +08:00
modified 修改ajax post执行逻辑
This commit is contained in:
parent
1056ba2d3f
commit
d4b1bd5745
7
public/static/admin/dist/js/template.js
vendored
7
public/static/admin/dist/js/template.js
vendored
@ -87,6 +87,7 @@
|
||||
query = form.serialize();
|
||||
target = form.attr('action');
|
||||
$.post(target, query).success(function(data) {
|
||||
var wait = 1000*data.wait;
|
||||
if (data.code == 1) {
|
||||
if (data.url) {
|
||||
message = data.msg + ' 页面即将自动跳转...';
|
||||
@ -94,7 +95,6 @@
|
||||
message = data.msg;
|
||||
}
|
||||
$.alertMsg(message);
|
||||
var wait = 1000*data.wait;
|
||||
setTimeout(function() {
|
||||
if (data.url) {
|
||||
location.href = data.url;
|
||||
@ -104,6 +104,11 @@
|
||||
}, wait);
|
||||
} else {
|
||||
$.alertMsg(data.msg);
|
||||
setTimeout(function() {
|
||||
if (data.url) {
|
||||
location.href = data.url;
|
||||
}
|
||||
}, wait);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user