diff --git a/admin-core/src/main/resources/static/js/common.js b/admin-core/src/main/resources/static/js/common.js index d0efebe7..30b83cee 100644 --- a/admin-core/src/main/resources/static/js/common.js +++ b/admin-core/src/main/resources/static/js/common.js @@ -456,23 +456,9 @@ var Common = { async: false, success: function (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) { r = rsp.responseJSON; - if(rsp.responseJSON && rsp.responseJSON.msg) - Common.error(rsp.responseJSON.msg); - else - Common.error('服务器错误,请联系管理员'); } }) return r; diff --git a/web/src/main/resources/static/js/jlw/teacherOpenCourseScheduleSession/add.js b/web/src/main/resources/static/js/jlw/teacherOpenCourseScheduleSession/add.js index 82acb974..afd7334d 100644 --- a/web/src/main/resources/static/js/jlw/teacherOpenCourseScheduleSession/add.js +++ b/web/src/main/resources/static/js/jlw/teacherOpenCourseScheduleSession/add.js @@ -473,11 +473,18 @@ layui.define(['form', 'laydate', 'table', 'xmSelect', 'teacherOpenCourseSchedule } setTimeout(function(){ var ret = Common.postJSON(url,JSON.stringify(param)); - if (ret.code == 0) { - parent.window.dataReload(); - parent.Lib.tableRefresh(); - Lib.closeFrame(); - } + layer.closeAll(); + layer.msg(ret.code == 0 ? "保存成功!" : ret.msg, { + offset: ['50%'], + icon: ret.code == 0 ? 1 : 2, + time: 1500 //2秒关闭(如果不配置,默认是3秒) + }, function () { + if (ret.code == 0) { + parent.window.dataReload(); + parent.Lib.tableRefresh(); + Lib.closeFrame(); + } + }); },100); });