(function() { var placeholder = true; var data = {"id":"mqa_47yn4KSd","width":"100%","height":"auto","device_pc":"1","device_wap":"1","adList":[{"ad_id":"197","ad_name":"1","ad_img":"https:\/\/imgoss301.top\/3bc2ed755666b37799a342d472aa4464.gif","ad_url":"http:\/\/alb-tl3c9kf3l2c4112rr6.cn-hongkong.alb.aliyuncs.com:8234\/?shareName=ylg234","ad_desc":"","ad_html":"","weight":"1"}]}; var div_id = 'mm_'+data.id+'_'+String(Date.now()); placeholder && document.write('
'); var bindData=function(data){ layui.use(['laytpl', 'jquery'], function(){ var laytpl = layui.laytpl; var $ = layui.jquery; if((data['device_pc'] == 1 && $(window).width() > 768) || (data['device_wap'] == 1 && $(window).width() <= 768)){ laytpl('').render(data, function(html){ if(placeholder == true) { $('#'+div_id).append(html); }else{ $('body').append(html); } }); $('#'+div_id+' .ad-close, #'+data.id+' .ad-close').click(function(){ $('#'+div_id+', #'+data.id).remove() }); } }); } var script = document.createElement('script'); script.type = 'text/javascript'; script.src = 'https://gg.sygg888.cc/component/layui/layui.js'; var head = document.getElementsByTagName('head')[0]; head.appendChild(script); var style = document.createElement('style'); style.type = 'text/css'; style.innerHTML = ' .mqa-box {width:100%; position:relative;display:block;margin:0 auto;overflow:hidden;} .mqa-box ul,.mqa-box li{maring:0;padding:0;list-style:none;} .mqa-box .ad-logo {position:absolute;top:0;right:0;background:rgba(0,0,0,.3);border-radius:.5px 2px .5px .5px;height:18px;line-height:18px;color:#fff;padding:0 5px;font-size:12px;z-index:188} .mqa-box .ad-close {position:absolute;bottom:0;right:0;background:rgba(0,0,0,.3);border-radius:50%;height:18px;line-height:18px;color:#fff;padding:0 5px;font-size:12px;z-index:188;cursor:pointer;}'; head.appendChild(style); script.onload = function(){ bindData(data); } })();