Authored by OF1706

history mod

... ... @@ -136,7 +136,7 @@ const searchHistory = (req, res) => {
}
_.forEach(history, function(item) {
if(item !== 'undefined'){
if (item !== 'undefined') {
let list = {};
list['keyword'] = item; //eslint-disable-line
... ...
... ... @@ -898,9 +898,9 @@ function searchSuggestHistory() {
query: window.queryString().query
};
if($searchKey.attr("alt")){
param.query = "";
$searchKey.attr("alt",false);
if ($searchKey.attr('alt')) {
param.query = '';
$searchKey.attr('alt', false);
}
$.getJSON('//search.yohobuy.com/product/search/history?callback=?', param, function(jsonData) {
... ... @@ -922,7 +922,7 @@ function searchSuggestHistory() {
$('.search-suggest-title .searchDel').click(function() {
window.setCookie('_History', '', {domain: '.yohobuy.com'});
$(this).closest('.search-suggest-history').hide();
$searchKey.attr("alt",true);
$searchKey.attr('alt', true);
return false;
});
... ... @@ -982,7 +982,7 @@ function searchSuggestRecommend(channel, key) {
*/
$(function() {
searchSuggestRecommend();
if(location.href.indexOf("www.yohobuy.com") < 0){
if (location.href.indexOf('www.yohobuy.com') < 0) {
searchSuggestHistory();
}
});
... ...