(function (w) { // 360广告宏替换参数 var Macro = {start: "__EVENT_TIME_START__", end: "__EVENT_TIME_END__", x: "__OFFSET_X__", y: "__OFFSET_Y__"}; var _clktk, _curl, start_time, end_time; var ad360_fun_c = { openBlackList: false, // 是否开启黑名单 openLabelUp: false, // 开启用户标签上报(待开发) }; var PROJECT_TYPE = "weather"; // 项目 weather var ad360_c = { url: { url_360: Common.GetQueryString("test_360_url")||"//show.g.mediav.com/s", // 360广告地址 // url_360: "//ad-test.mediav.com/s", // 360广告地址 hotUrl: '//news.7654.com/tpop4/miniapi/recommend.json', // 右下新闻接口 loadbaseUrl: '//miniapi.7654.com/mini/news/recommend', // 右侧打底-地址 }, pub_config_key: "proConfig", // index中的公共配置键名 imptkArr: [], // 要曝光的360 地址数组 getArr: [], // 滚动加载时请求的360广告数据 project: "mininews_ys001", // 上报项目名 ad360ClickNum: 0, // 360广告点击次数-黑名单-10次以上 clickLimit: 20, // 黑名单防作弊点击上限 top_skin:{ muc: "img_click_gg", // 360点击上报的类 target: ".ad_skin", position_tag: "top", position_ad: "advertisement_ad360", }, right1: { muc: "", // 360点击上报的类 target: ".right1", position_tag: "m_rightTop", position_ad: "advertisement_ad360", }, right2: { muc: "", // 360点击上报的类 target: ".right2", position_tag: "m_rightTop", position_ad: "advertisement_ad360", }, right3: { muc: "", // 360点击上报的类 target: ".right3", position_tag: "m_rightDown", position_ad: "advertisement_ad360", } }; /* ============================= 360ad================================= */ function Ad360() { } Ad360.prototype = { init: function () { ad360_c.imptkArr = []; }, //宏替换-1 mouseDownMacro: function (el, x, y) { start_time = Math.round(new Date()); _clktk = el.data('oldclktk'); _curl = el.data("oldcurl"); if (_clktk.indexOf(Macro["start"]) > -1) { _clktk = _clktk.replace(Macro["start"], start_time); } if (_clktk.indexOf(Macro["x"]) > -1) { _clktk = _clktk.replace(Macro["x"], x); } if (_clktk.indexOf(Macro["y"]) > -1) { _clktk = _clktk.replace(Macro["y"], y); } if (_curl.indexOf(Macro["start"]) > -1) { _curl = _curl.replace(Macro["start"], start_time); } if (_curl.indexOf(Macro["x"]) > -1) { _curl = _curl.replace(Macro["x"], x); } if (_curl.indexOf(Macro["y"]) > -1) { _curl = _curl.replace(Macro["y"], y); } el.attr('data-clktk', _clktk); el.attr('href', _curl); }, //宏替换-2 mouseUpMacro: function (el) { end_time = Math.round(new Date()); _curl = el.attr("href"); if (_clktk.indexOf(Macro["end"]) > -1) { _clktk = _clktk.replace(Macro["end"], end_time); } if (_curl.indexOf(Macro["end"]) > -1) { _curl = _curl.replace(Macro["end"], end_time); } el.attr('data-clktk', _clktk); el.attr('href', _curl); }, // 360数据请求 getData: function (reqtime, callback, showId, num) { var recommend_type = 1, recommend_of = 4, reqtimes = reqtime || 1, recommend_newf = 1, recommend_showid = showId, tck = Common.GetQueryString("tck"), recommend_adnum = num || 3, recommendk_uid = Common.recommend_uid(), recommend_refurl = encodeURIComponent(document.referrer), recommend_param; tck = tck ? '&tck=' + tck : ''; // tck = ''; if (document.location.protocol == "https:") { recommend_param = 'https://show-g.mediav.com/s' + '?type=' + recommend_type + '&of=' + recommend_of + '&newf=' + recommend_newf + '&scheme=https&showid=' + recommend_showid + '&uid=' + recommendk_uid + '&impct=' + recommend_adnum + '&reqtimes=' + reqtimes + tck + '&refurl=' + recommend_refurl; // recommend_param = 'https://show-g.mediav.com/s' + '?type=' + recommend_type + '&of=' + recommend_of + '&newf=' + recommend_newf + '&scheme=https&showid=' + recommend_showid + '&uid=' + recommendk_uid + '&impct=' + recommend_adnum + '&reqtimes=' + reqtimes + tck+'&refurl='+recommend_refurl; } else { recommend_param = ad360_c.url.url_360 + '?type=' + recommend_type + '&of=' + recommend_of + '&newf=' + recommend_newf + '&showid=' + recommend_showid + '&uid=' + recommendk_uid + '&impct=' + recommend_adnum + '&reqtimes=' + reqtimes + tck + '&refurl=' + recommend_refurl; } w[ad360_c.pub_config_key].busy_360 = true; $.ajax({ type: 'get', url: recommend_param, dataType: 'jsonp', jsonp: 'jsonp', success: function (data) { if (!data.ads) { $.ajax({ type: 'get', url: recommend_param, dataType: 'jsonp', jsonp: 'jsonp', success: function (data) { var d = data.ads || []; w[ad360_c.pub_config_key].busy_360 = false; callback && callback(d); }, error: function () { w[ad360_c.pub_config_key].busy_360 = false; callback(null); } }) } else { var d = data.ads || []; callback && callback(d); } }, error: function () { callback(null); } }) }, // 360数据请求 getSkinData: function (showId,callback) { var recommend_type = 1, recommend_of = 4, // reqtimes = reqtime || 1, recommend_newf = 2, recommend_showid = showId, tck = Common.GetQueryString("tck"), // recommend_adnum = 3, recommendk_uid = Common.recommend_uid(), recommend_refurl = encodeURIComponent(document.referrer), recommend_param; tck = tck ? '&tck=' + tck : ''; // tck = ''; if (document.location.protocol == "https:") { recommend_param = 'https://show-g.mediav.com/s' + '?type=' + recommend_type + '&of=' + recommend_of + '&newf=' + recommend_newf + '&scheme=https&showids=' + recommend_showid + '&uid=' + recommendk_uid + tck + '&refurl=' + recommend_refurl; // recommend_param = 'https://show-g.mediav.com/s' + '?type=' + recommend_type + '&of=' + recommend_of + '&newf=' + recommend_newf + '&scheme=https&showid=' + recommend_showid + '&uid=' + recommendk_uid + '&impct=' + recommend_adnum + '&reqtimes=' + reqtimes + tck+'&refurl='+recommend_refurl; } else { recommend_param = ad360_c.url.url_360 + '?type=' + recommend_type + '&of=' + recommend_of + '&newf=' + recommend_newf + '&showids=' + recommend_showid + '&uid=' + recommendk_uid + tck + '&refurl=' + recommend_refurl; } w[ad360_c.pub_config_key].busy_360 = true; $.ajax({ type: 'get', url: recommend_param, dataType: 'jsonp', jsonp: 'jsonp', success: function (data) { if (!data.adspaces) { $.ajax({ type: 'get', url: recommend_param, dataType: 'jsonp', jsonp: 'jsonp', success: function (data) { if(!$.isEmptyObject(data)){ var d = data.adspaces[showId].ads || []; w[ad360_c.pub_config_key].busy_360 = false; callback && callback(d); }else{ callback && callback([]); } }, error: function () { w[ad360_c.pub_config_key].busy_360 = false; callback(null); } }) } else { var d = data.adspaces[showId].ads || []; callback && callback(d); } }, error: function () { callback(null); } }) }, /** * 渲染左侧信息流360广告 * @param res 360 广告数据 * @param pageNum 当前页 * @param renderModel 360广告插入模式 ds_1 ->左1dsp或ssp,左2:无dsp或ssp | ds_2 ->左1无dsp或ssp,左2:dsp或ssp | double ->左1、左2:dsp或ssp | none ->左1、左2无dsp或ssp */ render360: function (res, pageNum, renderModel) { var _this = this; var target; var dom; target = ".content .scroll_con." + w[ad360_c.pub_config_key].curTabBtn.attr("date-type"); // console.log("res", pageNum, res); this.init(); $.each(res, function (i, v) { dom = adTmps.get360(v, false); _this.ad360InsertRule(target, i, pageNum, dom, renderModel, "ad_1_1"); // 360曝光 ad360_c.imptkArr.push(v.imptk); ad360_c.getArr = []; _this.handle_url_scroll(); }); if (pageNum == 1 && renderModel === "double" && $('.scroll_con .ad_item:eq(2) .img_click_gg').length > 0) { this.upload($('.scroll_con .ad_item:eq(2) .img_click_gg'), 'show') } else if (pageNum == 1 && renderModel === "ds_1" && $('.scroll_con .ad_item:eq(1) .img_click_gg').length > 0) { this.upload($('.scroll_con .ad_item:eq(1) .img_click_gg'), 'show') } else if (pageNum == 1 && renderModel === "ds_2" && $('.scroll_con .ad_item:eq(0) .img_click_gg').length > 0 || pageNum == 1 && renderModel === "none" && $('.scroll_con .ad_item:eq(0) .img_click_gg').length > 0) {//第二张ssp this.upload($('.scroll_con .ad_item:eq(0) .img_click_gg'), 'show')//左侧show上报 } }, /** * 滚动加载时的360广告数据请求 */ render360Scroll: function () { var _this = this; var adsize = w[ad360_c.pub_config_key].pageNum == 1 ? 3 : 10; this.getData(w[ad360_c.pub_config_key].page, function (res) { ad360_c.getArr = res || []; w[ad360_c.pub_config_key].page++; _this.getData(w[ad360_c.pub_config_key].page, function (res) { ad360_c.getArr = ad360_c.getArr.concat(res); _this.render360(ad360_c.getArr, w[ad360_c.pub_config_key].page, 'none'); }, w[ad360_c.pub_config_key].message_flow_showId, adsize) }, w[ad360_c.pub_config_key].message_flow_showId, adsize); }, /** * 360广告插入规则 * @param target * @param i 每个360数据的index值 * @param pageNum 当前页数 * @param dom 360广告模板 * @param renderModel 360广告插入模式 ds_1 ->左1dsp或ssp,左2:无dsp或ssp | ds_2 ->左1无dsp或ssp,左2:dsp或ssp | double ->左1、左2:dsp或ssp | none ->左1、左2无dsp或ssp * @param ruleModel 广告插入规则模式 ad_2_1->两广一文 */ ad360InsertRule: function (target, i, pageNum, dom, renderModel, ruleModel) { ruleModel = ruleModel || "ad_2_1"; var tar = target + " .list_item"; var rules = { /** * 两广一文规则 */ ad_2_1: function (i, pageNum, renderModel) { var index; if (pageNum == '1') { if (renderModel === "double") {//2个ssp index = i % 2 === 0 ? (i / 2 + 2) : (Math.ceil(i / 2) + 1); } else if (renderModel === "ds_2") {//第一个360广告 第二个ssp index = i === 0 ? i : (i % 2 === 0 ? (i / 2) + 1 : (Math.ceil(i / 2) + 1)); } else if (renderModel === "ds_1") {//第一个ssp 第二个360 index = i % 2 === 0 ? (i / 2 + 1) : (Math.ceil(i / 2) + 1); } else if (renderModel === "none") { index = (i === 0 || i === 1) ? i : (i % 2 === 0 ? (i / 2 + 1) : Math.ceil(i / 2)); } } else { // renderModel === "double" 两个都是dsp/ssp index = i % 2 === 0 ? (i / 2) : (Math.floor(i / 2) + 1); } return index; }, /** * 一广一文 */ ad_1_1: function (i, pageNum, renderModel) { var index; if (pageNum == '1') { if (renderModel === "double") {//2个ssp index = i + 2; } else if (renderModel === "ds_2") {//第一个360广告 第二个ssp index = i == 0 ? i : i + 2; } else if (renderModel === "ds_1") {//第一个ssp 第二个360 index = i + 1; } else if (renderModel === "none") { index = i; } } else { // renderModel === "double" 两个都是dsp/ssp index = i; } // console.log("index",index,i) return index; } }; $(tar).eq(rules[ruleModel](i, pageNum, renderModel)).before(dom); }, /** * 根据ssp/dsp请求结果渲染信息流360广告 * @param result */ statusRender360Left: function (result) { var _this = this; var pageSize; var ds_pos; if (result[0] === "null" && result[1] === "null") { ds_pos = "none"; pageSize = 10; } else if (result[0] === "null" && result[1] !== "null") { ds_pos = "ds_2"; pageSize = 9; } else if (result[0] !== "null" && result[1] === "null") { ds_pos = "ds_1"; pageSize = 9; } else if (result[0] !== "null" && result[1] !== "null") { ds_pos = "double"; pageSize = 8; } this.getData(w[ad360_c.pub_config_key].page, function (res) { _this.render360(res, w[ad360_c.pub_config_key].page, ds_pos); }, w[ad360_c.pub_config_key].message_flow_showId, pageSize); }, /** * 渲染右侧360 * @param result * @param pos 广告位置 r3(右下) 默认右上 */ renderRight360: function (result, pos) { var _this = this; if (pos === 'r3') { if (result[0] === "null") { this.renderRight3(); } return false; } if (result[0] === "null" && result[1] === "null") { this.getData(1, function (res) { if (res[0]) { res[0].type = "right_1"; $(ad360_c.right1.target).html(adTmps.get360(res[0], ad360_c.right1)); _this.url_scroll(res[0].imptk); _this.upload($(ad360_c.right1.target + " .img_click_gg"), 'show')//右上show上报 } else { (PROJECT_TYPE !== "weather") && _this.renderLoad(ad360_c.right1.target, 0, 'top'); } if (res[1]) { res[1].type = "right_2"; $(ad360_c.right2.target).html(adTmps.get360(res[1], ad360_c.right2)); _this.url_scroll(res[1].imptk); } else { (PROJECT_TYPE !== "weather") && _this.renderLoad(ad360_c.right2.target, 1, 'top'); } }, w[ad360_c.pub_config_key].right_top_showid, 2); } else if (result[0] === "null" && result[1] !== "null") { this.getData(1, function (res) { if (res[0]) { res[0].type = "right_1"; $(ad360_c.right1.target).html(adTmps.get360(res[0], ad360_c.right1)); _this.url_scroll(res[0].imptk); _this.upload($(ad360_c.right1.target + " .img_click_gg"), 'show')//右上show上报 } else { (PROJECT_TYPE !== "weather") && _this.renderLoad(ad360_c.right1.target, 0, 'top'); } }, w[ad360_c.pub_config_key].right_top_showid, 1); } else if (result[0] !== "null" && result[1] === "null") { this.getData(1, function (res) { if (res[0]) { res[0].type = "right_2"; $(ad360_c.right2.target).html(adTmps.get360(res[0], ad360_c.right2)); /* $('.right_pannel .showcase:eq(1)').html('
')*/ _this.url_scroll(res[0].imptk); _this.upload($(ad360_c.right2.target + " .img_click_gg"), 'show')//右上show上报 } else { (PROJECT_TYPE !== "weather") && _this.renderLoad('.right_pannel .showcase:eq(1)', 0, 'top'); } }, w[ad360_c.pub_config_key].right_top_showid, 1); } }, /** * 渲染右下 */ renderRight3: function () { var _this = this; var qid; if (PROJECT_TYPE === "weather") { this.getData(1, function (res) { if (res[0]) { res[0].type = "right_3"; $(ad360_c.right3.target).html(adTmps.get360(res[0], ad360_c.right3)); _this.url_scroll(res[0].imptk); _this.upload($(ad360_c.right3.target + " .img_click_gg"), 'show')//右上show上报 } else { // _this.renderLoad('.right_pannel .showcase:eq(1)', 0, 'top'); } }, w[ad360_c.pub_config_key].right_bottom_showid, 1); } else { $('.today_news .hot_ssp').hide(); $(".hot_news").append('' + res[0].title + '
广告'); $('.today_news .adCase:eq(1)').html('' + data[0].title + '
'); $('.today_news .slide2').remove(); _this.url_scroll(res[0].imptk); _this.upload($('.today_news .adCase:eq(0) a'), 'show');//右下show上报 var mySwiper = new Swiper('.swiper-container', { autoplay: 3000, loop: true, autoplayDisableOnInteraction: false, }) } else if (res.length === 2) { $('.today_news .adCase:eq(0)').html('' + '' + res[0].title + '
广告'); $('.today_news .adCase:eq(1)').html('' + data[0].title + '
'); $('.today_news .adCase:eq(2)').html('' + '' + res[1].title + '
广告'); _this.url_scroll(res[0].imptk); _this.url_scroll(res[1].imptk); _this.upload($('.today_news .adCase:eq(0) a'), 'show')//右下show上报 var mySwiper = new Swiper('.swiper-container', { autoplay: 3000, loop: true, autoplayDisableOnInteraction: false, }) } else { $('.today_news .adCase:eq(0)').html('' + data[0].title + '
'); $('.today_news .slide1').remove(); $('.today_news .slide2').remove(); $(".arrow").remove(); var mySwiper = new Swiper('.swiper-container', {}) } $('.leftBtn').click(function () { mySwiper.swipePrev(); }); $('.rightBtn').click(function () { mySwiper.swipeNext(); }); }, w[ad360_c.pub_config_key].right_bottom_showid, 2); }); } }, /** * 右侧打底 - 接口 * @param target_dom * @param startnum * @param area */ renderLoad: function (target_dom, startnum, area) { $.ajax({ //右侧打底显示 url: ad360_c.url.loadbaseUrl, type: 'GET', dataType: 'json', success: function (res) { var dom; var qid = w[ad360_c.pub_config_key].qid.toutiao; var adData = res.data.slice(startnum, startnum + 1)[0]; if (area == 'top') { dom = '' + adData.title + '
' } $(target_dom).append(dom); } }) }, // 右下新闻 - 接口 renderNovel: function (callback, num) { $.ajax({ url: ad360_c.url.hotUrl, type: 'GET', dataType: 'json', success: function (res) { callback && callback(res.data); }, error: function () { var data = []; callback && callback(data); } }) }, /** * 黑名单系统 * @constructor */ blackList: function () { var urlblack; var _this = this; var qid = Common.GetQueryString('qid'); var project = ad360_c.project; var uid = Common.GetQueryString('uid') || "none"; var redirectUrl = window.location.href.split("?")[1]; if (location.host === 'news.7654.com') { urlblack = 'http://ssp.7654.com/monitor?qid=' + qid + '&project=' + project + '&uid=' + uid; } else { urlblack = 'http://test-ssp.7654.com/monitor?qid=' + qid + '&project=' + project + '&uid=' + uid; } $.ajax({ url: urlblack, type: 'GET', dataType: 'json', success: function (res) { // res.ret = 0; if (res.ret == 0 || ad360_c.ad360ClickNum > ad360_c.clickLimit) { _this.upload($('.scroll_con .news_item:eq(0)'), 'otherurl_show'); // 右上show上报 window.location.href = 'http://news.7654.com/mini_new4/0101/?' + redirectUrl; } } }) }, /** * 360上报 * @param target * @param actType */ upload: function (target, actType) { $.getJSON("//ad.kuaizip.com/advertise/userclick", { time: new Date().getTime(), localUrl: $.base64.encode("kZip.com" + location.pathname), project: $.base64.encode(ad360_c.project), position: $.base64.encode($(target).attr('position-tag')), qid: $.base64.encode(Common.GetQueryString('qid')), // qid_new: $.base64.encode(Common.GetQueryString('qid_new')), gid: $.base64.encode(Common.GetQueryString('gid')), env: $.base64.encode(Common.GetQueryString('env')), uid: $.base64.encode(Common.GetQueryString('uid') || "none"), act: $.base64.encode(actType), type: $.base64.encode($(target).attr("position-ad")), }).done(function (data) { }); ad360_fun_c.openLabelUp && this.upLabel(target, actType); }, /** * 360 曝光 * @param arr */ url_scroll: function (arr) { $.each(arr, function (index, val) { $('body').append(''); }); }, /** * 360曝光规则 */ handle_url_scroll: function () { var _el = $(".aa"); if (_el.length) { if (_el.eq(0)[0].getBoundingClientRect().top < 634) { _el.eq(0).removeClass("aa"); if (ad360_c.imptkArr.length) { this.url_scroll(ad360_c.imptkArr[0]); ad360_c.imptkArr.shift(); } } } }, /** * 大数据的360广告的用户标签库上报 * @param target * @param params * @param actType */ upLabel: function (target, actType) { // 待开发 uid,gid,project(项目),poptype(弹窗类型),imageadress(图片地址),imagetitle(图片标题),act(show),data var param_lab; var info = $(target).length > 0 ? $(target).attr('data-info').split(",") : ["", ""]; param_lab = { uid: Common.GetQueryString('uid') || "none", gid: Common.GetQueryString('gid') || "", project: ad360_c.project || 'default', poptype: "mininewsplus", imageadress: info[0], // imagetitle: encodeURIComponent(info[1]), imagetitle: info[1], act: actType, data: Common.GetQueryString('data') || 'default', }; // console.log("params",params) var objParams = param_lab.uid + '\t' + param_lab.gid + '\t' + param_lab.project + '\t' + param_lab.poptype + '\t' + param_lab.imageadress + '\t' + param_lab.imagetitle + '\t' + param_lab.act + '\t' + param_lab.data; // var a = Common.rc4(objParams, "H3GkhMqv91a7bEH2"); console.log(Common.rc4(objParams, "H3GkhMqv91a7bEH2"),$.base64.encode(Common.rc4(objParams, "H3GkhMqv91a7bEH2"))) // console.log(objParams,param_lab,$.base64.encode(a),Common.rc4(a, "H3GkhMqv91a7bEH2"),Common.rc4_1(objParams, "H3GkhMqv91a7bEH2")); $.getJSON("http://tagreport.kpzip.com/usertag/user_click/?param="+$.base64.encode(Common.rc4(objParams, "H3GkhMqv91a7bEH2"))).done(function (data) {}); // 调客户端方法 }, /** * 添加皮肤广告 */ addSkin: function () { var _this = this; var screen_h = Common.GetQueryString("screen_h")*1 || 800; var skin_h = 160; var ad_h = $("#container").height(); var is_show = (skin_h + ad_h + 42 + 40) <= screen_h; if (is_show) { // swpiw 1用阅读器打开 $('head').append(''); } else { $('head').append(''); } is_show&&$("#skin_360_container").show(); // Sj2foR 测试 is_show&&this.getSkinData("gyr7vd",function (res) { if (!res||res.length<=0) return; var data = JSON.parse(JSON.stringify(res)); data[0].type = "skin"; $("#skin_360_container").html(adTmps.get360(data[0],ad360_c.top_skin)); _this.url_scroll(data[0].imptk); /*data.length>1&&_this.renderSkinSwiper(".swiper-wrapper",data); $.each(data,function (i,v) { _this.url_scroll(v.imptk); });*/ _this.upload($(ad360_c.top_skin.target + ".img_click_gg")[0], 'show');//右上show上报 $("#skin_360_container").addClass("skin_"+data[0].imgw); if (data[0].imgw===900){ // $("#skin_360_container").css("border","1px solid #"+data[0].color) } }); }, /** * 渲染皮肤360 轮播 * @param data */ renderSkinSwiper:function (target,data) { $(target).show(); $.each(data,function (i,v) { v.type = "skin"; $(target).append(' ') }); var skin_swiper = new Swiper('.swiper_container', { autoplay: 3000, loop: true, calculateHeight: true, resizeReInit: true, updateOnImagesReady: true, autoplayDisableOnInteraction: false, // paginationClickable: true, // pagination: '.swiper-pagination', onSlideClick: function (sw, event) { sw.swipeNext(skin_swiper); } }); setTimeout(function () { skin_swiper.resizeFix(); }, 300) } }; w.ad360 = new Ad360(); /*========== 事件绑定 ==========*/ var _this_b; function EventBind() { _this_b = this; } EventBind.prototype = { /** * s事件绑定 * arr 数据结构 * [target(目标元素选择器),事件名,绑定函数,委托元素选择器(?)] * @param arr */ bindEvent: function (arr) { (arr && arr.length > 0) && $.each(arr, function (i, v) { v && (v[3] ? ($(v[3]).on(v[1], v[0], v[2])) : ($(v[0]).on(v[1], v[2]))); }) }, /** * 360点击曝光 * @param e */ upData360_md: function (e) { var target = $(this).parents(".ad360_more_img").length > 0 ? $(this).parents(".ad360_more_img") : $(this); var x = Math.floor(e.pageX - target.offset().left), y = Math.floor(e.pageY - target.offset().top); x = x < 0 ? 0 : x; y = y < 0 ? 0 : y; w.ad360.mouseDownMacro($(this), x, y); }, /** * 360点击曝光 * @param e */ upData360_c: function (e) { w.ad360.mouseUpMacro($(this)); var str = $(this).attr('data-clktk'); if (str) { var arr = str.split(','); $.each(arr, function (index, val) { $('body').append(''); }); } w.ad360.upload($(this)[0], 'click'); // 黑名单 ad360_fun_c.openBlackList && ad360_c.ad360ClickNum++; ad360_fun_c.openBlackList && ad360.blackList(); }, /** * 新闻点击上报 * @param e */ newsUpdata: function (e) { w.ad360.upload($(this)[0], 'click'); } }; var events = new EventBind(); events.bindEvent([ [".img_click_gg", "mousedown", events.upData360_md, 'body'], [".img_click_gg", "click", events.upData360_c, 'body'], [".news_click_gg", "click", events.newsUpdata, 'body'], ]); $(document).ready(function () { ad360_fun_c.openBlackList && ad360.blackList(); }); })(window);