...
|
...
|
@@ -35,7 +35,7 @@ var searchH = $('.newbrand-search').outerHeight(), |
|
|
minBrandListTop;
|
|
|
|
|
|
var brandsData,
|
|
|
$keyword,
|
|
|
$keyword = $('#keyword'),
|
|
|
clearTextHammer;
|
|
|
|
|
|
var $history = $('.local-history');
|
...
|
...
|
@@ -116,7 +116,7 @@ function isLocalStorageSupported() { |
|
|
}
|
|
|
|
|
|
//绑定提交前的存local操作
|
|
|
function bindWirteLocal($brandList, list) {
|
|
|
function bindWriteLocal($brandList, list) {
|
|
|
$brandList.on('click', 'p , li', function(e) {
|
|
|
var brandName, brandId, brandDomain, url;
|
|
|
var a = $(this).find('a');
|
...
|
...
|
@@ -124,8 +124,6 @@ function bindWirteLocal($brandList, list) { |
|
|
var query = a.attr('brandName') + ranToken2 + myDate.getTime(),
|
|
|
historys;
|
|
|
|
|
|
$keyword = $('#keyword');
|
|
|
|
|
|
brandName = a.attr('brandName');
|
|
|
|
|
|
brandId = a.attr('brandId');
|
...
|
...
|
@@ -241,7 +239,7 @@ function searchResult() { |
|
|
// 插入 dom,绑定事件
|
|
|
$('.search-result').html(html);
|
|
|
changeBackground();
|
|
|
bindWirteLocal($('.brand-list'), true);
|
|
|
bindWriteLocal($('.brand-list'), true);
|
|
|
}
|
|
|
|
|
|
loading.showLoadingMask();
|
...
|
...
|
@@ -333,21 +331,20 @@ if ($('.brand-index-page').length > 0) { |
|
|
|
|
|
|
|
|
if ($('.history-search').length > 0) {
|
|
|
bindWirteLocal($('.history-search'), false);
|
|
|
bindWriteLocal($('.history-search'), false);
|
|
|
}
|
|
|
|
|
|
if ($('.hot-search').length > 0) {
|
|
|
bindWirteLocal($('.hot-search'), false);
|
|
|
bindWriteLocal($('.hot-search'), false);
|
|
|
}
|
|
|
|
|
|
if ($('.brand-search-page').length > 0) {
|
|
|
brandsData = $.parseJSON($('#brands-data').html());
|
|
|
$keyword = $('#keyword');
|
|
|
|
|
|
$keyword.on('input', function() {
|
|
|
searchInput();
|
|
|
|
|
|
}).focus();
|
|
|
});
|
|
|
|
|
|
// 2016.1.13 产品(高扬)要求进入页面默认显示取消按钮
|
|
|
$icon.css('color', '#444');
|
...
|
...
|
|