Commit 725b3df97af4877a8977b56713ce3faa56495403
1 parent
1977e948
优惠活动送礼包,在商品列表的时候,正确显示券的金额
Showing
2 changed files
with
13 additions
and
1 deletions
pages/goods/goodsList/goodsList.js
... | ... | @@ -280,6 +280,17 @@ Page({ |
280 | 280 | var content=JSON.parse(arr[i].preferential_type); |
281 | 281 | arr[i].content=content; |
282 | 282 | |
283 | + | |
284 | + //--送礼包-- | |
285 | + if(parseInt(content.is_coupon)) { | |
286 | + //-- 获取 -- | |
287 | + await getApp().request.promiseGet("/api/weshop/prom/coupon/get/"+content.coupon, { | |
288 | + }).then(res => { | |
289 | + if(res.data.code==0 && res.data.data ) | |
290 | + arr[i].content.coupon_money=res.data.data.money; | |
291 | + }) | |
292 | + } | |
293 | + | |
283 | 294 | //--送礼包-- |
284 | 295 | if(parseInt(content.is_libao)) { |
285 | 296 | //-- 获取 -- | ... | ... |
pages/goods/goodsList/goodsList.wxml
... | ... | @@ -10,13 +10,14 @@ |
10 | 10 | <text space="{{true}}" wx:if="{{item.content.past && item.content.past!='0'}}">包邮 </text> |
11 | 11 | <text space="{{true}}" wx:if="{{item.content.is_sale && item.content.is_sale!='0'}}">打{{item.content.sale}}折 </text> |
12 | 12 | <text space="{{true}}" wx:if="{{item.content.is_int && item.content.is_int!='0'}}">送{{item.content.int}}积分 </text> |
13 | - <text space="{{true}}" wx:if="{{item.content.is_coupon && item.content.is_coupon!='0'}}">送{{item.content.coupon}}元优惠券 </text> | |
13 | + <text space="{{true}}" wx:if="{{item.content.is_coupon && item.content.is_coupon!='0'}}">送{{item.content.coupon_money}}元优惠券 </text> | |
14 | 14 | <text space="{{true}}" wx:if="{{item.content.is_gift && item.content.is_gift!='0'}}">送{{item.content.zp_mode==1?'多赠品':item.content.gift_name}} </text> |
15 | 15 | <text space="{{true}}" wx:if="{{item.content.is_libao && item.content.is_libao!='0'}}">送{{item.content.lb_name}} </text> |
16 | 16 | <text space="{{true}}" wx:if="{{item.content.is_zxlibao && item.content.is_zxlibao!='0'}}">送{{item.content.zxlb_name}} </text> |
17 | 17 | <text space="{{true}}" wx:if="{{item.content.is_monthgiftbag && item.content.is_monthgiftbag!='0'}}">送{{item.content.monthgift_name}} </text> |
18 | 18 | </view> |
19 | 19 | </block> |
20 | + | |
20 | 21 | <!-- 新增 --> |
21 | 22 | <view wx:if="{{jieti_prom}}" class="fs30 ellipsis-1" style="padding: 20rpx">阶梯促销:{{jieti_prom}}</view> |
22 | 23 | ... | ... |