Showing
2 changed files
with
3 additions
and
49 deletions
@@ -135,46 +135,6 @@ const _getShopCategory = (shopId, channel, gender) => { | @@ -135,46 +135,6 @@ const _getShopCategory = (shopId, channel, gender) => { | ||
135 | }; | 135 | }; |
136 | 136 | ||
137 | /** | 137 | /** |
138 | - * 獲取店鋪優惠券 | ||
139 | - * @private | ||
140 | - */ | ||
141 | -const _shopCouponsList = (shopId, uid) => { | ||
142 | - let params = { | ||
143 | - method: 'shop.coupons.list', | ||
144 | - shop_id: shopId | ||
145 | - }; | ||
146 | - | ||
147 | - if (uid) { | ||
148 | - _.assign(params, {uid: uid}); | ||
149 | - } | ||
150 | - | ||
151 | - return api.get('', params, {code: 200}).then(result => { | ||
152 | - if (result.data) { | ||
153 | - let shopCoupons = []; | ||
154 | - | ||
155 | - _.forEach(result.data, value => { | ||
156 | - let couPonstatus = parseInt(value.status, 10); | ||
157 | - | ||
158 | - if (couPonstatus === 1 || couPonstatus === 3) { | ||
159 | - shopCoupons.push({ | ||
160 | - validity: value.couponValidity, | ||
161 | - id: crypto.encryption('', value.coupon_id + ''), | ||
162 | - name: value.coupon_name, | ||
163 | - pic: value.coupon_pic, | ||
164 | - money: parseInt(value.money, 10), | ||
165 | - status: couPonstatus === 1 | ||
166 | - }); | ||
167 | - } | ||
168 | - }); | ||
169 | - | ||
170 | - return shopCoupons; | ||
171 | - } else { | ||
172 | - return []; | ||
173 | - } | ||
174 | - }); | ||
175 | -}; | ||
176 | - | ||
177 | -/** | ||
178 | * TODO TAR 店铺和品牌收藏状态调用新的接口 | 138 | * TODO TAR 店铺和品牌收藏状态调用新的接口 |
179 | * 调用接口获取品牌或者店铺的收藏状态 | 139 | * 调用接口获取品牌或者店铺的收藏状态 |
180 | * @private | 140 | * @private |
@@ -558,8 +518,7 @@ const getShopData = (req, shopId, uid, isApp) => { | @@ -558,8 +518,7 @@ const getShopData = (req, shopId, uid, isApp) => { | ||
558 | brand: brandData.join(','), | 518 | brand: brandData.join(','), |
559 | order: '0', | 519 | order: '0', |
560 | channel: channel | 520 | channel: channel |
561 | - }), | ||
562 | - _shopCouponsList(shopId, uid) | 521 | + }) |
563 | ]).then((result) => { | 522 | ]).then((result) => { |
564 | shopData = { | 523 | shopData = { |
565 | decorator: shopDeco, // 店铺装修资源数据 | 524 | decorator: shopDeco, // 店铺装修资源数据 |
@@ -577,9 +536,6 @@ const getShopData = (req, shopId, uid, isApp) => { | @@ -577,9 +536,6 @@ const getShopData = (req, shopId, uid, isApp) => { | ||
577 | shopFilterSearchData.goods = productProcess.processProductList(result[0].product_list || [], {isApp: isApp}); | 536 | shopFilterSearchData.goods = productProcess.processProductList(result[0].product_list || [], {isApp: isApp}); |
578 | } | 537 | } |
579 | 538 | ||
580 | - /* 店铺优惠券 */ | ||
581 | - let shopCoupons = result[1] || []; | ||
582 | - | ||
583 | // 店铺分类 | 539 | // 店铺分类 |
584 | return _getShopCategory(shopId, channel).then(shopCategory => { | 540 | return _getShopCategory(shopId, channel).then(shopCategory => { |
585 | 541 | ||
@@ -594,9 +550,7 @@ const getShopData = (req, shopId, uid, isApp) => { | @@ -594,9 +550,7 @@ const getShopData = (req, shopId, uid, isApp) => { | ||
594 | { | 550 | { |
595 | shopId: shopId, | 551 | shopId: shopId, |
596 | uid: uid ? crypto.encryption('', uid + '') : '', | 552 | uid: uid ? crypto.encryption('', uid + '') : '', |
597 | - coverChannel: channel, | ||
598 | - shopCoupons: shopCoupons, | ||
599 | - shopCouponsOne: shopCoupons.length === 1 | 553 | + coverChannel: channel |
600 | } | 554 | } |
601 | ); | 555 | ); |
602 | }); | 556 | }); |
-
Please register or login to post a comment