Authored by OF1706

recommend list

... ... @@ -19,7 +19,7 @@ var $head = $('.head-wrapper'),
$searchRecommend = $head.find('.search-hot'),
$searchHistoryHbs = $head.find('#search-suggest-history'),
$searchRecommendHbs = $head.find('#search-suggest-recommend');
$goCart = $head.find('.go-cart'),
$goCart = $head.find('.go-cart'),
$myYohoBox = $('#myYohoBox'),
$goodsNum = $goCart.find('.goods-num-tip'),
$miniCart = $head.find('.mini-cart-wrapper');
... ... @@ -867,7 +867,7 @@ function searchSuggestHistory(key) {
keyword: key
};
$.getJSON('//search.yohobuy.com/product/search/suggestHistory?callback=?', param, function(jsonData) {
$.getJSON('//search.yohobuy.com/product/search/history?callback=?', param, function(jsonData) {
var searchSuggestHistoryHtml;
if (jsonData.code === 200) {
... ... @@ -911,16 +911,16 @@ function searchSuggestRecommend(key) {
keyword: key
};
$.getJSON('//search.yohobuy.com/product/search/suggestRecommend?callback=?', param, function(jsonData) {
$.getJSON('//search.yohobuy.com/product/search/recommend?callback=?', param, function(jsonData) {
var searchSuggestRecommendHtml;
if (jsonData.code === 200) {
if (jsonData.data && jsonData.data.length) {
searchSuggestRecommendHtml = handlebars.compile($searchRecommendHbs.html() || '');
// if (jsonData.data && jsonData.data.hotTerms.length && jsonData.data.guessTerms.length) {
searchSuggestRecommendHtml = handlebars.compile($searchRecommendHbs.html() || '');
$searchRecommend.html(searchSuggestRecommendHtml(jsonData)).show();
} else {
$searchRecommend.hide();
}
// } else {
// $searchRecommend.hide();
// }
}
});
}
... ...