...
|
...
|
@@ -934,8 +934,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
|
|
|
};
|
...
|
...
|
@@ -944,15 +946,13 @@ function searchSuggestRecommend(key) { |
|
|
|
|
|
var searchSuggestRecommendHtml; //eslint-disable-line
|
|
|
|
|
|
if (jsonData.code === 200) {
|
|
|
if (jsonData.data && jsonData.data.hotTerms.length) {
|
|
|
if (jsonData.code == 200) {
|
|
|
|
|
|
searchSuggestRecommendHtml = handlebars.compile($searchRecommendHbs.html() || '');
|
|
|
$searchRecommend.html(searchSuggestRecommendHtml(jsonData)).show();
|
|
|
|
|
|
} else {
|
|
|
$searchRecommend.hide();
|
|
|
}
|
|
|
}else{
|
|
|
$searchRecommend.hide();
|
|
|
}
|
|
|
|
|
|
});
|
...
|
...
|
|