Authored by 郭成尧

search-ol-bug

... ... @@ -237,6 +237,10 @@ const brand = (req, res, next) => {
}
listModel.getBrandLogoByDomain(domain).then(result => {
if (!result) {
return next();
}
brandLogo = result;
title = brandLogo.name;
... ...
... ... @@ -942,13 +942,10 @@ let _getPromotionInfo = (skn) => {
method: 'app.product.promotion',
product_skn: _.toString(skn)
}, {
code: 200,
cache: true
}).then((result) => {
if (result.code === 200) {
return result.data;
}
return {};
return result && result.data;
});
};
... ...
... ... @@ -599,7 +599,7 @@ const getBrandIntro = (brandId, uid) => {
code: 200,
cache: true
}).then(result => {
if (result && result.data) {
let list = result.data;
return {
... ... @@ -608,7 +608,9 @@ const getBrandIntro = (brandId, uid) => {
collected: list.is_favorite && list.is_favorite === 'Y',
title: list.brand_name ? list.brand_name : ''
};
} else {
return false;
}
});
};
... ... @@ -650,7 +652,7 @@ const getBrandLogoByDomain = (domain) => {
code: 200,
cache: true
}).then(result => {
if (result.data) {
if (result && result.data) {
let formatData = result.data;
return {
... ...