Authored by microTT

bug 362 参展品牌搜索先显示匹配度高的品牌

... ... @@ -465,9 +465,8 @@ define('yohood', function(require, exports) {
for (i = 0, len = brands.length; i < len; i++) {
brandName = brands[i].name;
console.log(brand[i]);
if (brandName.indexOf(sortBase) === 0) {
brands.splice(i, 1).concat(brands);
brands = brands.splice(i, 1).concat(brands);
}
}
... ... @@ -493,7 +492,7 @@ define('yohood', function(require, exports) {
success: function(data) {
var brands = data.data;
if (data.code == 200 && brands != "") {
// brands = that.brandSort(brands, brand);
brands = that.brandSort(brands, brand);
$.each(brands, function(k, v) {
html += '<li><a href="javascript:;" target="_blank" title="' + v.name + '"><div class="img-box" brand_id="' + v.id + '">' +
'<img class="grey-brand-logo" width="145" height="97" src="' + common.getImages(v.logo, 'source', 'blogimg', 'primary') + '" alt="" alt="' + v.name + '"></div>' +
... ...