mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-09 11:32:48 +08:00
fix: 修复设置自定义form回调时未执行终止逻辑的问题,导致的登录密码错误时再次请求失败
This commit is contained in:
@@ -144,15 +144,32 @@
|
|||||||
};
|
};
|
||||||
complete = complete || function () {
|
complete = complete || function () {
|
||||||
};
|
};
|
||||||
no = no || function (res) {
|
if(no){
|
||||||
var msg = res.msg == undefined ? '返回数据格式有误' : res.msg;
|
var originalNo = no;
|
||||||
admin.msg.error(msg);
|
no = function (res) {
|
||||||
complete();
|
originalNo(res);
|
||||||
return false;
|
complete();
|
||||||
};
|
}
|
||||||
ex = ex || function (res) {
|
}else{
|
||||||
complete();
|
no = function (res) {
|
||||||
};
|
var msg = res.msg == undefined ? '返回数据格式有误' : res.msg;
|
||||||
|
admin.msg.error(msg);
|
||||||
|
complete();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(ex){
|
||||||
|
var originalEx = ex;
|
||||||
|
ex = function (res) {
|
||||||
|
originalEx(res);
|
||||||
|
complete();
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
ex = function (res) {
|
||||||
|
complete();
|
||||||
|
};
|
||||||
|
}
|
||||||
if (option.url == '') {
|
if (option.url == '') {
|
||||||
admin.msg.error('请求地址不能为空');
|
admin.msg.error('请求地址不能为空');
|
||||||
return false;
|
return false;
|
||||||
@@ -2250,21 +2267,28 @@
|
|||||||
refreshTable = true;
|
refreshTable = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
ok = ok || function (res) {
|
if(ok){
|
||||||
res.msg = res.msg || '';
|
var originalOk = ok;
|
||||||
admin.msg.success(res.msg, function () {
|
ok = function (res) {
|
||||||
|
originalOk(res);
|
||||||
if (close) {
|
complete()
|
||||||
admin.api.closeCurrentOpen({
|
}
|
||||||
refreshTable: refreshTable,
|
}else{
|
||||||
onClose: function () {
|
ok = function (res) {
|
||||||
complete();
|
res.msg = res.msg || '';
|
||||||
}
|
admin.msg.success(res.msg, function () {
|
||||||
});
|
if (close) {
|
||||||
}
|
admin.api.closeCurrentOpen({
|
||||||
});
|
refreshTable: refreshTable,
|
||||||
return false;
|
onClose: function () {
|
||||||
};
|
complete();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
}
|
||||||
admin.request.post({
|
admin.request.post({
|
||||||
url: url,
|
url: url,
|
||||||
data: data,
|
data: data,
|
||||||
|
|||||||
Reference in New Issue
Block a user