表格树添加获取数据后响应回调处理

pull/149/MERGE
RuoYi 2020-03-14 11:47:36 +08:00
parent ca6a4b2ecf
commit 82f8dadbae
1 changed files with 7 additions and 4 deletions

View File

@ -562,12 +562,15 @@ var table = {
return $.common.uniqueFn(rows);
},
// 请求获取数据后处理回调函数,校验异常状态提醒
responseHandler: function(data) {
if (data.code != undefined && data.code != 0) {
$.modal.alertWarning(data.msg);
responseHandler: function(res) {
if (typeof table.options.responseHandler == "function") {
table.options.responseHandler(res);
}
if (res.code != undefined && res.code != 0) {
$.modal.alertWarning(res.msg);
return [];
} else {
return data;
return res;
}
},
},