PageSourceSearch

https://www.cbhbwm.com.cn/eportal/search/js/search/articleEsView.js

js cbhbwm.com.cn collected 2026-10-08 19:08:48 UTC 9,260 bytes, 276 lines download raw bytes

1// function queryByCategoryList(pageId, type, ifSenior) {
2//     // var url = "/eportal/ui?pageId=" + $("#channelId").val();
3//     var url = "/eportal/ui?pageId=" + $("#resultPageId").val();
4//     var pageNo = $("#changePageNo").val();
5//     var totalPage = $("#totalPage").val();
6//     pageNo = parseInt(pageNo);
7//     if ("queryHeader" == type) {
8//         pageNo = 1;
9//     }
10//     if ("pageClassify" == type) {
11//         pageNo = 1;
12//     }
13//     if ("pre" == type) {
14//         if (pageNo > 1) {
15//             if (pageNo == 1) {
16//                 alert("已经是第一页!");
17//                 return;
18//             }
19//             pageNo = pageNo - 1;
20//         }
21//     }
22//     if ("next" == type) {
23//         pageNo = pageNo + 1;
24//     }
25//     if ("jump" == type) {
26//     }
27//     if ("first" == type) {
28//         pageNo = 1;
29//     }
30//     if ("last" == totalPage) {
31//         if (pageNo == 1) {
32//             alert("已经是最后一页!");
33//             return;
34//         }
35//         pageNo = $page.pages;
36//     }
37//     // if ("" == type) {
38//     //     pageNo = 1;
39//     // }
40//     //$("input[name='getDataType']").val("search");
41//     $("#changePageNo").val(pageNo);
42//
43//     //高级搜索
44//     if (ifSenior == '1') {
45//         $("input[name='ifSenior']").val("1");
46//         url = url + "&senior=1";
47//         if ($("#allWords").val() != '') {
48//             url = url + "&allWords=" + $("#allWords").val();
49//         }
50//         if ($("#wholeWord").val() != '') {
51//             url = url + "&wholeWord=" + $("#wholeWord").val();
52//         }
53//         if ($("#neitherWord").val() != '') {
54//             url = url + "&neitherWord=" + $("#neitherWord").val();
55//         }
56//         if ($("#outWords").val() != '') {
57//             url = url + "&outWords=" + $("#outWords").val();
58//         }
59//         let time = $("input[name='time']:checked").val();
60//         if (time == 'custom') {
61//             url = url + "&time=" + time + "&startTime=" + $("#startTime").val() + "&endTime=" + $("#startTime").val();
62//         } else {
63//             url = url + "&time=" + time;
64//         }
65//         let file = $("input[name='file']:checked").val();
66//         console.log("file:" + file);
67//         url = url + "&file=" + file;
68//
69//         url = url + "&orderBy=" + $("input[name='orderBy']:checked").val();
70//         let searchAreaArr = $("input[name='searchArea']:checked");
71//         let searchArea = '';
72//         searchAreaArr.each(function () {
73//             searchArea += $(this).val() + ",";
74//         })
75//         console.log("searchArea:" + searchArea);
76//         if (searchArea === ''){
77//             alert("请选择搜索位置");
78//             return;
79//         }
80//         searchArea = searchArea.substring(0, searchArea.length - 1);
81//         url = url + "&searchArea=" + searchArea;
82//
83//     } else {
84//         $("input[name='ifSenior']").val("0");
85//         url = url + "&senior=0";
86//         if ($("#keyWords").val() != '') {
87//             url = url + "&keyWords=" + $("#keyWords").val();
88//         }
89//         if ($("#siteId").val() != '') {
90//             url = url + "&siteId=" + $("#siteId").val();
91//         }
92//     }
93//     if ($("#changePageNo").val() != '' && $("#changePageNo").val() != undefined) {
94//         url = url + "&pageNum=" + $("#changePageNo").val();
95//     } else {
96//         url = url + "&pageNum=1"
97//     }
98//
99//     if ($("#dataType").val() != '') {
100//         url = url + "&dataType=" + $("#dataType").val();
101//     }
102//     if (pageId != '') {
103//         url = url + "&cpId=" + pageId;
104//     }
105//
106//     window.location.href = url;
107//     // window.open(url);
108// }
109
110// function query(pageId, type, ifSenior) {
111//     var pageNo = $("#changePageNo").val();
112//     var totalPage = $("#totalPage").val();
113//     pageNo = parseInt(pageNo);
114//     if ("queryHeader" == type) {
115//         pageNo = 1;
116//     }
117//     if ("pageClassify" == type) {
118//         pageNo = 1;
119//     }
120//     if ("pre" == type) {
121//         if (pageNo > 1) {
122//             if (pageNo == 1) {
123//                 alert("已经是第一页!");
124//                 return;
125//             }
126//             pageNo = pageNo - 1;
127//         }
128//     }
129//     if ("next" == type) {
130//         pageNo = pageNo + 1;
131//     }
132//     if ("jump" == type) {
133//     }
134//     if ("first" == type) {
135//         pageNo = 1;
136//     }
137//     if ("last" == totalPage) {
138//         if (pageNo == 1) {
139//             alert("已经是最后一页!");
140//             return;
141//         }
142//         pageNo = $page.pages;
143//     }
144//     $("#changePageNo").val(pageNo);
145//
146//     let params = new Map();
147//
148//         //高级搜索
149//     if (ifSenior == '1') {
150//         $("input[name='ifSenior']").val("1");
151//         params.set("senior", "1");
152//         if ($("#allWords").val() != '') {
153//             params.set("allWords", $("#allWords").val());
154//         }
155//         if ($("#wholeWord").val() != '') {
156//             params.set("wholeWord", $("#wholeWord").val());
157//         }
158//         if ($("#neitherWord").val() != '') {
159//             params.set("neitherWord", $("#neitherWord").val());
160//         }
161//         if ($("#outWords").val() != '') {
162//             params.set("outWords", $("#outWords").val());
163//         }
164//         let time = $("input[name='time']:checked").val();
165//         params.set("time", time);
166//         if (time == 'custom') {
167//             params.set("startTime", $("#startTime").val());
168//             params.set("endTime", $("#endTime").val());
169//         }
170//         let file = $("input[name='file']:checked").val();
171//         params.set("file", file);
172//
173//         params.set("orderBy", $("input[name='orderBy']:checked").val());
174//         let searchAreaArr = $("input[name='searchArea']:checked");
175//         let searchArea = '';
176//         searchAreaArr.each(function () {
177//             searchArea += $(this).val() + ",";
178//         })
179//         if (searchArea === ''){
180//             alert("请选择搜索位置");
181//             return;
182//         }
183//         searchArea = searchArea.substring(0, searchArea.length - 1);
184//         params.set("searchArea", searchArea);
185//
186//     } else {
187//         $("input[name='ifSenior']").val("0");
188//         params.set("senior", "0");
189//         if ($("#keyWords").val() != '') {
190//             params.set("keyWords", $("#keyWords").val());
191//         }
192//         if ($("#siteId").val() != '') {
193//             params.set("siteId", $("#siteId").val());
194//         }
195//     }
196//     if ($("#changePageNo").val() != '' && $("#changePageNo").val() != undefined) {
197//         params.set("pageNum", $("#changePageNo").val());
198//     } else {
199//         params.set("pageNum", "1");
200//     }
201//
202//     if ($("#dataType").val() != '') {
203//         params.set("dataType", $("#dataType").val());
204//     }
205//     if (pageId != '') {
206//         params.set("cpId", pageId);
207//     }
208//
209//     console.log(params);
210//     debugger;
211//
212//     var url = "/eportal/ui?pageId=" + $("#resultPageId").val();
213//     var temp = document.createElement("form");
214//     temp.action = url;
215//     temp.method = "post";
216//     temp.style.display = "none";
217//
218//     params.forEach(function (value, key) {
219//         let opt = document.createElement("input");
220//         opt.name = key;
221//         opt.value = value;
222//         temp.appendChild(opt);
223//     });
224//     document.body.appendChild(temp);
225//     temp.submit();
226// }
227
228function queryCollapse(articleId, pageNum) {
229    let moduleId = $("#moduleId").val();
230    let url = "/eportal/ui?moduleId="+moduleId+"&portal.url=/portlet/articleEsPortlet/getCollapseData";
231    let keywords = $("#keyWords").val();
232    let indexType = $("#indexType").val();
233    let foldList = [];
234    $.ajax({
235        url: url,
236        type: "post",
237        async: false,
238        dataType: "json",
239        data: {
240            "articleId": articleId,
241            "pageNum": pageNum,
242            "keyWords": keywords,
243            "indexType": indexType
244        },
245        success: function (data) {
246            foldList = data.list;
247        }
248    });
249    return foldList;
250}
251
252function handleFileUpload(event) {
253    // var event = window.event||e
254    let file = event.target.files[0];
255    const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png';
256    if (!isJpgOrPng) {
257        $("#errorMsg").html('请上传JPG或者PNG格式的图片');
258        return false;
259    }
260    const isLt5M = file.size / 1024 / 1024 < 5;
261    if (!isLt5M) {
262        $("#errorMsg").html('图片大小限制5M');
263        return false;
264    }
265
266    let reader = new FileReader();
267    reader.readAsDataURL(file);
268    reader.onload = function (ev) {
269        // 图片base64化
270        let base64Str = ev.target.result; // 转化后的base64字符串
271        console.log(base64Str);
272        $("#imgFileBase64").val(base64Str);
273        $("#imgUploadType").val("1");
274        $('.search-icon').click();
275    };
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.