Commit c495ca1231e598cad9290ecf6d77fbae77c2fede

Authored by vking
1 parent 20a1e7c6

商家红包活动

... ... @@ -102,6 +102,28 @@ Page({
detail: this.detail,
title:title,
})
if(this.detail.order_info && this.detail.order_info.status==3){
App.Customer.GetOrderInfo({
rid:this.options.rid
}).then(res=>{
let discount={pt:0,se:0}
res.data.discount.forEach(q=>{
if(q.checked){
if(q.owner==1){//平台
discount.pt+=parseFloat(q.price)
}else{
discount.se+=parseFloat(q.price)
}
}
})
this.setData({
discount:{
pt:discount.pt.toFixed(2),
se:discount.se.toFixed(2),
}
})
})
}
})
},
formatDatail(detail) {
... ...
... ... @@ -64,9 +64,13 @@
<view class="item-label">应收金额</view>
<view class="item-value">¥ {{detail.order_info.price}}</view>
</view>
<view class="item flex-lr">
<view class="item flex-lr" wx:if="{{discount.pt>0}}">
<view class="item-label">周到安排补贴</view>
<view class="item-value">¥ {{detail.order_info.subsidy_price}}</view>
<view class="item-value">¥ {{discount.pt||0}}</view>
</view>
<view class="item flex-lr" wx:if="{{discount.se>0}}">
<view class="item-label">商家优惠</view>
<view class="item-value">¥ {{discount.se||0}}</view>
</view>
<view class="item flex-lr">
<view class="item-label Medium">实收金额</view>
... ...
... ... @@ -7,7 +7,7 @@
<view class="name">{{checkout.sellername}}</view>
<view class="tip">送您红包</view>
<view class="money flex-cc" style="align-items: flex-end;">
<view>{{util.toFixed(card.price,0)}}</view>
<view class="Semibold">{{util.toFixed(card.price,0)}}</view>
<view class="dot">元</view>
</view>
<view class="button" bindtap="hide">知道了</view>
... ...
... ... @@ -24,6 +24,10 @@
color:rgba(255,255,255,1);
line-height:40rpx;
margin-top: 128rpx;
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
width: 250rpx;
}
.name{
height:44rpx;
... ...