父页面
$(document).on('click','.mapShow',function(){
var data = table.cache["demo"]; //layui table 表格的全部值
var location = $("#location").val();
layer.open({
type: 2,
title: '地图展示',
shadeClose: true,
shade: false,
maxmin: true, //开启最大化最小化按钮
area: ['80%', '80%'],
content: '',//链接
success: function(dom, index) {
//通过索引获取到当前iframe弹出层
var iframe = window['layui-layer-iframe' + index];
//调用iframe弹出层内的方法
iframe.edit(data,location);
},
//关闭弹窗后触发
end: function(){
console.log("1111")
}
})
});
子页面(iframe)
function edit(pois, location) {
conslog.log(pois);
conslog.log(location)
}