var UrlJson ={"Templet":{ "T3":"{url}?tag=it1682012-23" , "T4":"{url}?tag=it168-lt-23" , "T30":"{url}?tag=it168-product-23" , "T31":"{url}?tag=pcpop-product-23" , "T32":"{url}?tag=it168-wapv1-23" , "T33":"{url}?tag=it168-wapv2-23" , "T34":"{url}?tag=pcpop2012-23" , "T35":"http://cps.gome.com.cn/home/JoinUnion?sid=1081&wid=1103&feedback=a{ChannelID}b{PageID}c{BlockID}d{OtherID}&to={url}" , "T41":"http://count.chanet.com.cn/click.cgi?a=439743&d=336354&u={PageID}-{BlockID}-{OtherID}&e={ChannelID}&url={url}" , "T42":"http://count.chanet.com.cn/click.cgi?a=439743&d=332875&u={PageID}-{BlockID}-{OtherID}&e={ChannelID}&url={url}" , "T43":"http://count.chanet.com.cn/click.cgi?a=439743&d=332876&u={PageID}-{BlockID}-{OtherID}&e={ChannelID}&url={url}" , "T44":"http://count.chanet.com.cn/click.cgi?a=439743&d=310932&u={PageID}-{BlockID}-{OtherID}&e={ChannelID}&url={url}" , "T45":"http://count.chanet.com.cn/click.cgi?a=440863&d=310932&u={PageID}-{BlockID}-{OtherID}&e={ChannelID}&url={url}" , "T46":"http://count.chanet.com.cn/click.cgi?a=439743&d=332877&u={PageID}-{BlockID}-{OtherID}&e={ChannelID}&url={url}" , "T47":"http://count.chanet.com.cn/click.cgi?a=439743&d=332895&u={PageID}-{BlockID}-{OtherID}&e={ChannelID}&url={url}" , "T48":"http://count.chanet.com.cn/click.cgi?a=439743&d=332896&u={PageID}-{BlockID}-{OtherID}&e={ChannelID}&url={url}" , "T50":"{url}&spm=2014.12675146.{PageID}.a{BlockID}b{OtherID}" , "T51":"{url}&spm=2014.12675146.{PageID}.a{BlockID}b{OtherID}" , "T57":"http://count.chanet.com.cn/click.cgi?a=439743&d=332912&u={PageID}-{BlockID}-{OtherID}&e={ChannelID}&url={url}" , "T58":"{url}?tag=it168-product-dsbj-23" , "T59":"{url}?tag=pcpop-product-dsbj-23" , "T60":"{url}?tag=it168-product-zs-23" , "T61":"{url}?tag=pcpop-product-zs-23" , "T62":"{url}?tag=it168-product-b-23" , "T63":"{url}?tag=pcpop-product-b-23" , "T64":"{url}?tag=it168-doc-wz-23" , "T65":"{url}?tag=pcpop-doc-wz-23" , "T66":"{url}?tag=it168-doc-mobile-23" , "T67":"{url}?tag=pcpop-doc-mobile-23" , "T68":"{url}?tag=it168-tu-23" , "T69":"{url}?tag=pcpop-tu-23" , "T70":"{url}?tag=it168-lt-benyouhui-23" , "T71":"{url}?tag=it168-lt-acer-23" , "T72":"{url}?tag=it168-lt-dell-23" , "T73":"{url}?tag=it168-lt-jiyouhui-23" , "T75":"http://g.yiqifa.com/gc?w=515194&u=213287&e=a{ChannelID}b{PageID}c{BlockID}d{OtherID}&c=6494&v=118412&i=24663&t={url}" , "T76":"http://count.chanet.com.cn/click.cgi?a=439743&d=351725&u={PageID}-{BlockID}-{OtherID}&e={ChannelID}&url={url}" , "T77":"http://g.yiqifa.com/gc?w=515194&u=213287&e=a{ChannelID}b{PageID}c{BlockID}d{OtherID}&c=5532&v=76003&i=13082&t={url}" , "T78":"http://g.yiqifa.com/gc?w=515194&u=213287&e=a{ChannelID}b{PageID}c{BlockID}d{OtherID}&c=17177&v=448371&i=38434&t={url}" , "T79":"http://g.yiqifa.com/gc?w=515194&u=213287&e=a{ChannelID}b{PageID}c{BlockID}d{OtherID}&c=6569&v=131361&i=20622&t={url}" , "T80":"http://g.yiqifa.com/gc?w=515194&u=213287&e=a{ChannelID}b{PageID}c{BlockID}d{OtherID}&c=6665&v=151006&i=22683&t={url}" , "T81":"http://g.yiqifa.com/gc?w=515194&u=213287&e=a{ChannelID}b{PageID}c{BlockID}d{OtherID}&c=6600&v=136552&i=21642&t={url}" , "T82":"http://g.yiqifa.com/gc?w=515194&u=213287&e=a{ChannelID}b{PageID}c{BlockID}d{OtherID}&c=6320&v=53213&i=18262&t={url}" , "T83":"http://g.yiqifa.com/gc?w=515194&u=213287&e=a{ChannelID}b{PageID}c{BlockID}d{OtherID}&c=4923&v=51189&i=8062&t={url}" , "T85":"http://count.chanet.com.cn/click.cgi?a=439743&d=355557&u={PageID}-{BlockID}-{OtherID}&e={ChannelID}&url={url}" , "T87":"http://count.chanet.com.cn/click.cgi?a=439743&d=355982&u={PageID}-{BlockID}-{OtherID}&e={ChannelID}&url={url}" , "T88":"http://g.yiqifa.com/gc?w=515194&u=213287&e=a{ChannelID}b{PageID}c{BlockID}d{OtherID}&c=6226&v=96047&i=17402&t={url}" , "T89":"http://g.yiqifa.com/gc?w=515194&u=213287&e=a{ChannelID}b{PageID}c{BlockID}d{OtherID}&c=5330&v=71752&i=21823&t={url}" , "T90":"http://count.chanet.com.cn/click.cgi?a=439743&d=332896&u={PageID}-{BlockID}-{OtherID}&e={ChannelID}&url={url}" , "T91":"{url}?tag=it168-product-dpg-23" , "T92":"{url}?tag=pcpop-product-dpg-23" , "T93":"http://g.yiqifa.com/gc?w=515194&u=213287&e=a{ChannelID}b{PageID}c{BlockID}d{OtherID}&c=4744&v=46651&i=7162&t={url}" , "T94":"http://g.yiqifa.com/gc?w=515194&u=213287&e=a{ChannelID}b{PageID}c{BlockID}d{OtherID}&c=6611&v=138340&i=21502&t={url}" , "T96":"http://a.okhqb.com/plus/cps_track.php?siteid=it168&src=emar&e=a{ChannelID}b{PageID}c{BlockID}d{OtherID}&channel=cps&cid=168&wi=NDgwMDB8dGVzdA==&url={url}" , "T97":"{url}?tag=it168-product-sy-23" , "T98":"http://cps.gome.com.cn/home/JoinUnion?sid=1081&wid=1103&feedback=a{ChannelID}b{PageID}c{BlockID}d{OtherID}&to={url}" , "T99":"http://idigger.allyes.com/main/c?db=mso&bid=154904,77492,5953&cid=24533,3073,151&sid=155001&show=ignore&url={url}" , "T103":"{url}?cps_id=jz_it168_banner_tl_0_pr" , "T104":"{url}?cps_id=jz_pcpop_pip_1_0_pr" , "T105":"{url}?tag=pcpop-product-jd-23" , "T106":"http://a1917.oadz.com/link/C/1917/754/M7xJAQGcGZSAaCkpuaEcJ3KM3R8_/p014/0/{url}?cps_id=jz_it168_banner_tl_0_pr" , "T107":"http://a1917.oadz.com/link/C/1917/756/APm3I0gSmjD62mI-TisKg.qd2KU_/p014/0/{url}?cps_id=jz_pcpop_pip_1_0_pr" , "T108":"{url}?tag=it168-m-23" , "T109":"{url}?tag=pcpop-m-23" , "T110":"{url}?it168-app-23" , "T111":"{url}?tag=pcpop-app-23" , "T113":"{url}?tag=gengpianyi-23" , "T115":"{url}?cps_id=jz_pcpop_pip_1_hq_pr" , "T116":"http://g.yiqifa.com/gc?w=515194&u=213287&e=gwk&c=17468&v=459141&i=40789&t={url}" , "T117":"http://g.yiqifa.com/gc?w=515194&u=213287&e=a{ChannelID}b{PageID}c{BlockID}d{OtherID}&c=17468&v=459141&i=40789&t={url}" , "T118":"{url}?tag=bnxsj-23" , "T119":"{url}?tag=jdcode-23" , "T120":"http://p.yiqifa.com/c?s=8fdbe8e7&w=515047&c=17169&i=38104&l=0&e=a{ChannelID}b{PageID}c{BlockID}d{OtherID}&t={url}" , "T122":"{url}?tag=app-tehuimai-23" , "T123":"{url}?cmpid=ad_pcpop_shouye-tl_3_o_2_o_20140305_zmnrj_o_o " , "T124":"{url}?cmpid=ad_pcpop_pingbandiannao-hzh_3_o_2_o_20140305_zmnrj_o_o " , "T125":"{url}?cps_id=jz_pcpop_pip_1_pc" , "T126":"{url}?utm_source=pcpop&utm_medium=chanpin&utm_campaign=huachijie" , "T127":"{url}?cmpid=ad_pcpop_shouye-tl_3_o_2_o_20140309_cjhjz315_o_o " , "T128":"{url}?cmpid=ad_pcpop_shouye-ydl_3_o_2_o_20140309_cjhjz315_o_o" , "T129":"{url}?cps_id=jz_it168_banner_rw" , "T130":"{url}?tag=zxb-23" , "T131":"tag=cpkweixn-23" , "T132":"{url}?cps_id=jz_pcpop_0_tv_pip_booking_x60_0_pc" , "T133":"{url}?ad_pcpop_cpk_3_o_2_o_20140101_o_o_o " , "T134":"{url}?cps_id=pcpop_pc_yg_banner_pc_all_p" , "T135":"{url}?tag=cpkweixin-23" , "T140":"http://union.suning.com/aas/open/vistorAd.action?userId=16944&webSiteId=9&adInfoId=9&adBookId=9&subUserEx=ppw-{ChannelID}-{PageID}-{BlockID}-{OtherID}&vistURL={url}" , "T141":"{url}?cmpid=ad_pcpop_shouye-tl_3_o_2_o_20140418_o_o_o" , "T142":"{url}?tag=jdzhushou-app-23" , "T143":"{url}?tag=jdzhushou-iphone-23" , "T144":"http://p.yiqifa.com/c?s=d077f8dd&w=515194&c=17532&i=41052&l=0&e=a{ChannelID}b{PageID}c{BlockID}d{OtherID}&t={url}" , "T145":"http://p.yiqifa.com/c?s=1f4f5c4d&w=515194&c=254&i=160&l=0&e=a{ChannelID}b{PageID}c{BlockID}d{OtherID}&t={url}" , "T146":"http://p.yiqifa.com/c?s=62718716&w=515194&c=5402&i=11642&l=0&e=a{ChannelID}b{PageID}c{BlockID}d{OtherID}&t={url}" , "T148":"http://p.yiqifa.com/c?s=ce9b55c2&w=515194&c=5298&i=10942&l=0&e=a{ChannelID}b{PageID}c{BlockID}d{OtherID}&t={url}" , "T149":"http://p.yiqifa.com/c?s=c99fb1bf&w=515194&c=6712&i=22762&l=0&e=a{ChannelID}b{PageID}c{BlockID}d{OtherID}&t={url}" , "T150":"{url}?cmpid=ad_pcpop_yidongdianyuan-hzh_3_o_2_o_20140421_o_o_o " , "T151":"{url}?tag=pcpop-20" , "T152":"{url}?tag=it168-20" , "T154":"{url}?tag=it168-It-20" , "T155":"{url}?cmpid=ad_pcpop_yidongdianyuan-hzh_3_o_2_o_20140424_o_o_o " , "T156":"{url}?cmpid=ad_pcpop_shouye-zdl_3_o_2_o_20140424_o_o_o " , "T157":"{url}?cmpid=ad_it168_cpk_3_o_2_o_20141231_o_o_o" , "T158":"{url}?utm_source=pcpop&utm_medium=shuzijiadiancp&utm_campaign=xfzj" , "T160":"http://count.chanet.com.cn/click.cgi?a=439743&d=130872&u={PageID}-{BlockID}-{OtherID}&e={ChannelID}&url={url}" , "T162":"http://count.chanet.com.cn/click.cgi?a=440863&d=130872&u={PageID}-{BlockID}-{OtherID}&e={ChannelID}&url={url}" , "T163":"{url}?tag=pcpop0f-20" , "T164":"{url}?tag=it1680f-20" , "T165":"{url}?tag=it168-lt0f-20" , "T166":"http://count.chanet.com.cn/click.cgi?a=439743&d=22338&u={PageID}-{BlockID}-{OtherID}&e={ChannelID}&url={url}" , "T167":"http://count.chanet.com.cn/click.cgi?a=440863&d=22338&u={PageID}-{BlockID}-{OtherID}&e={ChannelID}&url={url}" , "T169":"{url}?cmpid=ad_pcpop_cpk_3_o_2_o_20140101_o_o_o " , "T170":"{url}?cps_id=it168_pc_rx_wzl_0_all_p" , "T171":"{url}?cmpid=ad_it168_wzk_3_o_2_o_20141231_o_o_o" , "T172":"{url}?cmpid=ad_pcpop_wzk_3_o_2_o_20140101_o_o_o" , "T173":"{url}?cmpid=ad_it168_ydd_3_o_2_o_20141231_o_o_o" , "T175":"http://count.chanet.com.cn/click.cgi?a=439743&d=360244&u={PageID}-{BlockID}-{OtherID}&e={ChannelID}&url={url}" , "T176":"http://count.chanet.com.cn/click.cgi?a=439743&d=367554&u={PageID}-{BlockID}-{OtherID}&e={ChannelID}&url={url}" , "T177":"http://count.chanet.com.cn/click.cgi?a=439743&d=372533&u={PageID}-{BlockID}-{OtherID}&e={ChannelID}&url={url}" , "T178":"http://count.chanet.com.cn/click.cgi?a=439743&d=262732&u={PageID}-{BlockID}-{OtherID}&e={ChannelID}&url={url}" , "T179":"http://p.yiqifa.com/c?s=2e306602&w=515194&c=17815&i=42366&l=0&e=a{ChannelID}b{PageID}c{BlockID}d{OtherID}&t={url}" , "T180":"http://p.yiqifa.com/c?s=6f5f2914&w=515194&c=17297&i=39095&l=0&e=a{ChannelID}b{PageID}c{BlockID}d{OtherID}&t={url}" , "T181":"http://count.chanet.com.cn/click.cgi?a=439743&d=372533&u={PageID}-{BlockID}-{OtherID}&e={ChannelID}&url={url}" , "T182":"http://c.duomai.com/track.php?site_id=127080&aid=61&euid=&t={url}" , "T183":"http://c.duomai.com/track.php?site_id=127080&aid=450&euid=&t={url}" , "T184":"http://c.duomai.com/track.php?site_id=127080&aid=387&euid=&t={url}" , "T211":"http://c.duomai.com/track.php?site_id=131499&aid=612&euid=a{ChannelID}b{PageID}c{BlockID}d{OtherID}&t={url}" , "T216":"http://p.yiqifa.com/c?s=25cba732&w=515047&c=4330&i=4984&l=0&e=a{ChannelID}b{PageID}c{BlockID}d{OtherID}&t={url}" , "T217":"http://p.yiqifa.com/c?s=b9f83dae&w=515047&c=139&i=802&l=0&e=a{ChannelID}b{PageID}c{BlockID}d{OtherID}&t={url} " , "T218":"http://p.yiqifa.com/c?s=d94e9696&w=515047&c=247&i=159&l=0&e=a{ChannelID}b{PageID}c{BlockID}d{OtherID}&t={url}" , "T219":"http://count.chanet.com.cn/click.cgi?a=439743&d=22338&u={PageID}-{BlockID}-{OtherID}&e={ChannelID}&url={url}" , "T220":"http://count.chanet.com.cn/click.cgi?a=440863&d=22338&u={PageID}-{BlockID}-{OtherID}&e={ChannelID}&url={url}" , "T221":"http://count.chanet.com.cn/click.cgi?a=439743&d=262732&u={PageID}-{BlockID-{OtherID}&e={ChannelID}&url={url}" , "T223":"http://aos.prf.hn/click/camref:111l3xr/pubref:a{ChannelID}b{PageID}c{BlockID}d{OtherID}/destination:{url} " , "T224":"华硕(ASUS) TF0310C 标准版10.1英寸平板" , "T227":"http://p.yiqifa.com/c?s=012a62a3&w=515194&c=17971&i=42553&l=0&e=a{ChannelID}b{PageID}c{BlockID}d{OtherID}c&t={url}" , "T228":"http://count.chanet.com.cn/click.cgi?a=439743&d=333716&u={PageID}-{BlockID}-{OtherID}&e={ChannelID}&url={url}" , "T230":"{url}?cmpid=ad_pcpop_ydd" , "T231":"{url}?tag=pcpop-s-23" , "T232":"http://count.chanet.com.cn/click.cgi?a=439743&d=382496&u={PageID}-{BlockID}-{OtherID}&e={ChannelID}&url={url}" , "T234":"http://p.yiqifa.com/c?s=29c1b810&w=515047&c=17177&i=38434&l=0&e=a{ChannelID}b{PageID}c{BlockID}d{OtherID}&t={url}" , "T235":"{url}?tag=it168hao123-23" , "T236":"http://union.suning.com/aas/open/vistorAd.action?userId=16944&webSiteId=9&adInfoId=9&adBookId=9&subUserEx=it168-wzl&vistURL={url}?utm_source=zq-it168&utm_medium=wzl&utm_campaign=paiqi" , "T237":"http://union.suning.com/aas/open/vistorAd.action?userId=16944&webSiteId=9&adInfoId=9&adBookId=9&subUserEx=ppw-wzl&vistURL={url}?utm_source=zq-ppw&utm_medium=wzl&utm_campaign=paiqi" , "T238":"http://c.duomai.com/track.php?site_id=131499&aid=84&euid=a{ChannelID}b{PageID}c{BlockID}d{OtherID}&t={url}" , "T239":"http://c.duomai.com/track.php?site_id=131499&aid=61&euid=a{ChannelID}b{PageID}c{BlockID}d{OtherID}&t={url}" , "T240":"{url}?cmpid=ad_it168_hao_3_o_2_o_20141231_o_o_o" , "T246":"{url}?cmpid=ad_pcpop_hsj1_3_o_2_o_20141231_o_o_o" , "T247":"{url}?cmpid=ad_pcpop_hsj2_3_o_2_o_20141231_o_o_o" , "T249":"{url}?cmpid=ad_pcpop_hpb_3_o_2_o_20141231_o_o_o" , "T250":"{url}?cmpid=ad_pcpop_hpj_3_o_2_o_20141231_o_o_o" , "T251":"{url}?cmpid=ad_it168_hmsj_3_o_2_o_20141231_o_o_o" , "T252":"http://count.chanet.com.cn/click.cgi?a=439743&d=345657&u={PageID}-{BlockID}-{OtherID}&e={ChannelID}&url={url}" , "T253":"http://count.chanet.com.cn/click.cgi?a=439743&d=345657&u={PageID}-{BlockID}-{OtherID}&e={ChannelID}&url={url}" , "T254":"http://c.duomai.com/track.php?site_id=131499&aid=651&euid=a{ChannelID}b{PageID}c{BlockID}d{OtherID}&t={url}" , "T255":"http://c.duomai.com/track.php?site_id=131499&aid=1146&euid=a{ChannelID}b{PageID}c{BlockID}d{OtherID}&t={url}" , "T256":"http://c.duomai.com/track.php?site_id=131499&aid=450&euid=a{ChannelID}b{PageID}c{BlockID}d{OtherID}&t={url}" , "T257":"http://c.duomai.com/track.php?site_id=131499&aid=337&euid=a{ChannelID}b{PageID}c{BlockID}d{OtherID}&t={url}" , "T258":"http://c.duomai.com/track.php?site_id=131499&aid=64&euid=a{ChannelID}b{PageID}c{BlockID}d{OtherID}&t={url}" , "T259":"http://c.duomai.com/track.php?site_id=131499&aid=2649&euid=a{ChannelID}b{PageID}c{BlockID}d{OtherID}&t={url}" , "T260":"http://p.yiqifa.com/n?k=2mLErn2L6E2SrI6H2mLErI6H6EKO1QLsWNKL6nUHWNWqWl3qrI6HkQLErJMy1nXy1nUyrZy9KKPZCcL-&e=a{ChannelID}b{PageID}c{BlockID}d{OtherID}&t={url}" , "T261":"http://p.yiqifa.com/n?k=2mLErnzLWcLErI6H2mLErntl1QLsWNKL6nUHWNKqrZUP1JefMQqerI6HWEtlM52F6EUH2L--&e=a{ChannelID}b{PageID}c{BlockID}d{OtherID}&t={url}" , "T262":"http://c.duomai.com/track.php?site_id=131499&aid=85&euid=a{ChannelID}b{PageID}c{BlockID}d{OtherID}&t={url}" , "T263":"http://c.duomai.com/track.php?site_id=131499&aid=561&euid=a{ChannelID}b{PageID}c{BlockID}d{OtherID}&t={url}" , "T264":"http://c.duomai.com/track.php?site_id=131499&aid=2649&euid=a{ChannelID}b{PageID}c{BlockID}d{OtherID}&t={url}" , "T265":"http://c.duomai.com/track.php?site_id=131499&aid=58&euid=a{ChannelID}b{PageID}c{BlockID}d{OtherID}&t={url}" , "T266":"http://c.duomai.com/track.php?site_id=131499&aid=58&euid=a{ChannelID}b{PageID}c{BlockID}d{OtherID}&t={url}" , "T267":"http://c.duomai.com/track.php?site_id=131499&aid=387&euid=a{ChannelID}b{PageID}c{BlockID}d{OtherID}&t={url}" , "T268":"{url}?cmpid=ad_it168_hangqingwz_1_2_1_5_201604_o_o_o" , "T269":"{url}?cmpid=ad_pcpop_hangqingwz_1_2_1_5_201604_o_o_o " , "T270":"http://p.yiqifa.com/c?s=7477ea89&w=515047&c=5532&i=13082&l=0&e=a{ChannelID}b{PageID}c{BlockID}d{OtherID}&t={url}" , "T271":"{url}?cmpid=ad_pcpop_hangqingwz_1_2_1_5_201608_o_o_o" , "T272":"http://cps.yaoqing.com/yqtrack.php?sid=98748&aid=2352&euid=a{ChannelID}b{PageID}c{BlockID}d{OtherID}&t={url}" , "T273":"http://cps.yaoqing.com/yqtrack.php?sid=98748&aid=3393&euid=a{ChannelID}b{PageID}c{BlockID}d{OtherID}&t={url}" },"Ucp":{ "U356123":"270" , "U46123":"271" , "U296123":"81" , "U466123":"252" , "U626123":"264" , "U166123":"256" , "U596123":"180" , "U286123":"80" , "U56123":"257" , "U396123":"266" , "U66123":"98" , "U316123":"258" , "U96123":"211" , "U506123":"148" , "U586123":"181" , "U806123":"253" , "U456123":"254" , "U416123":"88" , "U496123":"146" , "U336123":"96" , "U366123":"82" , "U376123":"83" , "U426123":"89" , "U546123":"149" , "U306123":"263" , "U206123":"267" , "U26123":"65" , "U26123":"65" , "U436123":"93" , "U326123":"262" , "U66123":"98" , "U16123":"272" , "U516123":"163" , "U226123":"259" , "U346123":"265" }}; var SequelLian = { ChannelId: 0, //频道id ChannelPageId: 0, //频道页id ChannelPageBlockId: 0, //频道页块id OtherID: "0", DivIds: "", //a标签所在容器编号 div1,div2,div3(与DivClass必传其中一个) DivClass: "", //a标签所在容器的class cls1,cls2,cls3(与DivIds必传其中一个) SiteId: 0, //站点id 1.泡泡 2.it168 EBSiteId: 0, //电商编号(由程序中分析链接获取,不用外部传入) //下面是clickpv统计用的,谁用谁传 spid: 0, ckpid: 0, scid: 0, bid: 0, pid: 0, cpurl: '', //点击到的电商URL,点击时获取 //根据频道编号获取网站编号 GetSiteID: function () { if (this.ChannelId == 1 || this.ChannelId == 3 || this.ChannelId == 5 || this.ChannelId == 9 || this.ChannelId == 10 || this.ChannelId == 11 || this.ChannelId == 13 || this.ChannelId == 15) { this.SiteId = 1; return; } if (this.ChannelId == 2 || this.ChannelId == 4 || this.ChannelId == 6 || this.ChannelId == 7 || this.ChannelId == 8 || this.ChannelId == 14 || this.ChannelId == 20) { this.SiteId = 2; return; } if (this.ChannelId == 12 || this.ChannelId == 16 || this.ChannelId == 17 || this.ChannelId == 18 || this.ChannelId == 19 || this.ChannelId == 21 || this.ChannelId == 22 || this.ChannelId == 23) { this.SiteId = 3; return; } }, //初始化对象 init: function () { return this; }, //根据url获取电商编号 返回0时为不匹配电商 GetEBSite: function (url) { //删除这几种形式的反利后再判断 url = url.replace(/http:\/\/count.chanet.com.cn\/.*?url=/, ""); url = url.replace(/http:\/\/g.yiqifa.com\/.*?t=/, ""); url = url.replace(/http:\/\/a.okhqb.com\/plus\/.*?url=/, ""); url = url.replace(/https:\/\/count.chanet.com.cn\/.*?url=/, ""); url = url.replace(/https:\/\/g.yiqifa.com\/.*?t=/, ""); url = url.replace(/https:\/\/a.okhqb.com\/plus\/.*?url=/, ""); //获取域名 var m = url.match("^http://(.*?)(?:/|$)"); if (m == null) { m = url.match("^https://(.*?)(?:/|$)"); } if (m != null && m.length > 1) { url = m[1]; } //逐个判断 if (url.indexOf("baomi.com") != -1) { this.EBSiteId = 0; return; } if (url.indexOf("jd.com") != -1) { if (url.indexOf("z.jd.com") == -1 && url.indexOf("union.click.jd.com") == -1) { this.EBSiteId = 1; return; } } if (url.indexOf("amazon.cn") != -1 || url.indexOf("z.cn") != -1) { this.EBSiteId = 2; return; } if (url.indexOf("suning.com") != -1) { this.EBSiteId = 3; return; } if (url.indexOf("gome.com.cn") != -1) { this.EBSiteId = 4; return; } if (url.indexOf("51buy.com") != -1 || url.indexOf("yixun.com") != -1) { this.EBSiteId = 5; return; } if (url.indexOf("coo8.com") != -1) { this.EBSiteId = 6; return; } if (url.indexOf("yidianda.com") != -1) { this.EBSiteId = 7; return; } // if (url.indexOf("taobao.com") != -1 || url.indexOf("tmall.com") != -1) { // this.EBSiteId = 8; // return; // } if (url.indexOf("store.apple.com") != -1) { this.EBSiteId = 9; return; } if (url.indexOf("mall.10010.com") != -1) { this.EBSiteId = 11; return; } if (url.indexOf("tao3c.com") != -1) { this.EBSiteId = 12; return; } if (url.indexOf("hicdma.com") != -1) { this.EBSiteId = 13; return; } if (url.indexOf("shop.lenovo.com.cn") != -1 || url.indexOf("shop.lenovomobile.com") != -1) { this.EBSiteId = 14; return; } if (url.indexOf("xiaomi.com") != -1 || url.indexOf("mi.com") != -1) { this.EBSiteId = 16; return; } if (url.indexOf("oppo.com") != -1 || url.indexOf("opposhop.com.cn") != -1) { this.EBSiteId = 17; return; } if (url.indexOf("vivo.com.cn") != -1) { this.EBSiteId = 18; return; } if (url.indexOf("meizu.com") != -1) { this.EBSiteId = 19; return; } if (url.indexOf("www.vmall.com") != -1) { this.EBSiteId = 20; return; } if (url.indexOf("shop.ejiayu.com") != -1) { this.EBSiteId = 21; return; } if (url.indexOf("microsoftstore.com") != -1) { this.EBSiteId = 22; return; } if (url.indexOf("ahongmall.com") != -1) { this.EBSiteId = 28; return; } if (url.indexOf("store.logitech.com.cn") != -1) { this.EBSiteId = 29; return; } if (url.indexOf("ehaier.com") != -1) { this.EBSiteId = 30; return; } if (url.indexOf("dangdang.com") != -1) { this.EBSiteId = 31; return; } if (url.indexOf("newegg.com.cn") != -1 || url.indexOf("newegg.cn") != -1) { this.EBSiteId = 32; return; } if (url.indexOf("okhqb.com") != -1 || url.indexOf("360hqb.com") != -1) { this.EBSiteId = 33; return; } if (url.indexOf("yhd.com") != -1) { this.EBSiteId = 34; return; } if (url.indexOf("zm7.cn") != -1) { this.EBSiteId = 35; return; } if (url.indexOf("efeihu.com") != -1) { this.EBSiteId = 36; return; } if (url.indexOf("new7.com") != -1) { this.EBSiteId = 37; return; } if (url.indexOf("dell.com.cn") != -1) { this.EBSiteId = 38; return; } if (url.indexOf("1mall.com") != -1) { this.EBSiteId = 39; return; } if (url.indexOf("dianping.com") != -1) { this.EBSiteId = 40; return; } if (url.indexOf("nuomi.com") != -1) { this.EBSiteId = 41; return; } if (url.indexOf("manzuo.com") != -1) { this.EBSiteId = 42; return; } if (url.indexOf("lusen.com") != -1) { this.EBSiteId = 43; return; } if (url.indexOf("v6shangcheng.com") != -1) { this.EBSiteId = 44; return; } if (url.indexOf("shop.letv.com") != -1) { this.EBSiteId = 45; return; } if (url.indexOf("coolpad.cn") != -1) { this.EBSiteId = 46; return; } if (url.indexOf("shopping1.hp.com") != -1) { this.EBSiteId = 47; return; } if (url.indexOf("10086.cn") != -1) { this.EBSiteId = 48; return; } if (url.indexOf("meituan.com") != -1) { this.EBSiteId = 49; return; } if (url.indexOf("lashou.com") != -1) { this.EBSiteId = 50; return; } if (url.indexOf("amazon.com") != -1) { this.EBSiteId = 51; return; } if (url.indexOf("sfbest.com") != -1) { this.EBSiteId = 54; return; } if (url.indexOf("oneplus.cn") != -1) { this.EBSiteId = 55; return; } if (url.indexOf("ztehn.com") != -1) { this.EBSiteId = 56; return; } if (url.indexOf("s1.mi.com") != -1 || url.indexOf("p.www.xiaomi.com") != -1) { this.EBSiteId = 58; return; } if (url.indexOf("eshop.htc.com") != -1) { this.EBSiteId = 59; return; } if (url.indexOf("jump.ztcadx.com") != -1) {//酷宝 this.EBSiteId = 100; return; } if (url.indexOf("tv.coocaa.com") != -1) { this.EBSiteId = 61; return; } if (url.indexOf("microsoftstore.com.cn") != -1) { this.EBSiteId = 62; return; } if (url.indexOf("aa7a.cn") != -1) { this.EBSiteId = 63; return; } this.EBSiteId = 0; }, //处理链接 LinkConvert: function (EBProductUrl) { //删除原有的返利链接 if (this.EBSiteId == 2) { EBProductUrl = EBProductUrl.replace(/[\?|&]+?tag=.*?(?=$|&)/, ""); } EBProductUrl = EBProductUrl.replace(/http:\/\/cps.gome.com.cn\/home\/.*?to=/, ""); EBProductUrl = EBProductUrl.replace(/http:\/\/count.chanet.com.cn\/.*?url=/, ""); EBProductUrl = EBProductUrl.replace(/http:\/\/g.yiqifa.com\/.*?t=/, "") EBProductUrl = EBProductUrl.replace(/http:\/\/a.okhqb.com\/plus\/.*?url=/, ""); ; //删除原有的返利链接结束 var TbGoodsId = null; if (this.EBSiteId == 2) { if (EBProductUrl.toString().indexOf("A1AJ19PSB66TGU") > 0) { EBProductUrl = SequelLian.UrlAddParameter(EBProductUrl, "smid", "A1AJ19PSB66TGU"); } } try { var UrlList = UrlJson.Templet; var RUrlList = UrlJson.Ucp; var key = "U" + this.EBSiteId + "" + this.ChannelPageId + "" + this.ChannelPageBlockId + ""; var UrlId = RUrlList[key]; var TempletUrl = UrlList["T" + UrlId]; if (TempletUrl == null) { return EBProductUrl; } if (TempletUrl.toString().indexOf("{url}") == 0) { if (EBProductUrl.toString().indexOf("?") != -1) { TempletUrl = TempletUrl.replace("{url}?", "{url}&"); } else { TempletUrl = TempletUrl.replace("{url}&", "{url}?"); } } TempletUrl = TempletUrl.replace(/{url}/g, EBProductUrl).replace(/{ChannelID}/g, this.ChannelId).replace(/{PageID}/g, this.ChannelPageId).replace(/{BlockID}/g, this.ChannelPageBlockId).replace(/{OtherID}/g, this.OtherID); return TempletUrl; } catch (e) { return; } }, //给一个连接后面追加一个参数 UrlAddParameter: function (url, key, value) { if (url == "") { return ""; } if (url.toString().indexOf(key) > 0 && url.toString().indexOf(value) > 0) { return url; } if (url.toString().indexOf("?") > 0) { url = url + "&"; } else { url = url + "?"; } url = url + key + "=" + value; return url; }, //调用GA签 GAClick: function () { var ShopEnNameJSON = { e1: "360buy", e2: "amazon", e3: "suning", e4: "gome", e5: "51buy", e6: "coo8", e7: "yidianda", e8: "Taobao", e9: "applestore", e10: "Tmall", e11: "liantong", e12: "gaohong", e13: "tianyi", e14: "lenovo", e16: "xiaomi", e17: "oppo", e18: "vivo", e19: "meizu", e20: "huawei", e21: "ejiayu", e22: "microsoft", e28: "360tg", e29: "logitech", e30: "ehaier", e31: "dangdang", e32: "newegg", e33: "okhqb", e34: "yihaodian", e35: "zm7", e36: "feihu", e37: "new7", e38: "dell", e39: "yihaomall", e40: "dianping", e41: "nuomi", e42: "manzuo", e43: "lvsen", e44: "v6", e45: "letv", e46: "coolpad", e47: "hp", e48: "bjmobile", e49: "meituan", e50: "lashou", e51: "amazon usa", e54: "sf", e55: "oneplus", e56: "ztehn", e61: "coocaa", e62: "ms", e63: "huahua" }; var PageNameJSON = { e1: "电商报价页", e2: "综述页", e3: "电商报价页", e4: "综述页", e5: "系列页", e6: "文章页", e7: "图赏页", e8: "图赏页", e9: "文章页", e11: "实体店报价页(动静)", e12: "手机版v1", e13: "产品综述", e14: "价格趋势", e16: "老点评页", e20: "评测页", e21: "比价落地页", e23: "比价落地页", e24: "参数页", e25: "大图页", e26: "点评最终页", e28: "DIY聚合频道", e30: "主板频道", e31: "显卡频道", e32: "三大件频道", e34: "音箱频道", e35: "耳机频道", e36: "键鼠频道", e37: "机电散频道", e38: "笔记本频道", e39: "超级本频道", e40: "手机频道", e41: "平板频道", e42: "数码相机频道", e43: "数字家电频道", e44: "智能电视频道", e45: "显示器频道", e46: "MP3MP4频道", e47: "GPS频道", e48: "电子书频道", e49: "移动存储频道", e50: "摄像机频道", e51: "台式机频道", e52: "一体电脑频道", e53: "商用电脑频道", e54: "首页", e55: "笔记本频道", e56: "LCD频道", e57: "耳机频道", e59: "平板电脑频道", e60: "手机频道", e61: "摄像机频道", e62: "数码相机频道", e63: "超级本频道", e64: "台式机频道", e66: "一体电脑频道", e67: "投影机频道", e68: "GPS频道", e69: "机电散频道", e70: "键鼠频道", e72: "数码频道集合页频道", e73: "音箱频道", e74: "MP3频道", e75: "家电频道", e76: "显卡频道", e77: "主板频道", e78: "CPU频道", e79: "无线频道", e80: "本友会", e81: "安卓之家", e83: "ACER论坛", e84: "DELL论坛", e85: "板友会", e86: "Iepad", e87: "静态实体店报价页", e88: "参数页", e89: "图片C页面", e90: "图片具体类别页面", e91: "文章页", e92: "文章行情列表页", e93: "文章导购列表页", e95: "点评老最终页", e97: "下载页", e98: "特色", e99: "读图选机", e100: "动态实体店报价页", e101: "大图页", e102: "B页面", e103: "售后服务页", e104: "综述页简版", e105: "新点评页", e106: "标评排行榜", e107: "主题购", e108: "主题购", e109: "IT168首页", e110: "标评排行榜", e112: "B页面", e113: "直播", e114: "产品论坛帖子页", e115: "俱乐部帖子(静)", e125: "越来越会买首页", e127: "越来越会买列表页", e128: "越来约会买文章页", e129: "标屏最终页面", e130: "IT168长尾词专题", e131: "泡泡长尾词专题", e132: "新点评页", e133: "高清播放机频道", e134: "老点评页", e135: "新版B页面", e136: "新文章页", e138: "机友会手机价格", e139: "ieda乐园", e140: "摄友会", e142: "烧友会", e143: "峰友会", e144: "WP之家", e145: "机友会", e146: "泡美美专题", e147: "软件频道", e148: "高清播放机频道", e150: "新浪微博", e151: "机友团", e152: "本友团", e153: "板友团", e155: "摄友团", e156: "团购详情页", e157: "产品详情页", e158: "汽车之家首页", e159: "产品库首页", e161: "平板电脑频道", e162: "直播文章页", e163: "印象栏目文章页", e164: "专题页面", e165: "单电频道", e166: "手机平板频道", e167: "WindowsPhone频道", e168: "机友会首页", e169: "特惠买首页", e170: "推划算首页", e171: "问答频道", e172: "盒子网", e173: "专题页面", e174: "平板笔记本频道", e175: "新品首页", e176: "IT168产品库首页", e177: "hao123数码二级页面", e178: "更便宜综述页", e179: "手机团购频道", e180: "M.IT168文章页", e181: "M.IT168图赏", e182: "M.PCPOP文章页", e183: "M.PCPOP图赏", e184: "IT168 APP", e185: "PCPOP APP", e217: "图赏页" }; var PageBlockJSON = { e3: "网购比价", e4: "网购比价", e5: "网购比价", e6: "网购比价", e7: "今日降价排行", e10: "今日降价排行", e11: "今日降价排行", e12: "今日降价排行", e13: "今日降价排行", e14: "今日降价排行", e15: "今日降价排行", e16: "今日降价排行", e17: "今日降价排行", e18: "热门产品", e19: "今日降价排行", e20: "热门产品", e21: "今日降价排行", e22: "热门产品", e23: "今日降价排行", e24: "热门产品", e25: "今日降价排行", e26: "热门产品", e27: "今日降价排行", e28: "热门产品", e29: "今日降价排行", e30: "热门产品", e31: "今日降价排行", e32: "热门产品", e33: "今日降价排行", e34: "热门产品", e35: "今日降价排行", e36: "热门产品", e37: "今日降价排行", e38: "热门产品", e39: "今日降价排行", e40: "热门产品", e41: "今日降价排行", e42: "热门产品", e43: "今日降价排行", e45: "热门产品", e46: "今日降价排行", e47: "热门产品", e48: "今日降价排行", e49: "热门产品", e51: "今日降价排行", e52: "热门产品", e53: "今日降价排行", e54: "热门产品", e55: "今日降价排行", e56: "热门产品", e57: "今日降价排行", e58: "热门产品", e59: "今日降价排行", e60: "热门产品", e61: "今日降价排行", e62: "热门产品", e63: "今日降价排行", e64: "热门产品", e65: "今日降价排行", e66: "热门产品", e67: "今日降价排行", e68: "热门产品", e69: "今日降价排行", e70: "热门产品", e71: "今日降价排行", e72: "热门产品", e73: "今日降价排行", e74: "热门产品", e75: "热门产品", e76: "热门产品", e77: "热门产品", e78: "热门产品", e79: "热门产品", e80: "热门产品", e81: "今日降价排行", e82: "今日降价排行", e83: "今日降价排行", e84: "今日降价排行", e85: "多维度点评", e86: "多维度点评", e87: "多维度点评", e88: "多维度点评", e89: "多维度点评", e90: "多维度点评", e91: "多维度点评", e92: "多维度点评", e93: "多维度点评", e94: "最低价", e95: "最低价", e97: "最低价", e98: "最低价", e99: "最低价", e100: "最低价", e101: "最低价", e102: "最低价", e103: "最低价", e105: "最低价", e106: "最低价", e107: "最低价", e108: "最低价", e109: "最低价", e111: "最低价", e112: "最低价", e113: "最低价", e114: "今日降价排行", e115: "今日降价排行", e116: "今日降价排行", e117: "今日降价排行", e118: "今日降价排行", e119: "推荐产品", e120: "推荐产品", e121: "今日降价排行", e122: "双十一首页推荐", e123: "文章正文", e124: "文章正文", e125: "主题购板块", e126: "主题购板块", e127: "今日降价排行", e128: "推荐产品", e129: "主题购板块", e130: "主题购板块", e131: "今日降价排行", e132: "热门产品", e147: "推荐产品", e148: "推荐产品", e150: "最低价", e151: "单品", e152: "首屏最低价(分期付款)", e153: "单品", e154: "单品", e155: "参数页最低价", e156: "大图页最低价", e157: "优缺点最低价", e158: "今日降价排行", e159: "推荐产品", e160: "今日降价排行", e161: "推荐产品", e162: "最低价", e163: "今日降价排行", e164: "配件", e165: "配件", e166: "今日降价排行", e167: "热门产品", e169: "单品", e170: "单品", e171: "最低价", e172: "销量冠军", e173: "销量冠军", e174: "本月热销板块", e175: "最新上架板块", e176: "今日降价", e177: "产品列表", e178: "点评最多板块", e179: "PK板块", e180: "单品JS", e181: "产品分类浮层", e184: "文章关联产品", e187: "今日降价排行", e188: "今日降价排行", e189: "单品", e190: "推荐产品", e192: "图片下电商报价", e193: "单品", e194: "单品", e195: "帖子正文", e196: "帖子正文", e197: "帖子正文", e198: "帖子正文", e199: "帖子正文", e200: "帖子正文", e201: "帖子正文", e202: "帖子正文", e203: "帖子正文", e204: "帖子正文", e205: "帖子正文", e206: "销量冠军", e207: "推荐产品板块", e208: "团购版块", e209: "热卖板块", e210: "推荐产品板块", e211: "团购版块", e213: "热卖板块", e214: "网友综合评分板块", e215: "超极宝典-热销签", e216: "联想推荐产品一", e217: "联想推荐产品二", e218: "手工超值推荐", e219: "手工超值推荐", e220: "购买按钮", e222: "购买按钮", e224: "图注手工推荐", e225: "图注手工推荐", e227: "单品", e228: "编辑推荐", e229: "单品", e230: "推荐产品", e231: "今日降价排行", e232: "图片下电商报价", e233: "价格趋势浮层", e234: "价格趋势浮层", e235: "价格趋势浮层", e236: "价格趋势浮层", e237: "价格趋势浮层", e238: "文章列表", e239: "文章列表", e240: "文章列表", e241: "文章列表", e242: "文章列表", e243: "文章列表", e244: "文章列表", e245: "文章列表", e246: "文章列表", e247: "文章列表", e248: "文章列表", e249: "文章列表", e250: "文章列表", e251: "文章列表", e252: "文章列表", e253: "文章列表", e254: "文章列表", e255: "文章列表", e256: "文章列表", e257: "文章列表", e258: "文章列表", e259: "文章列表", e260: "图片右侧电商报价", e261: "手工超值推荐", e262: "推荐帖(表格)", e263: "文章列表", e264: "文章列表", e265: "热门产品", e266: "今日降价排行", e267: "文章页导航", e268: "专享团", e269: "专享团", e270: "专享团", e271: "专享团", e272: "专享团", e273: "专享团", e274: "专享团", e275: "专享团", e276: "intel购物助手降价产品", e277: "intel购物助手降价产品", e277: "intel购物助手降价产品", e278: "数码杂货铺", e279: "首屏官网价格", e280: "单品JS", e281: "首屏官网价格", e282: "首屏官网价格", e283: "首屏官网价格", e284: "首屏官网价格", e286: "首屏官网价格", e287: "首屏官网价格", e288: "首屏官网价格", e289: "首屏官网价格", e290: "首屏官网价格", e291: "首屏官网价格", e292: "首屏官网价格", e293: "首屏官网价格", e294: "首屏官网价格", e295: "首屏官网价格", e296: "专享团", e297: "专享团", e298: "专享团", e299: "京东推广", e300: "京东推广", e301: "京东推广", e303: "数码杂货铺", e304: "数码杂货铺", e305: "数码杂货铺", e306: "特开亚马逊广告", e307: "特开亚马逊广告", e308: "特开亚马逊广告", e309: "特开亚马逊广告", e310: "特开亚马逊广告", e311: "特开亚马逊广告", e312: "产品库入口", e313: "产品库入口", e314: "专享团", e315: "专享团", e316: "专享团", e317: "本月热销板块", e318: "最新产品板块", e319: "文章正文", e320: "intel助手", e321: "intel助手", e322: "印象栏目文章正文", e323: "小米手机专题", e324: "文章列表", e325: "文章列表", e326: "文章列表", e327: "文章列表", e329: "文章列表", e330: "文章列表", e331: "文章列表", e332: "文章列表", e333: "文章列表", e334: "文章列表", e335: "文章列表", e336: "文章列表", e337: "文章列表", e338: "文章列表", e339: "文章列表", e340: "文章列表", e341: "文章列表", e342: "文章列表", e343: "文章列表", e344: "文章列表", e345: "文章列表", e346: "文章列表", e347: "文章列表", e348: "文章列表", e349: "yoga文章", e350: "oga帖子", e351: "yoga图赏", e352: "文章列表", e353: "文章列表", e354: "文章列表", e355: "专享团", e356: "瀑布流区块", e357: "瀑布流区块", e358: "特开国美广告", e359: "特开国美广告", e360: "特开国美广告", e361: "特开国美广告", e362: "特开国美广告", e363: "特开国美广告", e364: "特开国美广告", e365: "特开国美广告", e366: "特开国美广告", e367: "特开国美广告", e368: "特开国美广告", e369: "推荐产品", e370: "文章列表", e371: "帖子电商模块1", e372: "文章列表", e373: "亚马逊搭配购", e374: "亚马逊搭配购", e375: "亚马逊搭配购", e376: "亚马逊搭配购", e377: "亚马逊搭配购", e378: "亚马逊搭配购", e379: "移动客户端(张金桂)", e380: "今日降价排行JS", e381: "促销汇", e382: "新版A页面", e383: "首屏最低报价", e384: "本月热销板块", e385: "产品介绍正文", e386: "亚马逊搭配购", e387: "单品", e388: "推荐产品", e389: "今日降价排", e390: "文章列表", e391: "水货手机", e392: "A页面热门活动", e393: "A页面子类楼层区块", e394: "A页面电商导航", e395: "水货手机", e499: "图赏翻页", e504: "参数页电商", e505: "下载页电商", e506: "文章页电商", e508: "评测页电商", e509: "新点评论电商" }; }, //调用胡哥统计签 EBClick: function () { var clickpvtrack = new ClickPvTrack(); clickpvtrack.cid = this.ChannelId; clickpvtrack.cpid = this.ChannelPageId; clickpvtrack.pbid = this.ChannelPageBlockId; clickpvtrack.bdid = this.EBSiteId; clickpvtrack.cpurl = this.cpurl; clickpvtrack.spid = this.spid; clickpvtrack.ckpid = this.ckpid; clickpvtrack.scid = this.scid; clickpvtrack.bid = this.bid; clickpvtrack.pid = this.pid; clickpvtrack.track(); }, /* 根据元素clsssName得到元素集合 * @param fatherId 父元素的ID,默认为document * @tagName 子元素的标签名 * @className 用空格分开的className字符串 */ getElementsByClassName: function (fatherId, tagName, className) { node = fatherId && document.getElementById(fatherId) || document; tagName = tagName || "*"; className = className.split(" "); var classNameLength = className.length; for (var i = 0, j = classNameLength; i < j; i++) { //创建匹配类名的正则 className[i] = new RegExp("(^|\\s)" + className[i].replace(/\-/g, "\\-") + "(\\s|$)"); } var elements = node.getElementsByTagName(tagName); var result = []; for (var i = 0, j = elements.length, k = 0; i < j; i++) {//缓存length属性 var element = elements[i]; while (className[k++].test(element.className)) {//优化循环 if (k === classNameLength) { result[result.length] = element; break; } } k = 0; } return result; }, //传入div集合,获取其中a标签集合 GetACollectionInDivs: function (divCollection) { var ACollection = []; for (var i = 0; i < divCollection.length; i++) { var contentDiv = divCollection[i]; if (contentDiv != null) { var As = contentDiv.getElementsByTagName("a"); for (var j = 0; j < As.length; j++) { ACollection.push(As[j]); } } } return ACollection; }, //获取指定窗口中的所有链接标签 GetACollection: function () { var ACollection = []; if (this.DivIds != "") { var divIdCollection = this.DivIds.split(','); for (var i = 0; i < divIdCollection.length; i++) { var contentDiv = document.getElementById(divIdCollection[i]); if (contentDiv != null) { var As = contentDiv.getElementsByTagName("a"); for (var j = 0; j < As.length; j++) { ACollection.push(As[j]); } } } } if (this.DivClass != "") { var divClassCollection = this.DivClass.split(','); for (var i = 0; i < divClassCollection.length; i++) { var divCollection = this.getElementsByClassName('', '', divClassCollection[i]); ACollection = ACollection.concat(this.GetACollectionInDivs(divCollection)); } } return ACollection; }, //向无onclick事件的链接标签添加事件 BindEvent: function () { this.GetSiteID(); //通过频道获取网站编号 var collection = this.GetACollection(); for (var i = 0; i < collection.length; i++) { var a = collection[i]; this.GetEBSite(a.href); //获取当前电商编号 if (this.EBSiteId > 0) { if (this.ChannelPageId == 216 || this.ChannelPageId == 182 || this.ChannelPageId == 183 || this.ChannelPageId == 180 || this.ChannelPageId == 181) { //移动端的跳转中间页面 var linkNew = SequelLian.LinkConvert(a.href); a.setAttribute("href", SequelLian.OpenUrl(this.ChannelId, this.ChannelPageId, this.ChannelPageBlockId, linkNew)); } else { if (a.onclick != null) { continue; } if (document.all && window.ActiveXObject && !window.opera) { a.attachEvent("onclick", this.GetEventClick(a), false)//IE } else { a.addEventListener("click", this.GetEventClick(a), false)//火狐 } } } } }, jsonp: function (args) { var jsonp = document.createElement("script"); jsonp.setAttribute("charset", "utf-8"); jsonp.setAttribute("type", "text/javascript"); jsonp.setAttribute("src", args.url); jsonp.onload = jsonp.onreadystatechange = function () { if (!this.readyState || this.readyState == "loaded" || this.readyState == "complete") { if (typeof args.callBack == "function") args.callBack(args.args); //回调函数 jsonp.onload = jsonp.onreadystatechange = null; try { jsonp.parentNode && jsonp.parentNode.removeChild(jsonp); } catch (e) { }; } }; document.getElementsByTagName("body")[0].appendChild(jsonp); }, //利用闭包实现传入当前对象 GetEventClick: function (obj) { return function () { SequelLian.EventClick(obj); } }, //向标签添加的事件 EventClick: function (obj) { try { var a = obj; if (null == a) { return; } var orighref = a.getAttribute("_orighref") var linkOld = orighref ? orighref : a.href; this.GetEBSite(linkOld); //获取当前电商编号 if (this.EBSiteId > 0) { if (this.EBSiteId == 100) { var shopID = a.attributes["shopID"].nodeValue; KBO.ck([shopID, '138', '', '', '']) } var linkNew = SequelLian.LinkConvert(linkOld); var ClickFlag = a.getAttribute("flag"); if (ClickFlag == null || ClickFlag.length == 0) { a.setAttribute("flag", 1); } if (this.ChannelPageId != 216 && this.ChannelPageId != 182 && this.ChannelPageId != 183) { if (ClickFlag != 1) { a.href = linkNew ? linkNew : a.href; } this.cpurl = linkOld; //当前链接到的电商链接(统计用) //调用统计签 SequelLian.GAClick(); SequelLian.EBClick(); } else { SequelLian.OpenUrl(this.ChannelId, this.ChannelPageId, this.ChannelPageBlockId, linkNew); } } } catch (k) { return; } }, OpenUrl: function (channelID, channelPageID, pageblockId, EBProductUrl) { //得到页面引用 var refe = document.referrer; try { refe = top.document.referrer; } catch (e) { if (parent) { try { refe = parent.document.referrer; } catch (e2) { refe = document.referrer; } } } var escapeWrapperClickPv = window.encodeURIComponent || escape; var request = 'http://open.pcpop.com/OpenUrl.aspx' + '?cid=' + channelID + '&cpid=' + channelPageID + '&pbid=' + pageblockId + '&i=' + escapeWrapperClickPv(refe) + '&k=' + escapeWrapperClickPv(document.location.href) + '&cpurl=' + escapeWrapperClickPv(EBProductUrl); return request; } }