var clock = setInterval('timer()',1000);
function timer(){
if(window.innerHeight <= window.clientHeight){
document.getElementsByClassName('layui-m-layerchild')[0].style.height = (window.innerHeight) + 'px';
}else{
document.getElementsByClassName('layui-m-layerchild')[0].style.height = (window.clientHeight) + 'px';
clearInterval(clock);
}
}