Authored by yyq

fix history

... ... @@ -155,6 +155,7 @@ const searchHistory = (req, res) => {
if (q) {
history.unshift(q);
res.cookie('_History', _.take(history, 9).join(','), {
path: '/',
domain: config.cookieDomain,
maxAge: 60 * 60 * 24 * 1000 * 30 // 一月
});
... ...
... ... @@ -966,7 +966,10 @@ function searchSuggestHistory() {
// 历史记录清空
$('.search-suggest-title .search-del').click(function() {
window.setCookie('_History', '', {domain: '.yohobuy.com'});
window.setCookie('_History', '', {
domain: '.yohobuy.com',
path: '/'
});
$searchHistory.empty();
$searchKey.attr('alt', true);
return false;
... ...