Authored by 姜枫

fix bugs

... ... @@ -89,8 +89,7 @@ const shop = {
let data = {
module: 'product',
page: 'shop-list',
title: '店铺列表',
hideBrand: true
title: '店铺列表'
};
let nav = [DataHelper.getChannelNav()];
let domain = req.params.domain;
... ... @@ -151,7 +150,7 @@ const shop = {
};
res.display('shop-list', _.assign(data, {
products: DataHelper.handleProductList(ret.productList, q),
products: DataHelper.handleProductList(ret.productList, q, false),
order: q.order
}));
} else {
... ...
... ... @@ -407,7 +407,9 @@ const helpers = {
* @param list
* @returns {*}
*/
handleProductList(list, q) {
handleProductList(list, q, showBrand) {
showBrand = typeof showBrand === 'undefined' ? true : showBrand;
if (_.isArray(list)) {
list.forEach(g => {
let goodsList = g.goodsList;
... ... @@ -426,6 +428,7 @@ const helpers = {
}
g.salesPrice = g.salesPrice || g.marketPrice;
g.defaultImages = defaultImages;
g.showBrand = showBrand;
if (g.salesPrice === g.marketPrice) {
delete g.marketPrice;
}
... ...
... ... @@ -6,7 +6,7 @@
<img class="lazy" data-original="{{image defaultImages 263 344}}" width="263" height="344" alt="">
</a>
</div>
{{#if @root.hideBrand}}
{{#if showBrand}}
<div class="goods-brand">
<a href="/product/shop/{{brandDomain}}" target="_self">{{brandName}}</a>
</div>
... ...