PageSourceSearch

https://statics.haiwainet.cn/tpl2021/2021-03-20/js/index-new.js

js haiwainet.cn collected 2026-09-24 19:37:54 UTC 23,440 bytes, 733 lines download raw bytes

1$(document).ready(function() {
2
3  var interaction = new Swiper('#interaction', {
4    paginationClickable: true,
5    loop: true,
6    autoplay: 3000,
7  });
8
9  $('#interaction .swiper-prev').click(function(){
10    interaction.swipePrev();
11  });
12  $('#interaction .swiper-next').click(function(){
13    interaction.swipeNext();
14  });
15  var hotMarrow = new Swiper('#hotMarrow', {
16    paginationClickable: true,
17    loop: true,
18    autoplay: 3000,
19    mode : 'vertical',
20  });
21
22  $('#hotMarrow .swiper-prev').click(function(){
23    hotMarrow.swipePrev();
24  });
25  $('#hotMarrow .swiper-next').click(function(){
26    hotMarrow.swipeNext();
27  });
28
29  // logo 右侧下拉
30  $('.logo .download').hover(function(){
31    $(this).addClass("on");
32    $(this).find('div').slideDown('fast');
33  },function(){
34    $(this).removeClass("on");
35    $(this).find('div').hide();
36  })
37  //频道点击 神策统计
38  $('.publicIndex a').click(function(){
39    var channelId = $(this).attr('data_channelId');
40    sensors.track("channelClick",{
41        channel_id:[channelId]
42    });
43})
44  //右侧浮动条
45  // var floatBox = $("#floatIcon")
46  // window.addEventListener("scroll", function() {
47  //     var y1 = 0;
48  //     var y2 = 0;
49  //     var o = floatBox[0].getBoundingClientRect();
50
51  //     if (document.documentElement) {
52  //         y1 = document.documentElement.scrollTop || 0;
53  //     }
54  //     if (document.body) {
55  //         y2 = document.body.scrollTop || 0;
56  //     }
57  //     // 滚动条到页面顶部的垂直距离
58  //     var y = Math.max(y1, y2);
59
60  //     // if(o.top<-20 && y>860 && !floatBox.hasClass("fixed") ){
61  //     //   floatBox.addClass("fixed").css({
62  //     //     top:100+'px'
63  //     //   }).animate({ top:122+'px'},"fast");
64
65  //     // }else if( y<850 && floatBox.hasClass("fixed")){
66  //     //   floatBox.removeClass("fixed").css({
67  //     //     top:870+'px'
68  //     //   }).animate({top:850+'px'},"fast");
69  //     // }
70
71  // });
72
73
74  //二维码显示
75  $("#floatIcon .erwei").hover(function(){
76    $("#code").addClass("show");
77  },function(){
78    $("#code").removeClass("show");
79  });
80
81  //刷新页面
82  $("#floatIcon .refresh").click(function(){
83    window.location.replace(window.location.href);
84  })
85
86  //返回顶部
87  $("#floatIcon .gotop").click(function(){
88    $(yaowenTop).removeClass("fixed").css({
89      "top":"40px",
90      "left": "6px"
91    })
92    gotoTop();
93  })
94  //2026电子报
95  try{
96  var papersBox = $("#papersBox");
97  var papersSwiperLen=0
98  var papersSwiper = new Swiper('#papers',{
99  })
100  $('#papers .swiper-prev').click(function(){
101    papersSwiper.swipePrev();
102  });
103  $('#papers .swiper-next').click(function(){
104    papersSwiper.swipeNext();
105  });
106  
107   $('#papersClose').click(function(){
108    papersBox.hide();
109  });
110  $('#papersOpen').click(function(){
111    getServeDate();
112    papersBox.show();
113  });
114  }catch(err){}
115  
116  var oneDay = 24 * 60 * 60 * 1000;
117  var currentDate = 0;
118  var getTimeErrorCount=0;//调服务器时间出错后,控制连续获取次数
119  var getCount=0;//调人民网出错后,控制连续获取次数
120  // console.log("🍎",severDate);
121  getServeDate();
122 
123  function getServeDate(){
124    $.ajax({
125        url:`//advert.haiwainet.cn/api/client/server/time`,
126        type: "GET",
127        dataType:'json',
128        success:function(res){
129         if(res.code==200){
130          currentDate= res.data.timestamp;
131          var dateStr=getDate(currentDate);
132           getPapers(dateStr,currentDate);
133         }else{
134          setTimeout(getServeDate,1000);
135         }
136        },
137        error:function(err){
138          console.log("服务器获取时间出错",err);
139          if(getTimeErrorCount<5){
140            setTimeout(getServeDate,1000);
141            getTimeErrorCount++;
142          }else{//使用客户端时间
143            var newDate = new Date();
144            var newTimestamp=newDate.getTime();
145            getPapers(getDate(newTimestamp),newTimestamp);
146          }
147        }
148      });
149  }
150  function getPapers(dateStr,timeNum){
151    $.ajax({
152        url:`//paper.people.com.cn/rmrb/pc/layout/json/rmrbhwb${dateStr}.jsonp?callback=rmrbhwbPaper&_=${timeNum}`,
153        type: "GET",
154        dataType:'jsonp',
155        jsonpCallback: "rmrbhwbPaper",
156        success:function(res){
157          if(res.length==0){//当天没有数据,获取前一天的数据 (最多获取前3天的数据)
158            var newDate = timeNum- oneDay;
159            if(getCount<2){
160              setTimeout(function(){
161               getPapers(getDate(newDate),newDate);
162            },1000);
163            getCount++;
164            }
165          }else{
166            getCount=0;
167            if(papersSwiperLen>0){
168              papersSwiper.removeAllSlides();
169            }
170            var year=dateStr.slice(0,4);
171            papersBox.find(".paperTit").text(`人民日报图文数据库(1946-${year})`)
172            res.forEach(function(item,index){
173              var itemHtml=`<a href="${item.url}" target="_blank"><img src="${item.pic}" alt="${item.pageName}"></a>
174              <div class="pageTit">第${item.pageNum}版:${item.pageName}</div>`
175              var newSlide = papersSwiper.createSlide(itemHtml,'swiper-slide','div');
176              newSlide.append();
177              papersSwiperLen++;
178            })
179          }
180        }
181      });
182  }
183  //获取日期格式为yyyymmdd
184  function getDate(currentDate){
185    var option={ timeZone: 'Asia/Shanghai' }
186    var dateD = new Date(currentDate);
187    var year=dateD.getFullYear('zh-CN',option);
188    var month=String(dateD.getMonth('zh-CN',option) + 1).padStart(2, '0');
189    var day=String(dateD.getDate('zh-CN',option)).padStart(2, '0');
190    var date=year+month+day;
191    // console.log(date);
192    return date;
193  }
194  function gotoTop(){
195    var speed=document.body.offsetHeight/10/1000;
196    var acceleration =  0.1;
197    var stime =  10;
198    var y1 = 0;
199    var y2 = 0;
200    var y3 = 0;
201    if (document.documentElement) {
202        y1 = document.documentElement.scrollTop || 0;
203    }
204    if (document.body) {
205        y2 = document.body.scrollTop || 0;
206    }
207
208    var y3 = window.scrollY || 0;
209
210    // 滚动条到页面顶部的垂直距离
211    var y = Math.max(y1, Math.max(y2, y3));
212
213    // 滚动距离 = 目前距离 / 速度, 因为距离原来越小, 速度是大于 1 的数, 所以滚动距离会越来越小
214    var speeding = 1 + acceleration;
215    window.scrollTo(0, Math.floor(y / speeding));
216
217    // 如果距离不为零, 继续调用函数
218    if( y > 0) {
219        var run = "gotoTop(" + speed+ ")";
220
221        t=setTimeout(function(){
222          gotoTop(speed)
223        }, stime);
224    }
225  }
226
227  //要闻
228
229    var yaowenPage=1,
230        yaowenErrorCount=0, // 新增错误计数
231        yaowenBox=$('#yaowen').parents('.middle'),
232        yaowenTop=$("#yaowenTop"),
233        yaowenShares=$('#yaowenList .share'),
234        yaowenMore=$('#yaowen li.more');
235        yaowenListOBJ = new Object;
236        var shareQrcode = new QRCode("shareQrcode"),
237            shareErwei = $('#yaowenList .share  .shareErwei'),
238            shareData,shareTarget;
239    $("#yaowenList .shareIco").click(function(e){
240      clickOK(e);
241    });
242    //第一次数据
243    yaowen(yaowenPage);
244    //加载更多
245    yaowenMore.click(function(){
246      yaowenPage++;
247      yaowen(yaowenPage);
248    });
249    //请求要闻栏目数据根据数据类型生成
250    function yaowen(page){
251      $.ajax({
252        url:'//opa.haiwainet.cn/apis/news',
253        // url:'//test.opa.haiwainet.cn/apis/news',
254        type: "GET",
255        data:{
256          page:page,
257          num:"20",
258          moreinfo:"1",
259          catid:"3541085",
260        },
261        success:function(jsonp){
262          yaowenErrorCount = 0;
263          var getdata=jsonp.result;
264          var y = $(window).scrollTop();
265          //去重后新加载的稿件数
266          var count=0;
267
268          getdata.forEach(function( e , i ) {
269            //是否存在视频
270            var video=e.video && e.body.indexOf("<video")>-1;
271            //图片压缩  多张图不处理缩略图
272            if(e.thumbnail && e.thumbnail!='' && (!e.gallery || e.gallery.length==0)){
273              e.thumbnail=reSrc(e.thumbnail);
274            }
275            //图集目前不显示
276            // if(e.gallery && e.gallery.length>0){
277            //   e.gallery.forEach(function(t,j){
278            //     e.gallery[j]= reSrc(t);
279            //   })
280            // }
281            //减轻元数据
282            if(e.body){
283              delete e.body //true
284            }
285            if(yaowenListOBJ[e.guid]){
286              yaowenListOBJ[e.guid] = e;
287              return;
288            }else{
289              yaowenListOBJ[e.guid] = e;
290              count++
291            }
292            //判断类型,dom实例化
293            switch(true){
294              case (e.video && e.video!='') || video : yaowenMore.before(videoTem(e));
295              break;
296              case e.gallery && e.gallery.length!=0: yaowenMore.before(picsTem(e));
297              break;
298              case e.thumbnail && e.thumbnail!='': yaowenMore.before(onePicTem(e));
299              break;
300              default: yaowenMore.before(noPicTem(e));
301              break;
302            }
303          });
304          if(page>1){
305            //加载数据后,滚动条停在刚才位置
306            window.scrollTo(0, y);
307          }
308          //本次加载到的稿件小于11条,加载下一页
309          if(count<=11){
310            yaowenPage++;
311            yaowen(yaowenPage);
312          }
313        },
314        error:function(e){
315          yaowenErrorCount++;
316          if(yaowenErrorCount <= 4){
317            yaowenPage++;
318            yaowen(yaowenPage);
319          }
320        }
321      })
322    }
323    //other生成
324    function otherTem(data,className){
325      var createEl = function createEl(tagName, props, children) {
326        return new CreateEl(tagName, props, children);
327      };
328      var time=fomatTime(data.pubtime)
329      var vdom=createEl('div', {class: className},[
330        createEl('span',{class: 'fl'}, [data.source?data.source:'']),
331        createEl('span',{class: 'fl'}, [time]),
332        createEl('span',{class: 'fr shareIco',onClick:clickOK}, []),
333        createEl('span',{class: 'fr commentIco'}, []),
334      ])
335      return  vdom;
336    }
337
338    //1图文字
339    function onePicTem(data){
340      var createEl = function createEl(tagName, props, children) {
341        return new CreateEl(tagName, props, children);
342      };
343
344      var vdom = createEl('li', {'class': 'onePic' ,'data-guid':data.guid}, [
345                    createEl('a', {'class':'fl','href':data.link,'target':"_blank"}, [
346                      createEl('img',imgFilter(data.title,data.thumbnail), []),
347                    ]),
348                    createEl('div', {class: 'fr'},[
349                      createEl('h4', [
350                        createEl('a', {'href':data.link,'target':"_blank"}, [data.title]),
351                      ]),
352                    otherTem(data,"other b")
353                    ]),
354
355      ]);
356      return  vdom.render();
357    }
358    //多图
359    function picsTem(data){
360      var createEl = function createEl(tagName, props, children) {
361        return new CreateEl(tagName, props, children);
362      };
363
364      var vdom = createEl('li', {'class': 'pics' ,'data-guid':data.guid}, [
365                    createEl('h4', [
366                        createEl('a', {'href':data.link,'target':"_blank"}, [data.title]),
367                    ]),
368                    createEl('a', {'href':data.link,'target':"_blank"}, [
369                      createEl('img',imgFilter(data.title,data.thumbnail), []),
370                      createEl('i',{'class':'some'}, [data.gallery.length]),
371                    ]),
372                    otherTem(data,"other")
373      ]);
374      return  vdom.render();
375    }
376    //无图
377    function noPicTem(data){
378      var createEl = function createEl(tagName, props, children) {
379        return new CreateEl(tagName, props, children);
380      };
381
382      var vdom = createEl('li', {'class': 'noPic','data-guid':data.guid}, [
383                    createEl('h4', [
384                        createEl('a', {'href':data.link,'target':"_blank"}, [data.title]),
385                    ]),
386                    otherTem(data,"other")
387      ]);
388      return  vdom.render();
389
390    }
391    //视频
392    function videoTem(data){
393      var createEl = function createEl(tagName, props, children) {
394        return new CreateEl(tagName, props, children);
395      };
396
397      var vdom = createEl('li', {'class': 'video','data-guid':data.guid}, [
398                    createEl('a', {'class':'fl','href':data.link,'target':"_blank"}, [
399                      createEl('img',imgFilter(data.title,data.thumbnail), []),
400                      createEl('i',{'class':'playBtn'}, []),
401                    ]),
402                    createEl('div', {class: 'fr'},[
403                      createEl('h4', [
404                        createEl('a', {'href':data.link,'target':"_blank"}, [data.title]),
405                      ]),
406                      otherTem(data,"other b")
407                    ]),
408
409      ]);
410      return  vdom.render();
411
412    }
413
414    //微博分享
415    function shareToWeiBo(data){
416      var title = data.title;
417      var url4 = window.location.href;      //获取当前浏览器路径
418      var icno = data.thumbnail;
419      if (icno == undefined || icno == null){
420          icno = "";
421      }
422      var sharesinastring='https://service.weibo.com/share/share.php?title='+title+'&url='+url4+'&content=utf-8&sourceUrl='+url4+'&pic='+icno;
423      window.open(sharesinastring);
424    }
425    //分享二维码显示
426    $(yaowenShares).find("span:gt(0)").hover(function(){
427      $(yaowenShares).find("span").removeClass('on');
428      $(this).addClass('on');
429      $(shareErwei).slideDown("fast");
430      var q = $(this).index();
431      if(q==1){
432        $("#shareText").html("分享到<br/>微信朋友圈");
433      }else{
434        $("#shareText").html("分享到QQ");
435      }
436    });
437    //分享按钮交互
438    $(yaowenShares).find("span:first-child").hover(function(){
439      $(yaowenShares).find("span").removeClass('on');
440      $(shareErwei).hide();
441    });
442    $(yaowenShares).find("span:first-child").click(function(){
443      $(this).addClass('on');
444      shareToWeiBo(shareData);
445    });
446
447    //分享区失去焦点
448    $(yaowenShares).hover(function(){},function(){
449      sharehide();
450    })
451    //鼠标滚动隐藏所有分享
452    window.onmousewheel = function(){  //触发滚轮事件
453      sharehide();
454    }
455    //隐藏所有分享区
456    function sharehide(){
457      $(yaowenShares).hide();
458      $(shareErwei).hide();
459      $(shareTarget).removeClass('on');
460      $(yaowenShares).find("span").removeClass('on');
461    }
462
463    function clickOK(even){
464      shareTarget=even.target;
465      var top= $(shareTarget).offset().top+23,
466          left= $(shareTarget).offset().left-77;
467
468      var scrollTop= document.documentElement.scrollTop,
469          scrollLeft= document.documentElement.scrollLeft,
470          guid = $(shareTarget).parents("li").attr('data-guid');
471
472      //分享数据
473      shareData= yaowenListOBJ[guid]? yaowenListOBJ[guid] : JSON.parse($(shareTarget).parents("li").attr('data-share'));
474      // shareData=JSON.parse($(shareTarget).parents("li").attr('data-share'));
475      //禁止要闻区滚动
476      $("#yaowenList").on('scroll', function(e){
477        e.preventDefault();
478      });
479      $("body,html").on('scroll', function(e){
480        e.preventDefault();
481        return false;
482      });
483
484      $(shareTarget).addClass('on');
485      $(yaowenShares).fadeIn("fast");
486      $(yaowenShares).css({ "top": top-scrollTop+"px","left": left-scrollLeft+"px" });
487      shareQrcode.clear();
488      shareQrcode.makeCode(shareData.link);
489    }
490
491    //要闻 “返回顶部” 显示与隐藏
492    $("#yaowenList").scroll(function() {
493      throttle(showYaowenGoTop);
494    });
495    function showYaowenGoTop(){
496      if($("#yaowenList").scrollTop()>500){
497        $(yaowenTop).fadeIn();
498      }else{
499        $(yaowenTop).fadeOut();
500      }
501    }
502
503    //要闻 “返回顶部” 定位
504    $(window).scroll(function() {
505      throttle(fixYaowenGoTop);
506    });
507    function fixYaowenGoTop(){
508      if(GetRect($(yaowenBox)[0]).top<-40){
509        $(yaowenTop).css({
510          "top":0,
511          "left":GetRect($(yaowenBox)[0]).left+6+"px"
512        }).addClass("fixed");
513      }else{
514        $(yaowenTop).css({
515          "top":"40px",
516          "left": "6px"
517        }).removeClass("fixed");
518      }
519    }
520  //要闻 “返回顶部” 功能
521  $(yaowenTop).click(function(){
522    yaowenGOTOP();
523  })
524  function yaowenGOTOP(){
525    var acceleration =  0.1;
526    var stime =  5;
527
528    // 滚动距离
529    var y = $("#yaowenList").scrollTop();
530
531    // 滚动距离 = 目前距离 / 速度, 因为距离原来越小, 速度是大于 1 的数, 所以滚动距离会越来越小
532    var speeding = 1 + acceleration;
533    $("#yaowenList")[0].scrollTo(0, Math.floor(y / speeding));
534
535    // 如果距离不为零, 继续调用函数
536    if( y > 0) {
537        t=setTimeout(function(){
538          yaowenGOTOP()
539        }, stime);
540    }else if($(window).scrollTop()>660){
541      window.scrollTo(0, 625);
542    }
543  }
544  //微信分享
545var jsApiListArr=["updateAppMessageShareData", "updateTimelineShareData"];
546var locationHref = window.location.href;
547var httpHead= window.location.protocol;
548$.ajax({
549  type: "get",
550  url:httpHead+'//opa.haiwainet.cn/apis/weixin/signpackage/haiwainet?url='+locationHref,
551  async: false,
552  success: function (msg) {
553    var data = msg['result'];
554    var date =new Date().getTime();
555   
556    wx.config({
557      debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
558      appId: data['appId'], // 必填,公众号的唯一标识
559      timestamp: data['timestamp'], // 必填,生成签名的时间戳
560      nonceStr: data['nonceStr'], // 必填,生成签名的随机串
561      signature: data['signature'], // 必填,签名,见附录1
562      jsApiList: jsApiListArr  // 必填,需要使用的JS接口列表,所有JS接口列表见附录2
563    });
564    shareImgN = httpHead+'//statics.haiwainet.cn/images/logoS20231121.png?t='+date.toString()
565    shareTitle="海外网";
566    shareDesc = '海外网_网上的人民日报海外版_全球华人的网上家园';
567    shareUrl = locationHref;
568    wx.ready(function () {
569      let share_con={
570        title: shareTitle, // 分享标题
571        desc: shareDesc, // 分享描述
572        link: shareUrl, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
573        imgUrl: shareImgN, // 分享图标
574        success: function () {
575            console.log("微信认证通过");
576        },
577      }
578      wx.updateAppMessageShareData(share_con);
579      wx.updateTimelineShareData(share_con);
580    })
581  }
582 });
583
584  /**
585  * 函数节流
586  * method: 函数名
587  * context:参数
588  * **/
589  function throttle(method, context) {
590    clearTimeout(method.tId);
591    method.tId = setTimeout(function () { method.call(context); }, 100);
592  }
593
594  /**
595  * getBoundingClientRect浏览器兼容校准
596  * element: DOm元素
597  * **/
598  function GetRect (element) {
599    var rect = element.getBoundingClientRect();
600
601    var top = document.documentElement.clientTop;
602
603    var left= document.documentElement.clientLeft;
604
605    return{
606        top    :   rect.top - top,   //如果是IE7以下那么 结果为 ‘2 - 2’。 不是为IE的话 结果是 ‘ 0 - 0 ’;  不管哪种方式,结果最终就是0
607        bottom :   rect.bottom - top,
608        left   :   rect.left - left,
609        right  :   rect.right - left
610    }
611  }
612  /**
613  * 读取数据后生成DOM(c)
614  * data:数据对象
615  * domId:需要添加到的元素标签
616  * **/
617  function fomatTime(oldtime){
618  var datatime=parseInt(((new Date()*1)-get_unix_time(oldtime))/1000);
619  var curTime=new Date();
620  if(parseInt(datatime/3600/24)>0){
621      var timeArr=oldtime.split("-");
622      if(curTime.getFullYear()-parseInt(timeArr[0])==0){
623        datatime=timeArr[1]+'-'+timeArr[2];
624      }else{
625        datatime=oldtime;
626      }
627  }else if(parseInt(datatime/3600)>0){
628      datatime=parseInt(datatime/3600)+'小时前';
629  }else if(parseInt(datatime/60)>0){
630      datatime=parseInt(datatime/60)+'分钟前';
631  }else{
632      datatime='刚刚';
633  }
634  return datatime;
635  }
636  /**
637  * 将时间字符串转成时间戳2014-05-08 00:22:11
638  * **/
639  function get_unix_time(dateStr){
640  var newstr = dateStr.replace(/-/g,'/');
641  var date =  new Date(newstr);
642  var time_str = date.getTime().toString();
643  return time_str;
644  }
645});
646
647//图片压缩
648function reSrc(src) {
649  var arrUrl = src.split("//");
650  var start= arrUrl[1].split(".");
651  var re = /\w\/(\S+)\./,
652      re2 =/\.(gif|jpg|jpeg|png|GIF|JPEG|JPG|PNG)/,
653      newstr = src.match(re) ? src.match(re)[1] : null,
654      strType=src.substring(src.lastIndexOf(".")),
655      picC;
656  if(arrUrl.length<2 || start.lenght<3 || strType.search(re2)==-1 ){
657    return  "//statics.haiwainet.cn/images/logo_145_100.jpg"
658  }else if(arrUrl[1].indexOf('haiwainet') == -1 || arrUrl[1].indexOf("mk.haiwainet.cn")>-1){
659      return src
660  }else if(arrUrl[1].indexOf('haikenews') > -1){
661      var newurl="//mk.haiwainet.cn/"+ newstr + strType;
662      return newurl;
663  }else if(strType.indexOf('gif')>-1){
664    return src
665  }
666  picC='q_100,w_188,h_132';
667  if (src.indexOf('uploadfile') == -1) {
668      if(start[0]=="flv4"){
669          var newurl="//mpic";
670          for(var k in start){
671              if(k>0 && k<start.length-1){
672                newurl+="."+start[k];
673              }
674          }
675        return newurl+=","+picC+"."+start[start.length-1];
676      }else{
677          return '//mpic.haiwainet.cn/thumb/d/uploadfile/' + newstr + ',' + picC + strType;
678      }
679  }else {
680      return '//mpic.haiwainet.cn/thumb/d/' + newstr + ',' + picC + strType;
681  }
682};
683//本页url参数获取
684function getQueryString(name) {
685  var url=decodeURI(window.location);
686  var us=url.substring(url.lastIndexOf("?"));
687  var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
688  var r = us.substring(1).match(reg);
689  if (r != null) return unescape(r[2]);
690  return null;
691}
692
693/**
694 * imgUrl:图片地址
695 *所有缩略图片预先处理:
696 *1、站外图片显示规则
697 *
698 * **/
699 function imgFilter(title,imgUrl){
700  //站外图片:请求不发来源信息,显示原来图片
701  var arrUrl = imgUrl.split("//");
702  if(arrUrl[1].indexOf('haiwainet') == -1){
703     return {'alt':title,'src':imgUrl,'referrerpolicy':"no-referrer"}
704  }else{
705      return {'alt':title,'src':imgUrl}
706  }
707}
708
709/**
710 *URL地址转换,如果opa接口洗过就不需要此方法
711 * **/
712 function URLChange(oldLink){
713  var re=/(\d+)/ig,
714      linkSrc=oldLink,
715      num=linkSrc.match(re);
716      if(linkSrc.indexOf("special")==-1 && linkSrc.indexOf("haiwai")!=-1 && linkSrc.indexOf("m.haiwainet.cn")==-1 ){
717              try{
718                   var linkSrc='//m.haiwainet.cn/middle/'+num[2]+'/'+num[0]+'/'+num[1]+'/content_'+num[3]+'_1.html';
719                   }catch (e) {}
720      }
721
722  return linkSrc;
723}
724
725
726window.onload = function(){
727  var left_pinglun=$('.middleBlock .fl.pinglun').height()+200,
728      right_other= $('.middleBlock > .fr').height();
729  var midHigh = left_pinglun > right_other ? left_pinglun : right_other
730   $('.middleBlock > .middle').height(midHigh-265);
731   $('.middleBlock  #yaowenList').height(midHigh-272);
732  // console.log(midHigh);
733};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.