1var params = { bgcolor: '#FFF', allowFullScreen: true, allowScriptAccess: 'always', wmode: 'transparent' }; 2 3// ===== API ç¼åå·¥å ·ï¼localStorageï¼é»è®¤5åéï¼===== 4var ApiCache = { 5 prefix: 'ag_cache_', 6 // è·åç¼å 7 get: function(key) { 8 try { 9 var data = localStorage.getItem(this.prefix + key); 10 if (!data) return null; 11 var obj = JSON.parse(data); 12 if (Date.now() > obj.expire) { 13 localStorage.removeItem(this.prefix + key); 14 return null; 15 } 16 return obj.data; 17 } catch(e) { 18 return null; 19 } 20 }, 21 // 设置ç¼åï¼duration åä½ç§ 22 set: function(key, data, duration) { 23 try { 24 var obj = { 25 data: data, 26 expire: Date.now() + (duration || 300) * 1000 27 }; 28 localStorage.setItem(this.prefix + key, JSON.stringify(obj)); 29 } catch(e) {} 30 }, 31 // 带ç¼åç POST è¯·æ± 32 post: function(url, postData, duration, callback) { 33 var key = url + '_' + JSON.stringify(postData); 34 var cached = this.get(key); 35 if (cached) { 36 callback(cached); 37 return; 38 } 39 var self = this; 40 $.ajax({
41 type: "POST", 42 url: url, 43 data: JSON.stringify(postData), 44 dataType: 'json', 45 success: function(res) { 46 self.set(key, res, duration); 47 callback(res); 48 } 49 }); 50 } 51}; 52 53function closelights() {//å ³ç¯ 54 alert(' æ¬æ¼ç¤ºä¸æ¯æå¼å ³ç¯'); 55} 56function openlights() {//å¼ç¯ 57 alert(' æ¬æ¼ç¤ºä¸æ¯æå¼å ³ç¯'); 58} 59$(function () { 60 // firstpage æ¥å£ç¼å 10 åé 61 ApiCache.post("/api/Portal/GetInfoPage", { "posttype": "firstpage" }, 6000, function (res) { 62 document.title = res.webset.title 63 var keywords = document.createElement('meta'); 64 keywords.content = res.webset.keyword; 65 keywords.name = 'keywords'; 66 document.getElementsByTagName('head')[0].appendChild(keywords); 67 var description = document.createElement('meta'); 68 description.content = res.webset.discription; 69 description.name = 'description'; 70 document.getElementsByTagName('head')[0].appendChild(description); 71 //$('#videoC').attr("src", res.webset.c4) 72 //$('#footS').html(res.webset.Foot) 73 if (document.getElementById('axxxx1')) { 74 //var flashvars = { 75 // f: res.webset.c4, 76 // c: 0, 77 // p: 1, 78 // b: 1 79 //}; 80 //CKobject.embedSWF('/ckplayer/ckplayer.swf', 'axxxx1', 'ckplayer_axxxx1', '340', '230', flashvars, params); 81 var videoObject = { 82 container: '#axxxx1', //â#â代表容å¨çIDï¼â.âæââ代表容å¨çclass 83 variable: 'player', //ææ¾å½æ°åç§°ï¼è¯¥å±æ§å¿ é设置ï¼å¼çäºä¸é¢çnew ckplayer()ç对象 84 video: res.webset.c4//è§é¢å°å 85 }; 86 var player = new ckplayer(videoObject);//åå§åææ¾å¨ 87 player.changeControlBarShow(false); 88 } 89 }); 90 $('.imgs').eq(0).css({ "opacity": 1 }); 91$('.center-img').show(); 92 var _index = 0 93 setInterval(function () { 94 //if (_index == $('.imgs').length-1) { 95 // $('.center-img').hide() 96 //} else { 97 $('.center-img').show() 98 //} 99 $('.imgs').eq(_index).animate({ opacity: 0 }, 1000); 100 _index++ 101 if (_index >= $('.imgs').length) { 102 _index = 0 103 }; 104 $('.imgs').eq(_index).animate({ opacity: 1 }, 1000); 105 },5000); 106 $('.menu-ul li').hover(function () { 107 $(this).children('ul').show() 108 }, function () { 109 $(this).children('ul').hide() 110 }) 111 $('.tab-item').hover(function () { 112 var _item = $(this).parent().next().children('.tab-box'); 113 if($(this).attr('data-lmid')==12) 114 $(this).parent().find('.ywan').attr('href', 'http://www.gov.cn/pushinfo/v150203/index.htm') 115 else 116 $(this).parent().find('.ywan').attr('href', 'list.html?lmid=' + $(this).attr('data-lmid')) 117 if(_item.length<2)return; 118 $('.tab-item').removeClass('thover') 119 $(this).addClass('thover'); 120 _item.hide(); 121 _item.eq($(this).index()).show(); 122 }) 123 $('.list-tab-title').hover(function () { 124 $('.list-tab-title').removeClass('lt-hover') 125 $(this).addClass('lt-hover'); 126 $('.list-tab-content').hide(); 127 $(this).next().show(); 128 }) 129 $(window).resize(function (e) { 130 resizeFn() 131 }) 132 $(window).scroll(function () { 133 scrollFn() 134 }) 135 resizeFn() 136 137 ////ç¦æ¢F12 138 //$("*").keydown(function (e) {//夿æé® 139 // e = window.event || e || e.which; 140 // if (e.keyCode == 123) { 141 // e.keyCode = 0; 142 // return false; 143 // } 144 //}); 145 ////ç¦æ¢å®¡æ¥å ç´ 146 //$(document).bind("contextmenu", function (e) { 147 // return false; 148 //}); 149 $('.txt').removeClass('mhover') 150 var _lmid = getQueryString('lmid') 151 var _nid = getQueryString('nid') 152 var _zt=getQueryString('zt') 153 console.log(_lmid, _nid, _zt) 154 if (_lmid == 0) { 155 $('#shouye').addClass('mhover') 156 }else if (_lmid == 11 || _lmid == 14 || _lmid == 15) { 157 $('#anguoxinwen').addClass('mhover') 158 }else if (_nid == 1 || _nid == 2 || _nid == 6 || _nid == 7 || _nid == 8 || _nid == 9 || _nid == 10||_lmid==2||_lmid==7) { 159 $('#yaoduanguo').addClass('mhover') 160 } else if (_lmid == 19 || _lmid == 75) { 161 $('#zhengwugongkai').addClass('mhover') 162 } else if (_lmid == 'ly'||_lmid==59||_lmid==61||_lmid=='sz') { 163 $('#hudongjiaoliu').addClass('mhover') 164 } else if (_lmid == 68 || _nid == 82 || _lmid == 'zt'|| _zt=='zt') { 165 $('#redianzhuanti').addClass('mhover') 166 } else { 167 $('#shouye').addClass('mhover') 168 } 169 $('#searchBtn').click(function () { 170 if ($('#searchVal').val() != '') { 171 window.location.href = "search_list.html?key=" + encodeURI($('#searchVal').val()) 172 } 173 }) 174}) 175function IEVersion() { 176 var userAgent = navigator.userAgent; //å徿µè§å¨çuserAgentå符串 177 var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1; //夿æ¯å¦IE<11æµè§å¨ 178 var isEdge = userAgent.indexOf("Edge") > -1 && !isIE; //夿æ¯å¦IEçEdgeæµè§å¨ 179 var isIE11 = userAgent.indexOf('Trident') > -1 && userAgent.indexOf("rv:11.0") > -1; 180 if (isIE) { 181 var reIE = new RegExp("MSIE (\\d+\\.\\d+);"); 182 reIE.test(userAgent); 183 var fIEVersion = parseFloat(RegExp["$1"]); 184 if (fIEVersion == 7) { 185 return 7; 186 } else if (fIEVersion == 8) { 187 return 8; 188 } else if (fIEVersion == 9) { 189 return 9; 190 } else if (fIEVersion == 10) { 191 return 10; 192 } else { 193 return 6;//IEçæ¬<=7 194 } 195 } 196} 197 198if (IEVersion() < 9) { 199 alert('对ä¸èµ·ï¼æ¨çæµè§å¨çæ¬è¿ä½ï¼è¯·å åçº§åæµè§!') 200 window.close() 201} 202function openPage() { 203 window.open('msgPage.html', 'newwindow', 'height=650, width=550, toolbar =no, menubar=no, scrollbars=no, resizable=no, location=no, status=no') 204} 205function resizeFn() { 206 if (window.innerWidth <= 1366) { 207 $('.float-code').css({ 'width': '70px' }) 208 $('.float-code').hover(function () { 209 $(this).animate({ 'width': '135px' }, 300) 210 }, function () { 211 $(this).animate({ 'width': '70px' }, 300) 212 }) 213 } else { 214 $('.float-code').off() 215 $('.float-code').css({ 'width': '90px' }) 216 } 217 218} 219function scrollFn() { 220 if ($(window).scrollTop() >= 420) { 221 $('.float-code').css({ 'top': '150px' }) 222 $('.float-weibo').css({ 'top': '150px' }) 223 } else { 224 $('.float-code').css({ 'top': '420px' }) 225 $('.float-weibo').css({ 'top': '420px' }) 226 227 } 228} 229//ç¹å»å¾æ 230function Link() { 231 //è·å该ç«ç¹éè¦çº é页é¢çurlå°å 232 var url = getCurrUrl(); 233 //跳转è³çº éç³»ç»å¡«åé¡µé¢ 234 window.open("http://121.43.68.40/exposure/jiucuo.html?site_code=1306830001&url=" + encodeURIComponent(url)); 235} 236//è·å该ç«ç¹éè¦çº é页é¢çurlå°å 237function getCurrUrl() { 238 var url = ""; 239 if (parent !== window) { 240 try { 241 url = window.top.location.href; 242 } catch (e) { 243 url = window.top.document.referrer; 244 } 245 } 246 if (url.length == 0) 247 url = document.location.href; 248 249 return url; 250} 251function AddFavorite(sURL, sTitle) 252{ 253 try 254 { 255 window.external.addFavorite(sURL, sTitle); 256 } 257 catch (e) 258 { 259 try 260 {
261 window.sidebar.addPanel(sTitle, sURL, ""); 262 } 263 catch (e) 264 { 265 alert("å å ¥æ¶è失败ï¼è¯·ä½¿ç¨Ctrl+Dè¿è¡æ·»å "); 266 } 267 } 268} 269function getQueryString(name) { 270 var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i'); 271 var r = window.location.search.substr(1).match(reg); 272 if (r != null) { 273 return unescape(r[2]); 274 } 275 return null; 276}
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.