Authored by 周少峰

Merge branch 'master' into release/5.1

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