PageSourceSearch

https://js-oss.588ku.com/main_site/base/js/searchDrop.js?v=v260518

js 588ku.com collected 2026-10-01 13:11:07 UTC 5,994 bytes, 159 lines download raw bytes

1function _reloadHotWords(data, type) {
2    var retStr = resStr = stype = lastm = '';
3    if (type == '5') {    
4      stype = 'image';
5    } else if (type == '23') {
6      stype = 'yishuzi';
7    } else if (type == '24') {
8      stype = 'chahua';
9    } else if (type == '32') {
10      stype = 'sheyingtu';
11    } else if (type == '30') {
12      stype = 'ui';
13    } else if (type == '99') {
14      stype = 'so';
15    } else if (type == '40') {
16      domainUrl = '//editor.588ku.com?sourceC=master';
17      stype = 'muban';
18    } else {
19      stype = 'tuku';
20    }
21    if (type == '11') {
22      lastm = '-moban.html';
23    } else if (type == '32') {
24      lastm = '-0-default-0-1/';
25    } else if (type == '99') {
26      lastm = '/';
27    } else {
28      lastm = ".html"
29    }
30    if (data.data.search_log.length != 0) {
31
32      var searchLog = data.data.search_log;
33      retStr = '<div class="search-log"><ul class="clearfix"><li class="recent-search">最近搜索</li>';
34      for (var i in searchLog) {
35
36        if (searchLog[i]['is_egg'] == 1) {
37          retStr += '<li class="ly-mouse-sign"><a href="' + domainUrl + '/' + stype + '/' + searchLog[i]['pinyin'] + lastm + '" onclick="search_static(' + type + ',1)">' + searchLog[i]['keyword'] + '</a></li>';
38        } else {
39          //retStr += '<li><a href="'+domainUrl+'/' + stype + '/' + searchLog[i]['pinyin'] + lastm + '" onclick="search_static('+type+',1)">' + searchLog[i]['keyword'] + '</a></li>';
40          if (type == '40') {
41            retStr += '<li><a target="_blank" href="' + domainUrl + '/' + stype + '/' + searchLog[i]['pinyin'] + lastm + '" onclick="search_static(1)">' + searchLog[i]['keyword'] + '</a></li>';
42          } else {
43            retStr += '<li><a href="' + domainUrl + '/' + stype + '/' + searchLog[i]['pinyin'] + lastm + '" onclick="search_static(1)">' + searchLog[i]['keyword'] + '</a></li>';
44          }
45        }
46
47      }
48      retStr += '</ul></div>';
49    }
50
51    if (data.data.hotwords) {
52      var hotwords = data.data.hotwords;
53      if (data.data.hotCategory && data.data.hotCategory.length > 0&&false) {
54        retStr += '<div class="clearfix sokeys-ullist"><div class="h-tle">热门搜索:</div>';
55      }
56      for (var j in hotwords) {
57        var extendw = addone = '';
58        if (j > 9) {
59          break;
60        }
61        addone = (parseInt(j) + 1);
62        if (j <= 2) {
63          extendw = 'hot hot' + addone;
64        }
65        var url = hotwords[j]['url'];
66        var fontcolor = hotwords[j]['font_color'];
67        var ishot = hotwords[j]['is_hot'];
68        var desc = hotwords[j]['desc'];
69        let jump = hotwords[j]['is_open_page'] == 1 ? 'target="_blank"' : '';
70        var ishothtml = ishot == 1 ? '<em class="hot-icon"><i class="iconfont icon-HOT"></i></em>' : '';
71        resStr += '<li><a href="' + url + '" data-pinyin="xinnian" target="_blank">' + hotwords[j]['keyword'] + '</a></li>';
72
73        retStr += '<ul class="sokeyup1 sokeyup1s ' + extendw + ' data-id="' + addone + '" id="u_' + addone + '" onclick="search_static(' + type + ',2)">' +
74          '<li class="sokeyup2 sokeyup2s" id="l_' + addone + '"><a href="' + url + '" ' + jump + ' class="link-box" style="color:' + fontcolor + '"><em class="list-num" style="display:none">' + addone + '</em><span class="word-box">' + hotwords[j]['keyword'] + ishothtml + '</span><span class="item-sign">'+ desc +'</span></a></li>';
75        retStr += '</ul>';
76
77      }
78      if (data.data.hotCategory && data.data.hotCategory.length > 0&&false) {
79        retStr += '</div>';
80      }
81    }
82    if (data.data.hotCategory && data.data.hotCategory.length > 0&&false) {
83      retStr += '<div class="btmtype-box"><div class="h-tle">热门分类:</div><ul class="clearfix type-list">';
84      var hotCategory = data.data.hotCategory;
85      for (var j in hotCategory) {
86        //var 
87        retStr += '<li class="fl type-item" data-id="' + hotCategory[j]['id'] + '" data-type="' + hotCategory[j]['type'] + '"><a href="' + hotCategory[j]['url'] + '" >' + hotCategory[j]['keyword'] + '</a></li>';
88      }
89      retStr += '</div>';
90      $('.search-sug-float').addClass('V2');
91    } else {
92      $('.search-sug-float').removeClass('V2');
93    }
94
95    $('.search-sug-float').html(retStr);
96    $('#hot-search-float').html(retStr);
97    $('.searchPopularList').show();
98    $('.searchPopularList').html(resStr);
99  }
100  $(function(){
101    
102    var domainUrl = '//588ku.com';
103    var type = $('#topkeyword_float').attr('data-index');
104    function getHotWords(type) {
105      var classn = '';
106      if (type == '5') {
107        classn = 'element';
108      }
109      if (type == '24') {
110        classn = 'Illus';
111      }
112      if (type == '23') {
113        classn = 'WordArt';
114      }
115      if (type == '1') {
116        classn = 'BackgroundGallery';
117      }
118      if (type == '0') {
119        classn = 'BackgroundGallery';
120      }
121      if (type == '11') {
122        classn = 'Templet';
123      }
124      if (type == '13') {
125        classn = 'Office';
126      }
127      if (type == '15') {
128        classn = 'Video';
129      }
130      if (type == '32') {
131        classn = 'PhotoGram';
132      }
133      if (type == '30') {
134        classn = 'WebUi';
135      }
136      if (type == '28') {
137        classn = 'Gif';
138      }
139      if (type == '40') {
140        classn = 'editor';
141      }
142      if (type == '99' || (type >= 101 && type <= 104)) {
143        classn = 'Pic';
144      }
145      if (classn == '') {
146        $('.search-sug-float').html('').hide();
147      }
148      $('.search-popular').show();
149      if (classn) {
150        $.getJSON(domainUrl + '/?m=' + classn + '&a=searchHistory&type=' + type, function (result) {
151          _reloadHotWords(result, type);
152        });
153      }
154    }
155    //需要手动调用搜索历史热词的方法【原本无历史热词下拉的页面】
156    if($("#searchHistory").length){
157      getHotWords(type);
158    }
159  })

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.