Authored by 郝肖肖

search url query

... ... @@ -143,10 +143,11 @@ function isLocalStorageSupported() {
(function() {
var html = '',
history,
historys, i, num = 1;
historys, i, num = 1, searchUrl = '';
if (localStorage) {
historys = localStorage.getItem('historys');
searchUrl = $form.attr('action');
if (historys && historys.length > 0) {
historys = historys.split(ranToken);
... ... @@ -161,7 +162,7 @@ function isLocalStorageSupported() {
break;
}
html += '<li><a href="/?query=' + history + '">' + history + '</li>';
html += '<li><a href="' + searchUrl + '/?query=' + history + '">' + history + '</li>';
}
$history.html(html);
... ...
... ... @@ -29,7 +29,7 @@
<ul class="hot clearfix">
{{# hotTerms}}
<li>
<a href='/?query={{content}}'>{{content}}</a>
<a href='{{../url}}/?query={{content}}'>{{content}}</a>
</li>
{{/ hotTerms}}
</ul>
... ...