...
|
...
|
@@ -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;
|
...
|
...
|
|