// 翻开layer弹出框
// title:题目
// w:款
// h:高
// url:地点
openLayer(title,w,h,url){
var dirname = window.location.origin;
if (title == null || title == '') {
title=false;
};
if (url == null || url == '') {
url="404.html";
};
if (w == null || w == '') {
w=800;
};
if (h == null || h == '') {
h=($(window).height() - 50);
};
url = dirname + url;
console.log(url)
layer.open({
type: 2,
title: title,
shadeClose: true, //点击遮罩封闭层
area : [w+'px', h +'px'],
content: url,
scrollbar :true
})
}
// 封闭layer弹出框
closeLayer(){
var index = parent.layer.getFrameIndex(window.name);
parent.layer.close(index);
}