brand-relation.js
778 Bytes
var $ = require('jquery'),
common = require('../../common/common');
common.util.__ajax({
url: '/goods/brands/queryBrandsByStatus'
}, function(res) {
//console.log(res);
var data = res.data;
var html = '',
brandHtml = '';
var aLif = null;
$.each(data, function(i, value) {
//console.log(aLif, value.brandAlif);
aLif = value.brandAlif;
/*if (aLif != value.brandAlif) {
aLif = value.brandAlif;
html += '<div class="col-sm-2">' + aLif + '</div>';
brandHtml += '<div class="col-sm-10"><label><input tyoe="checkbox" value="' + value.id + '">' + value.brandName + '</label>';
} else {
brandHtml += '<label><input tyoe="checkbox" value="' + value.id + '">' + value.brandName + '</label>';
}*/
});
//$('.brand-list').html(html + brandHtml);
}, true);