diff --git a/WebContent/admin/bookadd.jsp b/WebContent/admin/bookadd.jsp index 14bd18f..1446d3f 100644 --- a/WebContent/admin/bookadd.jsp +++ b/WebContent/admin/bookadd.jsp @@ -109,7 +109,7 @@ layui.use(['form', 'layedit', 'jquery'], function(){ var editIndex = layedit.build('LAY_demo_editor'); // 自定义验证规则 form.verify({ - // 解决异步传输问题 + // 解决富文本异步传输问题 content: function(value){ return layedit.sync(editIndex); } @@ -128,14 +128,13 @@ layui.use(['form', 'layedit', 'jquery'], function(){ time: 500 }); setTimeout(function(){ - parent.location.reload(); + //parent.location.reload(); + var index = parent.layer.getFrameIndex(window.name); //操作父页面 + parent.layer.close(index); }, 500); }else{ leyer.msg("添加失败"); } - - //parent.layer.msg('您将标记 [ sdf ] 成功传送给了父窗口'); - } }) diff --git a/WebContent/admin/bookedit.jsp b/WebContent/admin/bookedit.jsp index a8406f3..eb5e3ff 100644 --- a/WebContent/admin/bookedit.jsp +++ b/WebContent/admin/bookedit.jsp @@ -7,7 +7,7 @@ - bookadd + bookedit @@ -156,13 +156,13 @@ layui.use(['form', 'layedit', 'jquery'], function(){ if(data.code == "0"){ parent.layer.msg("修改成功",{ icon: 6, - time: 1000 + time: 500 }); setTimeout(function(){ - parent.location.reload() - }, 1000); - //var index = parent.layer.getFrameIndex(window.name); //操作父页面 - //parent.layer.close(index); + var index = parent.layer.getFrameIndex(window.name); //操作父页面 + parent.layer.close(index); + }, 500); + }else{ leyer.msg("修改失败"); } diff --git a/WebContent/admin/booklist.jsp b/WebContent/admin/booklist.jsp index 780766a..74eb618 100644 --- a/WebContent/admin/booklist.jsp +++ b/WebContent/admin/booklist.jsp @@ -90,7 +90,14 @@ // 图书分类json var bookSortJson = <%=bookSortJson %> - + + - + + + +