Browse Source

购物车多个有门票禁用优惠券

master
jiazhipeng 2 years ago
parent
commit
ea84089b01
  1. 11
      pages/order/orderList/index.js
  2. 12
      pages/order/orderList/index.wxml

11
pages/order/orderList/index.js

@ -22,7 +22,10 @@ Page({
allowance_data: null,
allowance_price: 0,
flag:null,
linkmanList:[]
linkmanList:[],
finalPrice: 0,
showCoupon: false,
},
/**
@ -35,6 +38,7 @@ Page({
kjId: app.globalData.kjId,
gp_id: app.globalData.gp_id || app.globalData.team_id,
flag:options.flag,
showCoupon: (app.globalData.list || []).length<=0,
// linkmanList: app.globalData.linkmanList
})
console.log('-------------',this.data.ticketList);
@ -94,10 +98,12 @@ Page({
coupon: null
})
}
this.setData({
showPrice: app.globalData.kjId ? 0 : price
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
@ -117,6 +123,9 @@ Page({
coupon:e.detail
})
},
/**
* 生命周期函数--监听页面显示
*/

12
pages/order/orderList/index.wxml

@ -66,12 +66,20 @@
<view style="flex-shrink:0">订单备注:</view>
<input type="text" bindinput="inputRemark" data-index="{{index}}" placeholder="选填"></input>
</view> -->
<coupon bind:getNewCoupon = 'getNewCoupon' id="coupon" wx:if="{{!kjId && !gp_id}}" money="{{showPrice + postFee}}" sku="{{sku_id}}"></coupon>
<coupon bind:getNewCoupon = 'getNewCoupon' id="coupon" wx:if="{{showCoupon && !kjId && !gp_id}}" money="{{showPrice + postFee}}" sku="{{sku_id}}"></coupon>
<view class="fixed-bottom">
<view class="fixed-price-box">
<text>合计:</text>
<view wx:if="{{coupon && coupon.activity.discount_type != 'pricebreak'}}">
<text>合计:</text><text
class="price">¥{{((showPrice + postFee)* coupon.activity.fold/10)>0?((showPrice + postFee)* coupon.activity.fold/10)/100:0}}</text>
</view>
<view wx:else>
<text>合计:</text>
<text class="price">¥{{((showPrice + postFee - (coupon?coupon.activity.money:0))>0?(showPrice + postFee - (coupon?coupon.activity.money:0)):0)/100}}</text>
</view>
</view>
<view class="fixed-btn" bindtap="order">下一步</view>
</view>
Loading…
Cancel
Save