Merge branch 'release/newSearch' of git.yoho.cn:fe/yohobuy-node into release/newSearch
Showing
2 changed files
with
15 additions
and
2 deletions
@@ -92,7 +92,19 @@ exports.getSuggest = (params) => { | @@ -92,7 +92,19 @@ exports.getSuggest = (params) => { | ||
92 | }; | 92 | }; |
93 | 93 | ||
94 | exports.getBrands4Filter = (params) => { | 94 | exports.getBrands4Filter = (params) => { |
95 | - return searchApi.getBrands4Filter(params).then(result => { | 95 | + |
96 | + let nparams = {}; | ||
97 | + | ||
98 | + if (params && params.price) { | ||
99 | + let mp = params.price.split(','); | ||
100 | + let nmp = []; | ||
101 | + | ||
102 | + nmp[0] = (mp && mp[0]) || 0; | ||
103 | + nmp[1] = (mp && mp[1]) || 99999; | ||
104 | + nparams.price = nmp.join(','); | ||
105 | + } | ||
106 | + | ||
107 | + return searchApi.getBrands4Filter(Object.assign({}, params, nparams)).then(result => { | ||
96 | 108 | ||
97 | let dest = []; | 109 | let dest = []; |
98 | 110 |
@@ -157,10 +157,11 @@ function checkMoreBrands(callback) { | @@ -157,10 +157,11 @@ function checkMoreBrands(callback) { | ||
157 | // /product/search/filter/brands?callback=? | 157 | // /product/search/filter/brands?callback=? |
158 | var url = '//search.yohobuy.com/product/search/filter/brands?callback=?'; | 158 | var url = '//search.yohobuy.com/product/search/filter/brands?callback=?'; |
159 | var brandsHtml; | 159 | var brandsHtml; |
160 | + var params = (location.search || '').substr(1); | ||
160 | 161 | ||
161 | if (!moreBrandLoaded) { | 162 | if (!moreBrandLoaded) { |
162 | 163 | ||
163 | - $.getJSON(url, location.search, function(jsonData) { | 164 | + $.getJSON(url, params, function(jsonData) { |
164 | 165 | ||
165 | if (jsonData.code === 200) { | 166 | if (jsonData.code === 200) { |
166 | 167 |
-
Please register or login to post a comment