diff --git a/WebContent/admin/bookadd.jsp b/WebContent/admin/bookadd.jsp index 85f42ed..14bd18f 100644 --- a/WebContent/admin/bookadd.jsp +++ b/WebContent/admin/bookadd.jsp @@ -123,9 +123,13 @@ layui.use(['form', 'layedit', 'jquery'], function(){ dataType: 'JSON', success: function(data){ if(data.code == "0"){ - parent.layer.msg("添加成功"); - var index = parent.layer.getFrameIndex(window.name); - parent.layer.close(index); + parent.layer.msg("添加成功",{ + icon: 6, + time: 500 + }); + setTimeout(function(){ + parent.location.reload(); + }, 500); }else{ leyer.msg("添加失败"); } diff --git a/WebContent/admin/bookedit.jsp b/WebContent/admin/bookedit.jsp index 3ffcddd..a8406f3 100644 --- a/WebContent/admin/bookedit.jsp +++ b/WebContent/admin/bookedit.jsp @@ -15,7 +15,6 @@ @@ -152,17 +151,21 @@ layui.use(['form', 'layedit', 'jquery'], function(){ url: './bookEdit', method: 'post', data: data.field, //JSON.stringify(data.field), - dataType: 'JSON', + dataType: 'json', success: function(data){ if(data.code == "0"){ - parent.layer.msg("修改成功"); - var index = parent.layer.getFrameIndex(window.name); - parent.layer.close(index); + parent.layer.msg("修改成功",{ + icon: 6, + time: 1000 + }); + setTimeout(function(){ + parent.location.reload() + }, 1000); + //var index = parent.layer.getFrameIndex(window.name); //操作父页面 + //parent.layer.close(index); }else{ leyer.msg("修改失败"); } - - //parent.layer.msg('您将标记 [ sdf ] 成功传送给了父窗口'); } }) diff --git a/WebContent/admin/booklist.jsp b/WebContent/admin/booklist.jsp index 6aed64a..780766a 100644 --- a/WebContent/admin/booklist.jsp +++ b/WebContent/admin/booklist.jsp @@ -13,7 +13,6 @@ - + +
+ + + + +