PageSourceSearch

https://www.penglai.gov.cn/cms_files/default/script/AuthorizedRead/unitbuild.js?v=6.5.0.3

js penglai.gov.cn collected 2026-09-25 04:43:35 UTC 4,459 bytes, 151 lines download raw bytes

1var script = $('#'+authorizedReadUnitId);
2if (script.attr('queryData')) {
3	var cmsUrl = script.attr('url');
4	var scriptId = script.attr('id');
5	var idRandom = 'authorizedRead_' + scriptId;
6//	script.before('<div id="' + idRandom + '"></div>');
7	var queryData = JSON.parse(script.attr('queryData').replace(/'/g, "\""));
8	var bln = false;
9	var value = '';
10	if ((typeof paramsMap) != 'undefined') {
11		for (i = 0; i < paramsMap.length; i++) {
12			if (paramsMap[i].key == queryData.tagId){
13				bln = true;
14				value = paramsMap[i].value;
15			}
16		}
17	}
18	const searchValue = onLoadCustomSearch();
19    let mergedObj = {};
20    if (typeof searchValue === 'object' && Object.keys(searchValue).length === 0) {
21    	mergedObj = value;
22    } else {
23    	mergedObj = searchValue;
24    }
25    if (typeof value === 'object') {
26        for (var prop in searchValue) {
27            if (searchValue.hasOwnProperty(prop)) {
28                mergedObj[prop] = searchValue[prop];
29            }
30        }
31        for (var prop in value) {
32            if (value.hasOwnProperty(prop)) {
33                mergedObj[prop] = value[prop];
34            }
35        }
36    }
37    var paramJson;
38    if (typeof mergedObj === 'object' && Object.keys(mergedObj).length !== 0) {
39        paramJson = {
40            search: JSON.stringify(mergedObj)
41        }
42    } else {
43        paramJson = {}
44    }
45    if (bln) {
46       paramJson['pageNo'] = 99999
47       paramJson['pageSize'] = 99999
48    }
49    if (queryData.unitType && queryData.unitType === 'ajax-xxgk' && getUrlParam('number')){
50    	paramJson['pageNo'] = 1
51    	paramJson['pageSize'] = 5
52    	const search = {}
53    	search['xxgkId'] = getUrlParam('number')
54    	search['className'] = ''
55    	paramJson['search'] = JSON.stringify(search)
56    }
57    if(Object.keys(paramJson).length !== 0){
58        queryData.paramJson = JSON.stringify(paramJson);
59    }
60    getHtml(cmsUrl, queryData, script);
61}
62
63function getHtml(url, queryData, script1) {
64	$.ajax({
65		url: url,
66		type: 'get',
67		data: queryData,
68		success: function(result) {
69//			$('#' + idRandom).html(result.data.html);
70			script1.before(result.data.html);
71			if (getUrlParam('number') && window.loadXxgkAjaxPage){
72				search = {
73					xxgkId:getUrlParam('number'),
74			    	xxgkType:'xxgk_combination',
75			    	className:''
76				}
77				if ($('.label-className').length === 1) {
78                	loadXxgkAjaxPage($('#tree-ajax-combination .xxgkParams').attr('unitid'))
79                }
80			}
81			// 简繁体使用
82			if (isOpenTran()) {
83			    zh_tranBody();
84			}
85		},
86		error: function(error) {
87			// layer.msg('系统错误');
88		}
89	})
90}
91
92/* 获取url中的参数 */
93function getUrlParam(name) {
94	var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
95	var r = window.location.search.substr(1).match(reg); //匹配目标参数
96	if (r != null) return unescape(r[2]); return null; //返回参数值
97}
98
99// 获取cookie中数据
100function getCookie(a) {
101    var b = a + "=";
102    if (document.cookie.length > 0) {
103        offset = document.cookie.indexOf(b);
104        if (offset != -1) {
105            offset += b.length;
106            end = document.cookie.indexOf(";", offset);
107            if (end == -1) {
108                end = document.cookie.length
109            }
110            return unescape(document.cookie.substring(offset, end))
111        } else {
112            return ""
113        }
114    }
115}
116// 判断是否开启简繁体
117function isOpenTran() {
118  if (typeof String.prototype.tran === 'function') {
119	  var a = $("meta[name=WebId]").attr('content');
120	  var choose = getCookie("zh_choose_" + a)
121	  if (choose && choose !== 'n') {
122		  return true;
123	  }
124  }
125  return false;
126}
127// 处理定制查询参数
128function onLoadCustomSearch() {
129  let searchValue = {};
130  try {
131    var searchId = getQueryString('searchVal');
132    if (searchId && localStorage.getItem(searchId + '_ls')) {
133      sessionStorage.setItem('ss_SearchValue', localStorage.getItem(searchId + '_ls'));
134    }
135    if (sessionStorage.getItem('ss_SearchValue')) {
136  	    window.ss_SearchValue = JSON.parse(sessionStorage.getItem('ss_SearchValue'))
137  	    searchValue = window.ss_SearchValue.searchVal;
138    }
139  } catch (error) {}
140  return searchValue;
141}
142
143// 获取url中参数
144function getQueryString(name) {
145  var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i')
146  var r = window.location.search.substr(1).match(reg)
147  if (r != null) {
148    return decodeURIComponent(r[2])
149  }
150  return null
151}

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.