beetlsql3-dev
yangdj 2 years ago
parent c5723cdd7d
commit fb4ce33632

@ -456,23 +456,9 @@ var Common = {
async: false, async: false,
success: function (rsp) { success: function (rsp) {
r = rsp; r = rsp;
if (rsp.code != 0) {
Common.error(rsp.msg);
} else {
//成功
if (next != null) {
next(rsp.data);
} else {
Common.success(rsp.msg || rsp.responseJSON.msg);
}
}
}, },
error: function (rsp) { error: function (rsp) {
r = rsp.responseJSON; r = rsp.responseJSON;
if(rsp.responseJSON && rsp.responseJSON.msg)
Common.error(rsp.responseJSON.msg);
else
Common.error('服务器错误,请联系管理员');
} }
}) })
return r; return r;

@ -473,11 +473,18 @@ layui.define(['form', 'laydate', 'table', 'xmSelect', 'teacherOpenCourseSchedule
} }
setTimeout(function(){ setTimeout(function(){
var ret = Common.postJSON(url,JSON.stringify(param)); var ret = Common.postJSON(url,JSON.stringify(param));
if (ret.code == 0) { layer.closeAll();
parent.window.dataReload(); layer.msg(ret.code == 0 ? "保存成功!" : ret.msg, {
parent.Lib.tableRefresh(); offset: ['50%'],
Lib.closeFrame(); icon: ret.code == 0 ? 1 : 2,
} time: 1500 //2秒关闭如果不配置默认是3秒
}, function () {
if (ret.code == 0) {
parent.window.dataReload();
parent.Lib.tableRefresh();
Lib.closeFrame();
}
});
},100); },100);
}); });

Loading…
Cancel
Save