Authored by 阿达

搜索bug fix

... ... @@ -353,8 +353,16 @@ if ($('.brand-search-page').length > 0) {
continue;
}
locate = history.indexOf('http://');
if (locate === -1) {
brand = history;
url = '';
} else {
brand = history.substr(0, locate);
url = history.substr(locate, history.length - locate);
}
html += '<li><a href="' + url + '">' + brand + '</li>';
$historySearch.removeClass('hide');
... ...
... ... @@ -45,7 +45,7 @@ function bindWirteLocal($brandList) {
e.preventDefault();
if ($('.net-search').length > 0) {
if ($('.net-history').length > 0) {
addHistory(brandName, brandId, brandDomain);
location.href = url;
return;
... ...
... ... @@ -17,6 +17,7 @@
<div class="search-brand-page">
<div class="search-items">
{{#if history}}
<div class="net-history">
<div class="history-search net-search">
<h3><span class="iconfont">&#xe64a;</span>最近搜索
<button id="clear-history" class="clear-icon iconfont">&#xe64c;</button>
... ... @@ -29,6 +30,7 @@
{{/ history}}
</ul>
</div>
</div>
{{else}}
<div class="history-search local-search hide">
<h3><span class="iconfont">&#xe64a;</span>最近搜索
... ...