function zmRender(data,i,project_ad_pos) { var ad_pos = project_ad_pos+"_tnews_1"; var currentIndex = i; if(data.script[i].content) { var sspConfig = JSON.parse(data.script[i].content); var zmDsp ={ requestId:1e18*Math.random(), slot:{ // uid: ProjectConfig.getCookie(), proj:ProjectConfig.GetQueryString('project') || 'xiaoyu', mixData:ProjectConfig.GetQueryString('data') || '', groupid: sspConfig.groupid || 2, popType:'tnews' } }; // cgkanfFLbXXqcpeq/1yj9RWXpP7gkS2izxehkKYiLchtk5257fESCJYEBx9l7QoVT9yMaNGG29MeIEhXwpNMsyRPMIh tmmi 5DMZmkNGs4ioISItEyfytYVT9twLz k no/Sa0cwOw=' var datas = encodeURI(JSON.stringify((zmDsp))); window.uploadConfig = { act:'load', ad_id:data.baidu_id, ad_pos:ad_pos, ad_type:'dsp_zm', 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 url = sspConfig.url + $.base64.encode(datas); render = false; uploadConfig.act = 'request'; newUpload(uploadConfig); $.ajax({ type: "get", url: url, dataType: "json", success: function (obj) { if(obj.code == 0) { if(obj.result.ads[0].imageType == 17) { // 单图 var ads = obj.result.ads[0]; var readStatus = ads.readStatus || ''; var domain = ads.domain var locationUrl,baoduUrl; if(location.host == 'news.7654.com'){ if(domain) { baoduUrl = domain + '/?openurl=' } else { baoduUrl ="http://news.pnfduaf.cn/?openurl="; } }else{ if(domain) { baoduUrl = domain + '/?openurl=' } else { baoduUrl ="http://test.pnfduaf.cn/?openurl="; } } if(readStatus == 1){ locationUrl=baoduUrl+ads.openUrl; }else{ locationUrl=ads.openUrl; } var dom =''; $('.container').append(dom); $(".close_big").html(''); getNews(); uploadConfig.act = 'show'; uploadZhike(uploadConfig); uploadConfig.dspData = JSON.stringify(ads); newUpload(uploadConfig); var page_size = '390,404'; $('head').append(''); if (typeof window.external != 'undefined' && typeof window.external.CppCall != 'undefined') { window.external.CppCall(page_size); } $("body").on('click','#ak',function(){ uploadConfig.act = 'click'; uploadZhike(uploadConfig); uploadConfig.dspData = JSON.stringify(ads); newUpload(uploadConfig); }); // if(readStatus == 1){ // // swpiw 1用阅读器打开 // $('head').append(''); // }else{ // $('head').append(''); // } } // else if(obj.result.ads[0].imageType ==7) { // var specialList = obj.result.ads; // var domstr = ""; // $.each(specialList,function (index,ele) { // domstr += ''; // }) // var swiperDom = '
'+ // '
'+ // '
'+domstr +'
'+ // '
'+ // '
'; // swiperDom += '' // function showReport(index){ //show上报 // uploadConfig.act = 'show'; // uploadConfig.ad_pos = project_ad_pos+'_tnews_4l_'+ (index+1); // uploadZhike(uploadConfig); // uploadConfig.dspData=JSON.stringify(specialList[index]) // newUpload(uploadConfig); // } // var activeIndex = 0; // $('.container').append(swiperDom); // $(".close_big").html(''); // showReport(0); // getNews(); // render = false; // var height=250+144; // var width=370; // var page_size =''+width+','+height+''; // $('head').append(''); // var mySwiper = new Swiper('.swiper-container', { // autoplay : 5000, // speed:1000, // onlyExternal : true, // loop : true, // onSlideNext: function(swiper){ // if(activeIndex+1 < specialList.length){ // activeIndex ++; // showReport(activeIndex); // } // } // }); // $.each(specialList,function (index,ele) { // $(".container").on('click','#ak'+ (index+1),function () { // uploadConfig.act = 'click'; // uploadConfig.ad_pos = project_ad_pos+'_tnews_4l_'+ (index+1); // uploadZhike(uploadConfig); // uploadConfig.dspData=JSON.stringify(ele); // newUpload(uploadConfig); // }); // }) // if (typeof window.external != 'undefined' && "CppCall" in window.external) { // window.external.CppCall(); // } // } } else { uploadConfig.act = 'null'; newUpload(uploadConfig); render = true; var start = currentIndex + 1; getFor(start,dataRes); } }, error:function () { uploadConfig.act = 'error'; newUpload(uploadConfig); render = true; var start = currentIndex + 1; getFor(start,dataRes); } }); } }