Authored by 周少峰

Merge branch 'master' into release/5.1

@@ -165,7 +165,7 @@ const getListNewData = (params, channel) => { @@ -165,7 +165,7 @@ const getListNewData = (params, channel) => {
165 let apiMethod = [ 165 let apiMethod = [
166 headerModel.requestHeaderData(channel), 166 headerModel.requestHeaderData(channel),
167 searchApi.getSortList(Object.assign({}, {msort: '', misort: ''})), 167 searchApi.getSortList(Object.assign({}, {msort: '', misort: ''})),
168 - searchApi.getProductList(Object.assign({new: 'Y'}, searchParams)), 168 + searchApi.getProductList(Object.assign(searchParams)),
169 searchApi.getWeekNew(params) 169 searchApi.getWeekNew(params)
170 ]; 170 ];
171 171
@@ -121,6 +121,7 @@ @@ -121,6 +121,7 @@
121 <span id="brand-multi" class="multi-select">多选 +</span> 121 <span id="brand-multi" class="multi-select">多选 +</span>
122 {{/if}} 122 {{/if}}
123 </div> 123 </div>
  124 + <div data-role="all-brand"></div>
124 </div> 125 </div>
125 </div> 126 </div>
126 {{/ brand}} 127 {{/ brand}}
1 { 1 {
2 "name": "yohobuy-node", 2 "name": "yohobuy-node",
3 - "version": "5.0.11", 3 + "version": "5.0.12",
4 "private": true, 4 "private": true,
5 "description": "A New Yohobuy Project With Express", 5 "description": "A New Yohobuy Project With Express",
6 "repository": { 6 "repository": {
@@ -159,15 +159,18 @@ function checkMoreBrands(callback) { @@ -159,15 +159,18 @@ function checkMoreBrands(callback) {
159 var brandsHtml; 159 var brandsHtml;
160 var params = (location.search || '').substr(1); 160 var params = (location.search || '').substr(1);
161 161
162 - if (!moreBrandLoaded) { 162 + if(moreBrandLoaded === 'loading') {
  163 + return;
  164 + } else if (!moreBrandLoaded) {
163 165
  166 + moreBrandLoaded = 'loading';
164 $.getJSON(url, params, function(jsonData) { 167 $.getJSON(url, params, function(jsonData) {
165 168
166 if (jsonData.code === 200) { 169 if (jsonData.code === 200) {
167 170
168 if (jsonData.data) { 171 if (jsonData.data) {
169 brandsHtml = Handlebars.compile($('#yo-brands-tpl').html() || ''); 172 brandsHtml = Handlebars.compile($('#yo-brands-tpl').html() || '');
170 - $filterBrands.find('.attr-content').append(brandsHtml(jsonData.data)); 173 + $filterBrands.find('.attr-content [data-role=all-brand]').html(brandsHtml(jsonData.data));
171 } 174 }
172 175
173 moreBrandLoaded = true; 176 moreBrandLoaded = true;