1/** 2 * @description: è·å转载 3 */ 4 5$(function(){ 6 var govlen = szflen = 30; 7 var govnum = szfnum = 4; 8 //è·åå½å¡é¢è½¬è½½ 9 var $govpushinfo = $(".govpushinfo"); 10 if($govpushinfo.attr('data-length')) { 11 govlen = $govpushinfo.attr('data-length'); 12 } 13 if($govpushinfo.attr('data-num')) { 14 govnum = $govpushinfo.attr('data-num'); 15 } 16 $.ajax({ 17 url: "https://www.gov.cn/pushinfo/v150203/pushinfo.jsonp", 18 dataType: "jsonp", 19 jsonp: "pushInfoJsonpCallBack", 20 jsonpCallback: "pushInfoJsonpCallBack", 21 timeout: 30000, 22 success: function(data){ 23 var i = 0, str = ""; 24 $.each(data,function(i,item){ 25 if(i < govnum ){ 26 var title = item.title; 27 if(title.length > govlen){ 28 title = title.substr(0,govlen)+"..."; 29 } 30 str += "<li><span class='date'>" + item.pubDate + "</span><a href='" + item.link + "' title='" + item.title + "' target=_blank>" + title + "</a></li>"; 31 } 32 $govpushinfo.html(str); 33 }); 34 }, 35 error: function(){ 36 $govpushinfo.html("æ£å¨å è½½ä¸..."); 37 } 38 }); 39 40 //è·åçæ¿åºè½¬è½½ 41 var $szfpushinfo = $(".ahpushinfo"); 42 if($szfpushinfo.attr('data-length')) { 43 szflen = $szfpushinfo.attr('data-length'); 44 } 45 if($szfpushinfo.attr('data-num')) { 46 szfnum = $szfpushinfo.attr('data-num'); 47 } 48 $.ajax({
49 url: "https://www.ah.gov.cn/pushinfo/pushinfojson.html", 50 dataType: "jsonp", 51 jsonp: "pushInfoCallBack", 52 jsonpCallback: "pushInfoCallBack", 53 timeout: 30000, 54 success: function(data){ 55 var i = 0, str = ""; 56 $.each(data.data,function(i,item){ 57 if(i < szfnum ){ 58 var title = item.title; 59 if(title.length > szflen){ 60 title = title.substr(0,szflen)+"..."; 61 } 62 str += "<li><span class='date'>" + item.adddate + "</span><a href='" + item.link + "' title='" + item.title + "' target=_blank>" + title + "</a></li>"; 63 } 64 $szfpushinfo.html(str); 65 }); 66 }, 67 error: function(){ 68 $szfpushinfo.html("æ£å¨å è½½ä¸..."); 69 } 70 }); 71});
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.