1,本弹窗直接跳转父页面:
@if(session('message')) <script>
window.parent.location.reload(); //刷新父页面
var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
parent.layer.close(index); // 关闭layer
</script>
@endif
2,点击关闭弹窗后刷新当前页面:
只需在弹窗运行后添加
end: function(){
//任何对父类页面操作
}
layer.open({
type: 2,
area: [w+'px', h +'px'],
fix: false, //不固定
maxmin: true,
shade:0.4,
title: title,
content: url,
end: function(){
10 window.parent.location.reload(); //刷新父页面
11 }
});