'base-shop-banner-show'
Showing
1 changed file
with
20 additions
and
21 deletions
@@ -135,6 +135,26 @@ const _getShopCategory = (shopId, channel) => { | @@ -135,6 +135,26 @@ const _getShopCategory = (shopId, channel) => { | ||
135 | }; | 135 | }; |
136 | 136 | ||
137 | /** | 137 | /** |
138 | + * 获取店铺下面的所有品牌 | ||
139 | + * @param {int} shopId 店铺id | ||
140 | + */ | ||
141 | +const getShopBrands = (shopId) => { | ||
142 | + return api.get('', { | ||
143 | + method: 'app.shops.getShopsBrands', | ||
144 | + shop_id: shopId | ||
145 | + }).then((result) => { | ||
146 | + if (result && result.code === 200) { | ||
147 | + result = camelCase(result.data); | ||
148 | + return result[0].brandId; | ||
149 | + } else { | ||
150 | + logger.error('gGet all the brands under the shop return code is not 200'); | ||
151 | + return {}; | ||
152 | + } | ||
153 | + }); | ||
154 | +}; | ||
155 | + | ||
156 | + | ||
157 | +/** | ||
138 | * 组织店铺页面数据 | 158 | * 组织店铺页面数据 |
139 | * @param {array} data 接口返回的店铺页所需数据 | 159 | * @param {array} data 接口返回的店铺页所需数据 |
140 | * @param {int} shopId 店铺id | 160 | * @param {int} shopId 店铺id |
@@ -623,27 +643,6 @@ const getShopIntro = (shopId) => { | @@ -623,27 +643,6 @@ const getShopIntro = (shopId) => { | ||
623 | }); | 643 | }); |
624 | }; | 644 | }; |
625 | 645 | ||
626 | -/** | ||
627 | - * 获取店铺下面的所有品牌 | ||
628 | - * @param {int} shopId 店铺id | ||
629 | - */ | ||
630 | -const getShopBrands = (shopId) => { | ||
631 | - return api.get('', { | ||
632 | - method: 'app.shops.getShopsBrands', | ||
633 | - shop_id: shopId | ||
634 | - }).then((result) => { | ||
635 | - if (result && result.code === 200) { | ||
636 | - result = camelCase(result.data); | ||
637 | - return result[0].brandId; | ||
638 | - } else { | ||
639 | - logger.error('gGet all the brands under the shop return code is not 200'); | ||
640 | - return {}; | ||
641 | - } | ||
642 | - }); | ||
643 | -}; | ||
644 | - | ||
645 | - | ||
646 | - | ||
647 | module.exports = { | 646 | module.exports = { |
648 | getBaseShopData, | 647 | getBaseShopData, |
649 | getShopData, | 648 | getShopData, |
-
Please register or login to post a comment