表格树添加获取数据后响应回调处理
parent
ca6a4b2ecf
commit
82f8dadbae
|
@ -562,12 +562,15 @@ var table = {
|
||||||
return $.common.uniqueFn(rows);
|
return $.common.uniqueFn(rows);
|
||||||
},
|
},
|
||||||
// 请求获取数据后处理回调函数,校验异常状态提醒
|
// 请求获取数据后处理回调函数,校验异常状态提醒
|
||||||
responseHandler: function(data) {
|
responseHandler: function(res) {
|
||||||
if (data.code != undefined && data.code != 0) {
|
if (typeof table.options.responseHandler == "function") {
|
||||||
$.modal.alertWarning(data.msg);
|
table.options.responseHandler(res);
|
||||||
|
}
|
||||||
|
if (res.code != undefined && res.code != 0) {
|
||||||
|
$.modal.alertWarning(res.msg);
|
||||||
return [];
|
return [];
|
||||||
} else {
|
} else {
|
||||||
return data;
|
return res;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue