var layerMobile=function(){this.msg=function(msg,timer,callback){layer.open({content:msg,skin:'msg',time:timer||2,success:function(){if(typeof(callback)==='function'){callback()}}})};this.confirm=function(msg,config,yes,no){var param=config.btn||['确认','取消'];layer.open({content:msg,btn:param,yes:function(index){if(typeof(yes)==='function'){yes()}},no:function(){if(typeof(no)==='function'){no()}}})}};var mlayer=new layerMobile();