PageSourceSearch

https://img.wowtv.co.kr/PcScript/NewsCenter/News/NewsList.js?_v=20260324

js wowtv.co.kr collected 2026-09-24 09:00:22 UTC 19,042 bytes, 485 lines download raw bytes

1
2var NewsSearchList = {
3
4    /**
5     * @description 뉴스 리스트 
6     */
7    NewsList: function (currentIndex) {
8        return;
9        if (typeof currentIndex == "undefined") {
10            currentIndex = $("#currentIndex").val();
11        }
12        else {
13            $("#currentIndex").val(currentIndex);
14        }
15
16        var startIndex = currentIndex;
17        var endIndex = parseInt(currentIndex) + (parseInt($("#PageSize").val()) - 1);
18        var searchSection = $("#SearchSection").val();
19        var searchComp = $("#SearchComp").val();
20        var searchStartDate = $("#StartDate").val();
21        var searchEndDate = $("#EndDate").val();
22        var searchWowCode = $("#SearchWowCode").val();
23
24        //검색 기간
25        if (searchStartDate == "") {
26            searchStartDate = SetAddYear(new Date().format("yyyy-MM-dd"), -1).replace(/-/g, '');
27            searchEndDate = SetAddDay(new Date().format("yyyy-MM-dd"), 1).replace(/-/g, '');
28        }
29        else {
30            searchEndDate = searchStartDate.replace(/-/g, '') + "235959";
31            searchStartDate = searchStartDate.replace(/-/g, '') + "000000";
32        }
33
34        /* 최신뉴스(연예 코드 제외 / 신규 WOWCODE 추가 시 관리 필요) */
35        var queryWowcode = "'W001'; 'W004'; 'W005'; 'W007'; 'W008'; 'W009'; 'W010'; 'W012'; 'W015'; 'W019'; 'W024'; 'W025'; 'W026'; 'W027'; 'W033'; 'W034'; 'W035'; 'W036'; 'W040'; 'W041'; 'W050'; 'W051'; 'W052'; 'W053'; 'W054'; 'W060'; 'W061'; 'W064'; 'W065'; 'W066'; 'W067'; 'W070'; 'W071'; 'W072'; 'W073'; 'W074'; 'W075'; 'W076'; 'W077'; 'W078'; 'W079'; 'W080'; 'W081'; W082'; 'W083'; 'W084'; 'W085'; 'W086'; 'W087'; 'W088'; 'W089'; 'W090'; 'W091'; 'W092'; 'W093' ";
36
37        //와우코드 있을경우
38        if (searchWowCode.length > 0) {
39
40            queryWowcode = String.format("'{0}'", searchWowCode);
41        }
42        //증권
43        else if (searchSection == "stock") {
44            queryWowcode = "'W001'; W002'; W034'; 'W035'; 'W035'; 'W001'; 'W070'; 'W072'; 'W073'; 'W074'; 'W075' ";
45        }
46        //가상화폐
47        else if (searchSection == "virtualcurrency") {
48            queryWowcode = "'W071'";
49        }
50        //경제
51        else if (searchSection == "economy") {
52            queryWowcode = "'W005'; 'W076'; 'W077'; 'W078'; 'W079'; 'W080'; 'W081'";
53        }
54        //금융
55        else if (searchSection == "finance") {
56            queryWowcode = "'W082'; 'W083'; 'W084'; 'W085'";
57        }
58        //산업.IT
59        else if (searchSection == "init") {
60            queryWowcode = "'W004'; 'W007'; 'W086'; 'W087'; 'W088'; 'W089'; 'W090' ";
61        }
62        // 국제
63        else if (searchSection == "international") {
64            queryWowcode = "'W008'; 'W033'";
65        }
66        //정치
67        else if (searchSection == "politics") {
68            queryWowcode = "'W041'";
69        }
70        //사회
71        else if (searchSection == "society") {
72            queryWowcode = "'W019'";
73        }
74        //생활문화
75        else if (searchSection == "life") {
76            queryWowcode = "'W005'; 'W009'; 'W036'; 'W015'";
77        }
78        //부동산
79        else if (searchSection == "land") {
80            queryWowcode = "'W010'; 'W025'; 'W067';'W091'; 'W092'; 'W093'";
81        }
82        //취업
83        else if (searchSection == "job") {
84            queryWowcode = "'W050'; 'W051'; 'W052'; 'W053'; 'W054'";
85        }
86        else if (searchSection == "jobsub1") {
87            queryWowcode = "'W051'";
88        }
89        else if (searchSection == "jobsub2") {
90            queryWowcode = "'W052'";
91        }
92        else if (searchSection == "jobsub3") {
93            queryWowcode = "'W053'";
94        }
95        //연예.스타
96        else if (searchSection == "entstar") {
97            queryWowcode = "'W014'; 'W016'; 'W021'; 'W022'; 'W023'; 'W014'; 'W028'; 'W029'; 'W030'; 'W031'";
98        }
99        //스포츠
100        else if (searchSection == "sports") {
101            queryWowcode = "'W013'";
102        }
103        //VOD
104        //else if (searchSection == "vod") {
105        //    queryWowcode = "''";
106        //}
107
108        var subMenuHan = "뉴스";
109
110        if (searchSection == "entstar" || searchSection == "sports") {
111            subMenuHan = "연예·스타";
112        }
113        else if (searchSection == "vod") {
114            subMenuHan = "포토·영상";
115        }
116        else if (searchSection == "tvtenplus") {
117            subMenuHan = "티비텐플러스";
118        }
119
120        var queryString = '{ ';
121        queryString += ' "querySet" : { ';
122        queryString += '    "version" : 42, ';
123        queryString += '    "query" : [{ ';
124        queryString += '      "selectSet": ';
125        queryString += '       {';
126        queryString += '        "fields": ';
127        queryString += '         ["ARTID(NONE)","TITLE(NONE)","ARTDATE(NONE)","CONTENT(HIGHLIGHT;SUMMARIZE|300)","VOD_NUM(NONE)", "THUMBNAIL_FILENM(NONE)", "IMGDIR(NONE)", "THUMBNAIL_TYPE1(NONE)","COMPCODE(NONE)","SECTION_NAME(NONE)","COMP_NAME(NONE)","TAG(NONE)","KEYWORDS(NONE)"] ';
128        queryString += '       }, ';
129        queryString += '      "whereSet": ';
130        queryString += '       { ';
131        queryString += '        "fields": ';
132        queryString += '           ["BRACE_OPEN", ';
133        if (searchComp == "WO") {
134            queryString += '           "COMPCODE(HASALL|\'WO\')", AND , ';
135        }
136        if (searchComp == "DT") {
137            queryString += '           "COMPCODE(HASALL|\'DT\')", AND , ';
138        }
139        queryString += '               "WOWCODE(HASANY| ' + queryWowcode + ')", ';
140        queryString += '           "BRACE_CLOSE"] ';
141        queryString += '        }, ';
142        queryString += '      "filterSet": ';
143        queryString += '       { ';
144        queryString += '          "fields": [ ';
145        if (searchSection == "vod") {
146            queryString += '           "VOD_NUM(RANGE|\'1\';\'99999999\')", ';
147        }
148        queryString += '                "ARTDATE(RANGE|\'' + searchStartDate.replace(/-/g, '') + '\';\'' + searchEndDate.replace(/-/g, '') + '\')" ';
149        queryString += '           ] ';
150        queryString += '       }, ';
151        queryString += '      "orderBySet": ';
152        queryString += '       { ';
153        queryString += '          "fields": ["ARTDATE(ASC|POSTWEIGHT)"]';
154        queryString += '       }, ';
155        queryString += '       "fromSet": { "collection": "WOWNEWS_2017", "result": [' + startIndex + ', ' + endIndex + '] }';
156        queryString += '      ,"useCache":true ';
157        queryString += '      ,"debugOption":{ "printQuery":false, "debug":false, "faultless":false } ';
158        queryString += '    }] ';
159        queryString += ' } ';
160        queryString += '} ';
161
162        //console.log(queryString);
163        var targetId = $("#divNewsList");
164
165        $.ajax({
166            type: "POST",
167            contentType: "application/json; charset=UTF-8",
168            dataType: "json",
169            url: SITE_DOMAIN.SEARCH + "/collections/search",
170            data: queryString,
171            //결과 받기전
172            beforeSend: function () {
173
174                //로딩 처리
175                var strLoading = "<div class=\"article-news-list\"><div class=\"contian-news\" style=\"vertical-align:middle;text-align:center;\"><img src='/Content/Images/bigWaiting.gif' width=\"50px\"><br><br>로딩 중입니다.</div></div>";
176                targetId.html(strLoading);
177            },
178            //성공
179            success: function (data, textStatus) {
180
181                //targetId.html(data);
182                var newsListHtml = '';
183                var totalSize = data.resultSet.result[0].totalSize;
184                $("#totalDataCount").val(totalSize);
185
186                if (data.resultSet.result[0].resultDocuments.length > 0) {
187
188                    var newsListItem = data.resultSet.result[0].resultDocuments;
189
190                    $.each(newsListItem, function (index, item) {
191
192                        var hashTag = item.TAG;
193                        if (hashTag == '') {
194                            hashTag = item.KEYWORDS;
195                        }
196
197                        var artdate = item.ARTDATE;
198                        artdate = artdate.substring(0, 4) + "-" + artdate.substring(4, 6) + "-" + artdate.substring(6, 8) + " " + artdate.substring(8, 10) + ":" + artdate.substring(10, 12) + ":" + artdate.substring(12, 14);
199
200                        newsListHtml += '<div class="article-news-list">';
201                        newsListHtml += '    <div class="contian-news photo-right">';
202
203                        if ($.trim(item.THUMBNAIL_TYPE1).length > 0 || ($.trim(item.THUMBNAIL_FILENM).length > 0 && $.trim(item.IMGDIR).length > 0)) {
204
205                            var thumbnailUrl = GetNewsThumbnail('11S', item.THUMBNAIL_FILENM, item.VOD_NUM, item.IMGDIR, item.THUMBNAIL_TYPE1, artdate);
206
207                            newsListHtml += '    <div class="photo-news">';
208                            newsListHtml += '    <img src="' + thumbnailUrl + '" onerror="this.src=\'//img.wowtv.co.kr/PcStyle/images/common/no_image_11s.jpg\'" alt="">';
209
210                            if (parseInt(item.VOD_NUM) > 0) {
211                                newsListHtml += '      <span class="icon-play medium"></span>';
212                            }
213                            newsListHtml += '    </div>';
214                        }
215
216                        newsListHtml += '        <a href="https://www.wowtv.co.kr/NewsCenter/News/Read?articleId=' + item.ARTID + '" onclick="javascript:NewsCommon.GoNewsView(\'' + item.ARTID + '\'); return false;">';
217                        newsListHtml += '            <p class="title-text">' + item.TITLE + '<span class="date">' + artdate + '</span></p>';
218                        newsListHtml += '        </a>';
219                        newsListHtml += '            <p class="main-text">' + item.CONTENT + '</p>';
220                        newsListHtml += '        <div class="footer-text">';
221                        newsListHtml += '            <p class="category-text">';
222                        newsListHtml += subMenuHan + ' &gt; ' + item.SECTION_NAME;
223                        newsListHtml += '            </p>';
224                        newsListHtml += '            <span class="division-bar"></span>';
225                        newsListHtml += '            <p class="reporter">';
226                        newsListHtml += item.COMP_NAME;
227                        newsListHtml += '            </p>';
228
229                        if (hashTag.length > 0) {
230                            newsListHtml += '                <span class="division-bar"></span>';
231                            newsListHtml += '                <div class="tags">';
232
233                            var hashTagList = hashTag.split(",");
234
235                            for (var j = 0; j < (hashTagList.length > 3 ? 3 : hashTagList.length); j++) {
236                                newsListHtml += '           <a href=\"https://www.wowtv.co.kr/TotalSearch/Mariner/Index?searchTerm=' + hashTagList[j] + '\" onclick=\"javascript:HashTagLink(\'' + hashTagList[j] + '\'); return false;\" class="hash-tag02">' + hashTagList[j] + '</a>';
237                            }
238                            newsListHtml += '                </div>';
239                        }
240                        newsListHtml += '        </div>';
241                        newsListHtml += '    </div>';
242                        newsListHtml += '</div>';
243
244                    });
245
246                }
247                else if (totalSize == "0") {
248                    newsListHtml = '<div class="article-news-list"><div class="contian-news"><div class="contian-news" style="vertical-align:middle;text-align:center;">검색결과가 없습니다.</div></div></div>';
249                }
250                targetId.html(newsListHtml);
251
252                NewsSearchList.NewsListPagingHtml(currentIndex);
253            },
254            //완료
255            complete: function () {
256
257
258            },
259            //에러
260            error: function (jqXHR, textStatus, errorThrown) {
261
262                newsListHtml = '<div class="article-news-list"><div class="contian-news"><div class="contian-news" style="vertical-align:middle;text-align:center;">결과가 없습니다.</div></div></div>';
263
264                targetId.html(newsListHtml);
265
266                if (console && console.log) {
267                    console.log("리스트 에러..");
268                }
269            }
270        });
271    },
272
273    NewsSelDate: function (selDate, index) {
274
275        //console.log(index);
276
277        $('.calendar-news-week ul li a').removeClass('on');
278        $("[name='aNewsSelDate']").each(function (index) {
279
280            //console.log(selDate.substring(5, 10));
281            //console.log($(this).text());
282
283            if (selDate.substring(5, 10) == $(this).text()) {
284                $(this).addClass('on');
285            }
286        });
287
288        $("#selDateIndex").val(index);
289        $("#StartDate").val(selDate);
290        $("#EndDate").val(SetAddDay(selDate, 1));
291        //$("#btnWowNewsOff").click();
292    },
293    //상단 뉴스 일자 표기
294    NewsWeekDate: function () {
295
296        var today = $("#hdToday").val();
297        var basicDate = $("#hdBasicDate").val();
298
299        var ulHtml = "";
300
301        for (i = 0; i >= -6; i--) {
302            var classToday = "";
303            var addDate = SetAddDay(basicDate, i);
304
305            if (today == addDate) {
306
307                classToday = "class='today'";
308            }
309
310            //ulHtml += String.format('<li {0} ><a href="javascript:NewsSearchList.NewsSelDate(\'{1}\', {2})" name="aNewsSelDate">{3}</a></li>', classToday, addDate, i, new Date(addDate).format("MM-dd"));
311
312            var goUrl = "/NewsCenter/News/NewsList?subMenu=" + $("#SearchSection").val() + "&menuSeq=" + $("#menuSeq").val() + "&StartDate={1}&selDateIndex={2}";
313            ulHtml += String.format('<li {0}><a href="' + goUrl + '" name="aNewsSelDate" onclick="javascript:NewsSearchList.NewsSelDate(\'{1}\', {2});">{3}</a></li>', classToday, addDate, i, new Date(addDate).format("MM-dd"));
314        }
315
316        $("#ulDate").html(ulHtml);
317    },
318
319    /**
320     * @description 페이징 HTML
321     */
322    NewsListPagingHtml: function (currentIndex) {
323
324        if (typeof currentIndex == "undefined") currentIndex = $("#currentIndex").val();
325
326        var pageSize = parseInt($("#PageSize").val());
327        var totalDataCount = parseInt($("#totalDataCount").val());
328
329        if (totalDataCount == 0) {
330            $("#divPaging").html("");
331        }
332        else {
333            $("#divPaging").html(cfGetPagingHtml(totalDataCount, currentIndex, pageSize, "NewsSearchList.NewsList"));
334        }
335    },
336    /**
337     * @description 부가 컨텐츠 + AD
338     */
339    RightContent: function () {
340        var subMenu = $("#SearchSection").val();
341
342        //if (subMenu == "virtualcurrency") {
343        //    $("#divContentRight").load("/html/ListVirtualCurrencyRight.html");
344        //} else {
345        if (location.href.indexOf('subMenu=opinion') > 0) {// && location.href.indexOf('Class=G') > 0) {
346            $("#divContentRight").load("/html/ReadPlan.html");
347        } else {
348            $("#divContentRight").load("/html/ContentRight.html");
349        }
350        //}
351    },
352
353    VirtualCurrency: function (listtype) {
354        /*
355        $('.navigation-global.vc ul li').on('click', function () {
356            $('.navigation-global.vc ul li').removeClass('on');
357            $(this).addClass('on');
358            return false;
359        });*/
360        $('.navigation-global.vc ul li').removeClass('on');
361
362        if (listtype == "crypto") {
363            $("#cryptoTab").addClass("on");
364            $("#SearchComp").val("DT");
365        } else {
366            $("#vcAllTab").addClass("on");
367            $("#SearchComp").val("");
368        }
369
370        $("#currentIndex").val("1");
371        $("#Page").val("1");
372        NewsSearchList.NewsList();
373    }
374}
375
376$(document).ready(function () {
377
378    //상단 메뉴명 숨김
379    $(".contain-aside").hide();
380
381    //기사 상세 페이지서 목록으로 올때.등.한국경제 기사만.. 제어
382    if ($("#SearchComp").val() == "WO") {
383
384        $("#btnWowNewsOn").parent().addClass("on");
385        $("#btnWowNewsOff").parent().removeClass("on");
386    }
387    else {
388        $("#btnWowNewsOn").parent().removeClass("on");
389        $("#btnWowNewsOff").parent().addClass("on");
390    }
391
392    //뉴스 리스트
393    if ($("#SearchSection").val() == "virtualcurrency") {
394        var tab = getQuerystring('tab');
395        if (typeof tab != "undefined" && tab == "2") {
396            NewsSearchList.VirtualCurrency('crypto');
397        } else {
398            NewsSearchList.VirtualCurrency('all');
399        }
400    } else {
401        //NewsSearchList.NewsList();
402    }
403
404    //오른쪽 부가 컨텐츠 + AD Area
405    NewsSearchList.RightContent();
406
407    //뉴스 일자 > 다음주
408    $("#btnNext").click(function () {
409
410        var basicDate = $("#hdBasicDate").val();
411        var today = $("#hdToday").val();
412
413        if (today == basicDate) {
414            //alert(0);
415            return false;
416        }
417        else {
418            //시작일 변경
419            $("#hdBasicDate").val(SetAddDay($("#hdBasicDate").val(), 7));
420
421            NewsSearchList.NewsWeekDate();
422        }
423    });
424
425    //뉴스 일자 > 이전주
426    $("#btnPrev").click(function () {
427
428        //시작일 변경
429        $("#hdBasicDate").val(SetAddDay($("#hdBasicDate").val(), -7));
430
431        NewsSearchList.NewsWeekDate();
432    });
433
434    //한국경제 기사만 ON
435    $("#btnWowNewsOn").click(function () {
436
437        $("#SearchComp").val("WO");
438
439        $("#btnWowNewsOn").parent().addClass("on");
440        $("#btnWowNewsOff").parent().removeClass("on");
441        //검색
442        $("#currentIndex").val("1");
443        $("#Page").val("1");
444        NewsSearchList.NewsList();
445    });
446
447    //한국경제 기사만 OFF
448    $("#btnWowNewsOff").click(function () {
449        $("#SearchComp").val("");
450
451        $("#btnWowNewsOn").parent().removeClass("on");
452        $("#btnWowNewsOff").parent().addClass("on");
453
454        //검색
455        $("#currentIndex").val("1");
456        $("#Page").val("1");
457
458        NewsSearchList.NewsList();
459    });
460
461    $(document).scroll(function () {
462        if ($('.goog-te-menu-frame').css('display') != 'none') {
463            $('.goog-te-menu-frame').css('display', 'none');
464        }
465    });
466
467    $(document).on('click', '.skiptranslate > .goog-te-gadget-simple', function () {
468        if ($('.goog-te-menu-frame').hasClass('on')) {
469            $('.goog-te-menu-frame').css('display', 'none');
470            $('.goog-te-menu-frame').removeClass('on');
471        } else {
472            $('.goog-te-menu-frame').css('display', 'black');
473            $('.goog-te-menu-frame').addClass('on');
474        }
475    });
476
477    var language = getQuerystring('language');
478    if (typeof language != "undefined") {
479        if (!language.includes('/ko/')) {
480            language = '/kr/' + language;
481        }
482        cookies = 'googtrans' + '=' + escape(language) + '; path=/ ';
483        document.cookie = cookies;
484    }
485});

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.