Commit f42d6a87553910e473d41f62cc4b0008de396c8c

Authored by yvan.ni
1 parent b3cf1180

商品列表显示优惠活动,会显示送礼包的bug修复

pages/goods/goodsList/goodsList.js
... ... @@ -129,7 +129,7 @@ Page({
129 129 arr[i].content=content;
130 130  
131 131 //--送礼包--
132   - if(content.is_libao) {
  132 + if(parseInt(content.is_libao)) {
133 133 //-- 获取 --
134 134 await getApp().request.promiseGet("/api/weshop/libao/libaoForm/page?id="+content.libao+"&store_id="+oo.stoid, {
135 135 }).then(res => {
... ... @@ -138,7 +138,7 @@ Page({
138 138 })
139 139 }
140 140 //--送赠品--
141   - if(content.is_gift) {
  141 + if(parseInt(content.is_gift)) {
142 142 //-- 获取 --
143 143 await getApp().request.promiseGet("/api/weshop/prom/gift/page?id="+content.gift+"&store_id="+oo.stoid, {
144 144 }).then(res => {
... ...
pages/goods/goodsList/goodsList.wxml
... ... @@ -4,12 +4,12 @@
4 4 <block wx:for="{{prom_goods_list}}">
5 5 <view class="fs30 ellipsis-1" style="padding: 20rpx 30rpx">
6 6 满{{item.condition}}<text space="{{true}}" wx:if="{{item.prom_type==0}}">元 </text> <text space="{{true}}" wx:else>件 </text>
7   - <text space="{{true}}" wx:if="{{item.content.is_money}}">减{{item.content.money}}元 </text>
8   - <text space="{{true}}" wx:if="{{item.content.is_sale}}">打{{item.content.sale}}折 </text>
9   - <text space="{{true}}" wx:if="{{item.content.is_int}}">送{{item.content.int}}积分 </text>
10   - <text space="{{true}}" wx:if="{{item.content.is_coupon}}">送{{item.content.coupon}}元优惠券 </text>
11   - <text space="{{true}}" wx:if="{{item.content.is_gift}}">送{{item.content.gift_name}} </text>
12   - <text space="{{true}}" wx:if="{{item.content.is_libao}}">送{{item.content.lb_name}} </text>
  7 + <text space="{{true}}" wx:if="{{item.content.is_money && item.content.is_money!='0'}}">减{{item.content.money}}元 </text>
  8 + <text space="{{true}}" wx:if="{{item.content.is_sale && item.content.is_sale!='0'}}">打{{item.content.sale}}折 </text>
  9 + <text space="{{true}}" wx:if="{{item.content.is_int && item.content.is_int!='0'}}">送{{item.content.int}}积分 </text>
  10 + <text space="{{true}}" wx:if="{{item.content.is_coupon && item.content.is_coupon!='0'}}">送{{item.content.coupon}}元优惠券 </text>
  11 + <text space="{{true}}" wx:if="{{item.content.is_gift && item.content.is_gift!='0'}}">送{{item.content.gift_name}} </text>
  12 + <text space="{{true}}" wx:if="{{item.content.is_libao && item.content.is_libao!='0'}}">送{{item.content.lb_name}} </text>
13 13 </view>
14 14 </block>
15 15 </view>
... ...