PageSourceSearch

https://huma.gov.cn/huma/xhtml/static/2023/js/index.js

js huma.gov.cn collected 2026-10-03 17:43:39 UTC 9,793 bytes, 280 lines download raw bytes

1var bnrSwiper = new Swiper(".swiper", {
2    autoplay:true,
3    loop:true,
4    pagination: {
5        el: ".swiper-pagination",
6        clickable: true,
7    },
8});
9var showNum = 4;
10var screenWidth = $(window).width();
11if(screenWidth <= 992 && screenWidth >425){
12    showNum = 2;
13}else if(screenWidth <= 425){
14    showNum = 1;
15}
16var ztswiper = new Swiper(".ztswiper", {
17    slidesPerView: showNum,
18    spaceBetween: 30,
19    autoplay:true,
20loop:true,
21    navigation: {
22      nextEl: ".swiper-button-next",
23      prevEl: ".swiper-button-prev",
24    }
25});
26var jcdtswiper = new Swiper(".jcdtbox .dtlist", {
27        slidesPerView: 2,
28        slidesPerColumn: 2,
29        navigation: {
30		  nextEl: ".jcdtbox .dtlist .swiper-button-next",
31		  prevEl: ".swiper-button-prev",
32		}
33      });
34
35tab('hover','.news .comtop span','.news .commore a','.news .comlist ul')
36tab('hover','.zfwj .comtop span','.zfwj .commore a','.zfwj .comlist ul')
37tab('hover','.myzj .comtop span','.myzj .commore a','.myzj .zjdc > div')
38tab('hover','.bsfw .comtop span','.bsfw .fwtab ul')
39tab('hover','.jcdtbox > div')
40
41/*国务院要闻*/
42  $.ajax({
43	url: "https://www.gov.cn/pushinfo/v150203/pushinfo.jsonp",
44	dataType: "jsonp",
45	scriptCharset: "UTF-8",
46	jsonp: 'pushInfoJsonpCallBack',
47	jsonpCallback: 'pushInfoJsonpCallBack',
48	timeout:2000,
49	success: function success(data) {
50	  var html = '';
51	  $.each(data, function (i, json) {
52		if (i >= 7) {
53		  return false;
54		}
55		var $seq = i + 1;
56		//var title = json.title.length > 300 ? json.title.substring(0, 300) + "..." : json.title;
57		html += '<li class="li'+$seq+'"><a href="' + json.link + '" title="' + json.title + '" target="_blank">' + json.title + '</a><span class="time">' + json.pubDate.substring(5,10) + '</span></li>';
58	  });
59	  $("#pubInfo").html(html);
60	},
61	error: function error() {
62	  $("#pubInfo").append('<li class="nodata">对不起,该数据只能在外网获取或暂时显示不出数据</li>');
63	}
64  });
65
66
67var deptId = '517953fd90754abfa3effc1bab62071e';
68var sourceId = '4004';
69var siteId = '526fbc2a8c9c4c5286f36fae14b6d912';
70//信箱数据
71  getMailList('.maillist','4004')
72  function getMailList(databox,sourceId){
73    sourceId = sourceId || '';
74    var data = {
75        pageNum: 1,
76        pageSize: 5,
77        sortMap: {
78          fromTime: "desc",
79        },
80        params: {
81           //deptId: deptId,
82          siteId: siteId,
83          //sourceId: sourceId,
84        }
85    }
86    const { sign, timestamp } = getKeyVal(data)
87    $.ajax({
88        url: '/communication/api-mailbox/frontMail/mailList',
89        type: "POST",
90        data: JSON.stringify(Object.assign(data, { sign, timestamp })),
91        dataType: "json",
92        contentType: "application/json",
93        success: function (res) {
94          var rows = res.data.rows;
95          if (rows.length > 0) {
96            var html = "";
97            var blqk = "";
98            for (var i = 0; i < rows.length; i++) {
99              // 来信人姓名和谐
100              // var name = rows[i].fromName;
101              if (rows[i].mailInfoStatus == '1002') {
102                blqk = "已办结";
103              } else {
104                blqk = "未办结";
105              }
106              html += '<li>\
107                        <a href="/hd/hd_xjxq?site=huma&siteCode=2327210002&url=/huma/c100644/mail_xjxq.shtml&id=' + rows[i].id + '" target="_blank">' + rows[i].title + '</a>\
108												<span class="time">'+rows[i].createTime.substring(0,10)+'</span>\
109                        </li>'
110            }
111            $(databox).html(html);
112          }
113        },
114        error: function (err) {
115          console.log(err);
116        }
117      })
118  }
119
120// 互动-调查列表
121dcList(1,1)
122var ylDetail ='/huma/c100654/hd_dc_result.shtml';
123var ylWydc="/huma/c100654/hd_dc_wydc.shtml";
124function dcList(pageNum, pageSize) {
125    var data = {
126        "pageNum": pageNum,
127        "pageSize": pageSize,
128        "sortMap": {
129            "startTime": "desc"
130        },
131        "params": {
132            "deptId": deptId,
133            "siteNo": "",
134            "siteUrl": ""
135        }
136    }
137    const { sign, timestamp } = getKeyVal(data)
138    $.ajax({
139        url: "/communication/api-question/frontquestionPaper/pageList",
140        type: "POST",
141        data: JSON.stringify(Object.assign(data, { sign, timestamp })),
142        dataType: "json",
143        contentType: "application/json",
144        success: function (res) {
145            if (res.status == "success" && res.data.rows.length > 0) {
146                var html = "",
147                    rows = res.data.rows,
148                    state = "",
149                    state2 = "",
150                    url = ""; //0-非外链征集  1-外链征集;
151                for (var i = 0; i < rows.length; i++) {
152                    // 征集状态
153                    if (rows[i].isSurvey == "1") {
154                        state = '<span class="status">结束调查</span>';
155
156                        if (rows[i].collectType == 0) {
157                            url = ylWydc + '?id=' + rows[i].id;
158                        } else if (rows[i].collectType == 1) {
159                            url = rows[i].outJoin;
160                        }
161                        state2 = '<div class="btn"><a href="' + url + '" target="_blank">调查结果</a></div>';
162                    } else if (rows[i].isSurvey == "2") {
163                        state = '<span class="status on">正在调查</span>';
164                        if (rows[i].collectType == 0) {
165                            url = ylWydc + '?id=' + rows[i].id;
166                        } else if (rows[i].collectType == 1) {
167                            url = rows[i].outJoin;
168                        }
169                        state2 = '<div class="btn"><a href="' + url + '" target="_blank">我要参与</a></div>';
170                    }
171                    //html+='<h3><a href="" target="_blank">' + rows[i].title + '</a></h3>'
172                    html += '<h3><a href="' + url + '" target="_blank">' + rows[i].title + '</a></h3>\
173                               <p>
173' + state + '<span class="time">调查时间:' + rows[i].startTime + '~' + rows[i].endTime + '</span></p>'
174                }
175                $(".zxdclist").html(html);
176                //ejscreatePageHTML("page-div", res.data.pageTotal, res.data.pageNum, res.data.pageSize, res.data.total, callback);
177            }
178        },
179        error: function (err) {
180            console.log(err);
181        }
182    })
183}
184//征集列表
185var zjDetail = '/hd/yjzj_result?site=huma&siteCode=2327210002&url=/huma/c100653/hd_zj_result.shtml&id=';
186var wyzj = '/hd/yjzj_details?site=huma&siteCode=2327210002&url=/huma/c100653/hd_zj_wyzj.shtml&id=';
187zjList('.myzjlist');
188function zjList(databox) {
189  var data = {
190      "pageNum": 1,
191      "pageSize": 1,
192      "sortMap": {
193          "startTime": "desc"
194      },
195      "params": {
196          "deptId": deptId,
197          "siteNo": "",
198          "siteUrl": ""
199      }
200  }
201  const { sign, timestamp } = getKeyVal(data)
202  $.ajax({
203      url: '/communication/api-collect/frontArticle/pageList',
204      type: "POST",
205      data: JSON.stringify(Object.assign(data, { sign, timestamp })),
206      dataType: "json",
207      contentType: "application/json",
208      success: function (res) {
209          if (res.status == "success" && res.data.rows.length > 0) {
210              var html = "",
211                  rows = res.data.rows,
212                  state = "",
213                  state2 = "",
214                  url = ""; //0-非外链征集  1-外链征集
215              ;
216              for (var i = 0; i < rows.length; i++) {
217                  // 征集状态
218                  if (rows[i].isSurvey == "1") {
219                      state = '<span class="status">已截止</span>';
220                      if (rows[i].collectType == 0) {
221                          url = zjDetail  + rows[i].id;
222                      } else if (rows[i].collectType == 1) {
223                          url = rows[i].outJoin;
224                      }
225                      state2 = '<div class="btn"><a href="' + url + '" target="_blank">征集结果</a></div>';
226                  } else if (rows[i].isSurvey == "2") {
227                      state = '<span class="status on">进行中</span>';
228                      if (rows[i].collectType == 0) {
229                          url = wyzj  + rows[i].id;
230                      } else if (rows[i].collectType == 1) {
231                          url = rows[i].outJoin;
232                      }
233                  }
234                  html += '<h3><a href="' + url + '" target="_blank">' + rows[i].title + '</a></h3>\
235                           <p>'+state +'<span class="time">征集时间:'+rows[i].startTime.substring(0,10)+'~' + rows[i].endTime.substring(0,10) + '</span></p>';
236              }
237              $(databox).html(html);
238          }
239      },
240      error: function (err) {
241          console.log(err)
242      }
243  })
244}
245$(function(){
246var date=new Date();
247var month=date.getMonth()+1;
248$('.fwyl_month .fwyl_dqyf').text(month);
249$('.yl_list li').each(function(){
250var yf=$(this).find('a').text().substring(0,($(this).find('a').text().length)-1);
251if(yf==month){
252$(this).addClass('active');
253}
254})
255
256//来信统计
257 $.ajax({
258      url: '/communication/api-mailbox/frontMail/selectMYDStatistic?siteId='+siteId,
259      type: "get",
260      success: function (res) {
261            if (res.status == "success"){
262                  $('.ldxx p').html('来信总数:<span>'+res.data.a1+'</span>      本年来信:<span>'+res.data.y1+'</span>');
263            }
264      }
265})
266})
267$(function(){
268 if(!$('.rightpc img').hasClass('img')){
269    $('.rightpc').hide();
270  }
271  if(!$('.leftpc img').hasClass('img')){
272    $('.leftpc').hide();
273  }
274  $('.rightpc .close').click(function(){
275    $('.rightpc').hide();
276  })
277  $('.leftpc .close').click(function(){
278    $('.leftpc').hide();
279  })
280})

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.