Authored by liuyue

商品信息显示最小类目

... ... @@ -118,17 +118,19 @@ var g = new common.grid({
render: function(item) {
var productName = item.productName ? item.productName : '',
brandName = item.brandName ? item.brandName : '',
maxSortName = item.maxSortName ? item.maxSortName : '',
middleSortName = item.middleSortName ? item.middleSortName : '',
sortName = '',
html = '';
if (item.smallSortName) {
sortName = item.smallSortName
} else if (item.middleSortName) {
sortName = item.middleSortName;
} else {
sortName = item.maxSortName;
}
html += '<p><strong>名称:</strong><a target="_blank" href="' + item.productUrl + '">' + productName + '</a></p>';
html += '<p><strong>品牌:</strong>' + brandName + '</p>';
html += '<p><strong>类目:</strong>' + maxSortName;
if (middleSortName) {
html += '/' + middleSortName;
}
html += '<p><strong>类目:</strong>' + sortName;
return html + '</p>';
}
}, {
... ...