Authored by htoooth

fix banner

... ... @@ -1471,6 +1471,8 @@ const _detailDataPkg = (origin, uid, vipLevel, cookies) => {
isShopOpen: shopService.queryShopByBrandIdAsync(result.brandId)
});
console.log(shopData);
if (shopData.bannerImg) {
bandInfo.bgImg = shopData.bannerImg;
}
... ...
... ... @@ -8,6 +8,7 @@ const co = Promise.coroutine;
const _ = require('lodash');
const api = require('./shop-api');
const DEFAULT_IMG = '01091c21f2317a64f123f1649fbbccf7ba';
/**
* 生成缩略图
... ... @@ -120,7 +121,7 @@ exports.basisTemplateAsync = shopId => {
exports.getShopBannerAsync = (shopId) => {
return api.shopBannerAsync(shopId).then((result) => {
if (result.code === 200) {
return result.data.banner;
return _.includes(result.data.banner, DEFAULT_IMG) ? '' : result.data.banner;
} else {
return null;
}
... ...