Authored by 梁志锋

Merge remote-tracking branch 'remotes/origin/hotfix/brand-search'

... ... @@ -148,7 +148,7 @@ function bindWriteLocal($brandList, list) {
}
if (localStorage) {
if (isLocalStorageSupported) {
if (isLocalStorageSupported()) {
historys = localStorage.getItem('historys-brand');
}
... ... @@ -168,7 +168,9 @@ function bindWriteLocal($brandList, list) {
historys += query + ranToken;
localStorage.setItem('historys-brand', historys);
if (isLocalStorageSupported()) {
localStorage.setItem('historys-brand', historys);
}
}
if (list) {
... ... @@ -432,8 +434,9 @@ if ($('.brand-search-page').length > 0) {
chHammer = new Hammer($clearHistory[0]);
chHammer.on('tap', function() {
localStorage.removeItem('historys-brand');
if (isLocalStorageSupported()) {
localStorage.removeItem('historys-brand');
}
$history.html('');
$historySearch.hide();
$clearHistory.hide();
... ... @@ -473,7 +476,7 @@ if ($('.brand-search-page').length > 0) {
if (localStorage) {
if (isLocalStorageSupported) {
if (isLocalStorageSupported()) {
historys = localStorage.getItem('historys-brand');
}
... ...