|
@@ -713,6 +713,8 @@ if ($miniCart && $miniCart.length) { |
|
@@ -713,6 +713,8 @@ if ($miniCart && $miniCart.length) { |
713
|
$goCart.hover(function() {
|
713
|
$goCart.hover(function() {
|
714
|
var data, _html = '';
|
714
|
var data, _html = '';
|
715
|
|
715
|
|
|
|
716
|
+ $searchHistory.hide();
|
|
|
717
|
+
|
716
|
if ($goCart.hasClass('on-hover')) {
|
718
|
if ($goCart.hasClass('on-hover')) {
|
717
|
return;
|
719
|
return;
|
718
|
}
|
720
|
}
|
|
@@ -735,6 +737,8 @@ if ($miniCart && $miniCart.length) { |
|
@@ -735,6 +737,8 @@ if ($miniCart && $miniCart.length) { |
735
|
data = $dom.data(),
|
737
|
data = $dom.data(),
|
736
|
callback;
|
738
|
callback;
|
737
|
|
739
|
|
|
|
740
|
+ $searchHistory.hide();
|
|
|
741
|
+
|
738
|
if (data) {
|
742
|
if (data) {
|
739
|
callback = function() {
|
743
|
callback = function() {
|
740
|
$dom.closest('.goods-item').remove();
|
744
|
$dom.closest('.goods-item').remove();
|
|
@@ -923,7 +927,7 @@ function actionAddKeyWords() { |
|
@@ -923,7 +927,7 @@ function actionAddKeyWords() { |
923
|
function searchSuggestHistory() {
|
927
|
function searchSuggestHistory() {
|
924
|
var param = {
|
928
|
var param = {
|
925
|
return_type: 'jsonp',
|
929
|
return_type: 'jsonp',
|
926
|
- query: encodeURIComponent($searchKey.val()) || ''
|
930
|
+ query: encodeURIComponent(window.queryString().query) || ''
|
927
|
};
|
931
|
};
|
928
|
|
932
|
|
929
|
$.getJSON('//search.yohobuy.com/product/search/history?callback=?', param, function(jsonData) {
|
933
|
$.getJSON('//search.yohobuy.com/product/search/history?callback=?', param, function(jsonData) {
|
|
@@ -970,7 +974,7 @@ $searchKey.focus(function() { |
|
@@ -970,7 +974,7 @@ $searchKey.focus(function() { |
970
|
});
|
974
|
});
|
971
|
|
975
|
|
972
|
/**
|
976
|
/**
|
973
|
- * 搜索 热门搜索和默认搜索 api
|
977
|
+ * 搜索 热门搜索 api
|
974
|
* @return {[type]} [description]
|
978
|
* @return {[type]} [description]
|
975
|
*/
|
979
|
*/
|
976
|
function searchSuggestRecommend(channel, key) {
|
980
|
function searchSuggestRecommend(channel, key) {
|
|
@@ -995,6 +999,7 @@ function searchSuggestRecommend(channel, key) { |
|
@@ -995,6 +999,7 @@ function searchSuggestRecommend(channel, key) { |
995
|
}
|
999
|
}
|
996
|
|
1000
|
|
997
|
});
|
1001
|
});
|
|
|
1002
|
+
|
998
|
}
|
1003
|
}
|
999
|
|
1004
|
|
1000
|
/**
|
1005
|
/**
|
|
@@ -1003,8 +1008,10 @@ function searchSuggestRecommend(channel, key) { |
|
@@ -1003,8 +1008,10 @@ function searchSuggestRecommend(channel, key) { |
1003
|
*/
|
1008
|
*/
|
1004
|
$(function() {
|
1009
|
$(function() {
|
1005
|
searchSuggestRecommend();
|
1010
|
searchSuggestRecommend();
|
|
|
1011
|
+ searchSuggestHistory();
|
1006
|
});
|
1012
|
});
|
1007
|
|
1013
|
|
1008
|
actionCover();
|
1014
|
actionCover();
|
1009
|
actionAddKeyWords();
|
1015
|
actionAddKeyWords();
|
1010
|
setTimeout(emailUserCertTip, 0);
|
1016
|
setTimeout(emailUserCertTip, 0);
|
|
|
1017
|
+ |