function showShdsp2(data,i,project,projectName){ var ad_pos = project+"_tips_1" var currentIndex = i; if(data.script[i].content){ var sspConfig = JSON.parse(data.script[i].content); window.uploadConfig = { act:'load', ad_id:data.baidu_id, ad_pos:ad_pos, ad_type:'dsp_songheng2', strategy_id:data.script[i].strategy_id, idea_id:data.script[i].idea_id, plan_id:data.script[i].plan_id, product_category:data.script[i].product_category }; var randNum_img=Math.floor(Math.random()*Math.floor(sh_config.length)); var landing_img = sh_config[randNum_img].img; var landing_url_arr = sspConfig.landing_url || []; var landing_url = ""; if(landing_url_arr.length > 0){ if(landing_url_arr.length == 1){ landing_url = landing_url_arr[0]; }else{ var randNum=Math.floor(Math.random()*Math.floor(landing_url_arr.length)); landing_url = landing_url_arr[randNum]; } } render = false; var getQrcode; if("GetSHMaterial" in window.external){ var exeData = window.external.GetSHMaterial(); if(exeData){ getQrcode = JSON.parse(exeData); } } if(getQrcode){ var wheatInfo = getQrcode.wheatInfo || ""; if(wheatInfo){ var qrcode = wheatInfo.qrcode || "", name = wheatInfo.name || "", url = wheatInfo.url || ""; landing_url = landing_url+"?qrcodeurl="+url+"&qrcode="+qrcode+"&wxname="+name; if(qrcode && name){ var pageW = "370",pageH = "400"; $('.container').css({"width":pageW+"px","height":pageH+"px"}); var dom ='
不感兴趣
关闭
'+projectName+'-广告' + ''+name+''; $('.container').append(dom); uploadConfig.act = 'load'; uploadZhike(uploadConfig); var page_size = pageW+','+pageH; document.getElementById("ak0").onerror = function () { ProjectConfig.loadBase(); }; document.getElementById("ak0").onload = function () { if(data.script[i].mini_reader == 1){ // swpiw 1用阅读器打开 $('head').append(''); }else{ $('head').append(''); } if (typeof window.external != 'undefined' && "CppCall" in window.external) { window.external.CppCall(page_size); } uploadConfig.act = 'show'; uploadZhike(uploadConfig); if (typeof window.external != 'undefined' && "shshowrt" in window.external) { window.external.shshowrt(); } }; $('.dsp_ad').on('click', function () { uploadConfig.act = 'click'; uploadZhike(uploadConfig); }); }else{ render = true; var start = currentIndex + 1; renderFunc(start,dataRes); } }else{ render = true; var start = currentIndex + 1; renderFunc(start,dataRes); } }else{ render = true; var start = currentIndex + 1; renderFunc(start,dataRes); } } }