...
|
...
|
@@ -169,36 +169,42 @@ $search.on('touchend', function() { |
|
|
history,
|
|
|
historys, i, num = 1;
|
|
|
|
|
|
if (localStorage) {
|
|
|
historys = localStorage.getItem(historyval);
|
|
|
try {
|
|
|
if (localStorage) {
|
|
|
historys = localStorage.getItem(historyval);
|
|
|
|
|
|
if (historys && historys.length > 0) {
|
|
|
historys = historys.split(ranToken);
|
|
|
for (i = historys.length; i > 0; i--) {
|
|
|
history = historys[i - 1];
|
|
|
if (historys && historys.length > 0) {
|
|
|
historys = historys.split(ranToken);
|
|
|
for (i = historys.length; i > 0; i--) {
|
|
|
history = historys[i - 1];
|
|
|
|
|
|
if (history === '') {
|
|
|
continue;
|
|
|
}
|
|
|
if (history === '') {
|
|
|
continue;
|
|
|
}
|
|
|
|
|
|
if (num++ > 10) {
|
|
|
break;
|
|
|
if (num++ > 10) {
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
html += '<li><a href="javascript:void(0);">' + history + '</li>';
|
|
|
}
|
|
|
|
|
|
html += '<li><a href="javascript:void(0);">' + history + '</li>';
|
|
|
}
|
|
|
$history.html(html);
|
|
|
|
|
|
$history.html(html);
|
|
|
if (html !== '') {
|
|
|
$clearHistory.removeClass('hide');
|
|
|
$historySearch.removeClass('hide');
|
|
|
}
|
|
|
|
|
|
if (html !== '') {
|
|
|
$clearHistory.removeClass('hide');
|
|
|
$historySearch.removeClass('hide');
|
|
|
window.rePosFooter();
|
|
|
} else {
|
|
|
$historySearch.hide();
|
|
|
$clearHistory.hide();
|
|
|
}
|
|
|
|
|
|
window.rePosFooter();
|
|
|
} else {
|
|
|
$historySearch.hide();
|
|
|
$clearHistory.hide();
|
|
|
}
|
|
|
} catch (e) {
|
|
|
console.log(e);
|
|
|
$historySearch.hide();
|
|
|
$clearHistory.hide();
|
|
|
}
|
|
|
}()); |
...
|
...
|
|