...
|
...
|
@@ -967,8 +967,10 @@ $('.search-suggest-history').mouseenter(function() { |
|
|
* 搜索 热门搜索和默认搜索 api
|
|
|
* @return {[type]} [description]
|
|
|
*/
|
|
|
function searchSuggestRecommend(key) {
|
|
|
function searchSuggestRecommend(channel, key) {
|
|
|
|
|
|
var param = {
|
|
|
channel: channel,
|
|
|
return_type: 'jsonp',
|
|
|
keyword: key
|
|
|
};
|
...
|
...
|
@@ -978,14 +980,12 @@ function searchSuggestRecommend(key) { |
|
|
var searchSuggestRecommendHtml; //eslint-disable-line
|
|
|
|
|
|
if (jsonData.code === 200) {
|
|
|
if (jsonData.data && jsonData.data.hotTerms.length) {
|
|
|
|
|
|
searchSuggestRecommendHtml = handlebars.compile($searchRecommendHbs.html() || '');
|
|
|
$searchRecommend.html(searchSuggestRecommendHtml(jsonData)).show();
|
|
|
searchSuggestRecommendHtml = handlebars.compile($searchRecommendHbs.html() || '');
|
|
|
$searchRecommend.html(searchSuggestRecommendHtml(jsonData)).show();
|
|
|
|
|
|
} else {
|
|
|
$searchRecommend.hide();
|
|
|
}
|
|
|
} else {
|
|
|
$searchRecommend.hide();
|
|
|
}
|
|
|
|
|
|
});
|
...
|
...
|
|