Authored by htoooth

fix banner

@@ -1471,6 +1471,8 @@ const _detailDataPkg = (origin, uid, vipLevel, cookies) => { @@ -1471,6 +1471,8 @@ const _detailDataPkg = (origin, uid, vipLevel, cookies) => {
1471 isShopOpen: shopService.queryShopByBrandIdAsync(result.brandId) 1471 isShopOpen: shopService.queryShopByBrandIdAsync(result.brandId)
1472 }); 1472 });
1473 1473
  1474 + console.log(shopData);
  1475 +
1474 if (shopData.bannerImg) { 1476 if (shopData.bannerImg) {
1475 bandInfo.bgImg = shopData.bannerImg; 1477 bandInfo.bgImg = shopData.bannerImg;
1476 } 1478 }
@@ -8,6 +8,7 @@ const co = Promise.coroutine; @@ -8,6 +8,7 @@ const co = Promise.coroutine;
8 const _ = require('lodash'); 8 const _ = require('lodash');
9 9
10 const api = require('./shop-api'); 10 const api = require('./shop-api');
  11 +const DEFAULT_IMG = '01091c21f2317a64f123f1649fbbccf7ba';
11 12
12 /** 13 /**
13 * 生成缩略图 14 * 生成缩略图
@@ -120,7 +121,7 @@ exports.basisTemplateAsync = shopId => { @@ -120,7 +121,7 @@ exports.basisTemplateAsync = shopId => {
120 exports.getShopBannerAsync = (shopId) => { 121 exports.getShopBannerAsync = (shopId) => {
121 return api.shopBannerAsync(shopId).then((result) => { 122 return api.shopBannerAsync(shopId).then((result) => {
122 if (result.code === 200) { 123 if (result.code === 200) {
123 - return result.data.banner; 124 + return _.includes(result.data.banner, DEFAULT_IMG) ? '' : result.data.banner;
124 } else { 125 } else {
125 return null; 126 return null;
126 } 127 }