2020-01-17 note

layui 关闭子页面,同时渲染父页面表格

form.on('submit(add)',
                function(data) {
                    $.post('/updateOrSaveUser',data.field,function (result) {
                        var msg = "增加成功!!!",icon = 6;
                        if (!result) {msg = '增加失败!!!';icon = 5}
                        layer.msg(msg, {icon: icon},function () {
                            var index = parent.layer.getFrameIndex(window.name);
                            parent.layer.close(index);
                            parent.layui.table.reload('userTable');
                        });
                    })
                    return false;
                });

你可能感兴趣的:(2020-01-17 note)