|
@@ -398,19 +398,20 @@ const getBaseShopData = (params) => { |
|
@@ -398,19 +398,20 @@ const getBaseShopData = (params) => { |
398
|
_getShopDecorator(params.shop_id),
|
398
|
_getShopDecorator(params.shop_id),
|
399
|
getShopBrands(params.shop_id)
|
399
|
getShopBrands(params.shop_id)
|
400
|
]).then(result => {
|
400
|
]).then(result => {
|
401
|
- result[0] = result[0] || {};
|
|
|
402
|
|
401
|
|
403
|
- _.forEach(result[0].list, item => {
|
|
|
404
|
- if (item.resourceName === 'shopTopBanner_base') {
|
|
|
405
|
- let banner = JSON.parse(item.resourceData);
|
402
|
+ if (result[0] && _.has(result[0], 'list')) {
|
|
|
403
|
+ _.forEach(result[0].list, item => {
|
|
|
404
|
+ if (item.resourceName === 'shopTopBanner_base') {
|
|
|
405
|
+ let banner = JSON.parse(item.resourceData);
|
406
|
|
406
|
|
407
|
- finalResult = _.assign(finalResult, {
|
|
|
408
|
- shopBanner: {
|
|
|
409
|
- banner: banner[0].shopSrc
|
|
|
410
|
- }
|
|
|
411
|
- });
|
|
|
412
|
- }
|
|
|
413
|
- });
|
407
|
+ finalResult = _.assign(finalResult, {
|
|
|
408
|
+ baseShopHome: {
|
|
|
409
|
+ banner: _.get(banner, 'banner[0].shopSrc', '')
|
|
|
410
|
+ }
|
|
|
411
|
+ });
|
|
|
412
|
+ }
|
|
|
413
|
+ });
|
|
|
414
|
+ }
|
414
|
|
415
|
|
415
|
if (params.multBrandShopType === '2') {
|
416
|
if (params.multBrandShopType === '2') {
|
416
|
// 转义店铺
|
417
|
// 转义店铺
|