/*! @Name:layer mobile v2.0 弹层组件移动版 @Author:贤心 @Site:http://layer.layui.com/mobie/ @License:LGPL */ !function(e){var j=document,h="querySelectorAll",d="getElementsByClassName",c=function(k){return j[h](k)};var a={type:0,shade:true,shadeClose:true,fixed:true,anim:"scale"};var i={extend:function(m){var l=JSON.parse(JSON.stringify(a));for(var k in m){l[k]=m[k]}return l},timer:{},end:{}};i.touch=function(l,k){l.addEventListener("click",function(m){k.call(this,m)},false)};var f=0,g=["layui-m-layer"],b=function(k){var l=this;l.config=i.extend(k);l.view()};b.prototype.view=function(){var p=this,l=p.config,k=j.createElement("div");p.id=k.id=g[0]+f;k.setAttribute("class",g[0]+" "+g[0]+(l.type||0));k.setAttribute("index",f);var q=(function(){var s=typeof l.title==="object";return l.title?'

'+(s?l.title[0]:l.title)+"

":""}());var m=(function(){typeof l.btn==="string"&&(l.btn=[l.btn]);var t=(l.btn||[]).length,s;if(t===0||!l.btn){return""}s=''+l.btn[0]+"";if(t===2){s=''+l.btn[1]+""+s}return'
'+s+"
"}());if(!l.fixed){l.top=l.hasOwnProperty("top")?l.top:100;l.style=l.style||"";l.style+=" top:"+(j.body.scrollTop+l.top)+"px"}if(l.type===2){l.content='

'+(l.content||"")+"

"}if(l.skin){l.anim="up"}if(l.skin==="msg"){l.shade=false}k.innerHTML=(l.shade?"
':"")+'
"+q+'
'+l.content+"
"+m+"
";if(!l.type||l.type===2){var o=j[d](g[0]+l.type),r=o.length;if(r>=1){layer.close(o[0].getAttribute("index"))}}document.body.appendChild(k);var n=p.elem=c("#"+p.id)[0];l.success&&l.success(n);p.index=f++;p.action(l,n)};b.prototype.action=function(l,r){var q=this;if(l.time){i.timer[q.index]=setTimeout(function(){layer.close(q.index)},l.time*1000)}var m=function(){var s=this.getAttribute("type");if(s==0){l.no&&l.no();layer.close(q.index)}else{l.yes?l.yes(q.index):layer.close(q.index)}};if(l.btn){var p=r[d]("layui-m-layerbtn")[0].children,o=p.length;for(var n=0;n