Authored by 郭成尧

search-brand-list

... ... @@ -216,13 +216,13 @@ const brand = (req, res, next) => {
// 从搜索页过来的,显示搜索框, 和进入品牌引导信息 或者品牌关联多店铺
if (req.query.from === 'search' || brandShop.length > 0) {
params = {
brandWay: brandShop ? brandShop : brandLogo,
params = _.assign({
brandWay: _.isEmpty(brandShop) ? brandLogo : brandShop,
search: {
default: req.query.query,
url: helpers.urlFormat('', null, 'search')
}
};
}, params);
} else if (brandId !== 0) { // 品牌一览过来的展示品牌介绍和LOGO
return Promise.all([listModel.getBrandIntro(brandId, uid), listModel.getBrandBanner(brandId)]).then((resData) => { //eslint-disable-line
title = resData[0].title;
... ...
... ... @@ -647,10 +647,10 @@ const getBrandLogoByDomain = (domain) => {
return {
id: formatData.id,
url: helpers.urlFormat('', null, formatData.brandDomain),
thumb: helpers.image(formatData.brandIco, 75, 40),
url: helpers.urlFormat('', null, formatData.brand_domain),
thumb: helpers.image(formatData.brand_ico, 75, 40),
name: formatData.brand_name,
shopId: formatData.shop_id ? formatData.shop_id : 0, // 店铺id
shopId: formatData.id ? formatData.id : 0, // 店铺id
type: formatData.type ? formatData.type : 0
};
} else {
... ... @@ -672,10 +672,10 @@ const getBrandShops = (brandId) => {
code: 200,
cache: true
}).then(result => {
if (result.data) {
if (_.isArray(result.data)) {
return _processBrandShops(result.data);
} else {
return {};
return [];
}
});
};
... ...