|
|
@@ -36,7 +36,8 @@
|
|
|
<!-- 订单信息 -->
|
|
|
<view class="section-card mt-20" style="padding: 0; overflow: hidden;">
|
|
|
<u-cell-group :border="false">
|
|
|
- <u-cell-item title="配送服务" :value="!preOrder.expressMoney ? '快递 免邮' : '快递费 ' + preOrder.expressMoney + '元'" :arrow="false"
|
|
|
+ <u-cell-item title="配送服务"
|
|
|
+ :value="!preOrder.expressMoney ? '快递 免邮' : '快递费 ' + preOrder.expressMoney + '元'" :arrow="false"
|
|
|
:title-style="{ color: '#333' }" :value-style="{ color: '#333' }"></u-cell-item>
|
|
|
<u-cell-item title="红包" :value="redPacketText" @click="showRedPacket = true"
|
|
|
:title-style="{ color: '#333' }"></u-cell-item>
|
|
|
@@ -55,7 +56,8 @@
|
|
|
<view class="order-summary">
|
|
|
<view class="total">
|
|
|
共<text class="num">{{ preOrder.totalQuantity }}</text>本
|
|
|
- <text class="reduce-text" v-if="totalDiscountAmount > 0" @click="openDiscountDetail">已降¥{{ totalDiscountAmount }}</text>
|
|
|
+ <text class="reduce-text" v-if="totalDiscountAmount > 0" @click="openDiscountDetail">已降¥{{
|
|
|
+ totalDiscountAmount }}</text>
|
|
|
合计: <text class="price">¥{{ finalTotalMoney }}</text>
|
|
|
</view>
|
|
|
<u-button type="primary" shape="circle" @click="submitOrder">提交订单</u-button>
|
|
|
@@ -72,7 +74,8 @@
|
|
|
<view class="discount-popup">
|
|
|
<view class="popup-header">
|
|
|
<text>优惠明细</text>
|
|
|
- <u-icon name="close" size="28" color="#999" class="close-icon" @click="showDiscountDetail = false"></u-icon>
|
|
|
+ <u-icon name="close" size="28" color="#999" class="close-icon"
|
|
|
+ @click="showDiscountDetail = false"></u-icon>
|
|
|
</view>
|
|
|
<view class="discount-list">
|
|
|
<view class="discount-item" v-for="(item, index) in discountDetails" :key="index">
|
|
|
@@ -149,17 +152,6 @@
|
|
|
if (this.selectedPacket && this.selectedPacket.faceMoney) {
|
|
|
total -= parseFloat(this.selectedPacket.faceMoney);
|
|
|
}
|
|
|
- // 减去分享降价金额(如果不在totalMoney中扣除的话,通常totalMoney是已经扣除了活动优惠的,但红包和分享降价可能需要客户端处理,
|
|
|
- // 不过根据截图,totalReduceMoney是单独字段,这里假设preOrder.totalMoney只扣除了discountMoney,
|
|
|
- // 如果后端已经处理了totalReduceMoney,则不需要减。但通常前端展示需要一致。
|
|
|
- // 假设totalMoney是应付金额(不含红包),是否含分享降价需确认。
|
|
|
- // 通常preOrder.totalMoney是经过服务器计算的"折后价"(扣除了discountMoney)。
|
|
|
- // 这里暂时保持原逻辑:只减红包。如果分享降价也需要客户端减,请根据实际情况调整。
|
|
|
- // 假设 totalMoney 已经包含了 discountMoney 的扣减,但不包含红包。
|
|
|
- // 关于分享降价,通常也是作为一种支付前扣减。如果后端没扣,这里可能需要减。
|
|
|
- // 鉴于截图preOrder中有totalReduceMoney,且totalMoney为29.92。
|
|
|
- // 保险起见,先维持原逻辑(只减红包),除非用户明确说totalMoney没扣分享降价。
|
|
|
- // 但用户说"选中的红包减去的金额也要加上...还要再加上分享降价的金额",这是指展示的"已降"金额。
|
|
|
return total < 0 ? '0.00' : total.toFixed(2);
|
|
|
},
|
|
|
totalDiscountAmount() {
|
|
|
@@ -183,7 +175,7 @@
|
|
|
// 1. 惊喜红包 (红包)
|
|
|
if (this.selectedPacket && this.selectedPacket.faceMoney > 0) {
|
|
|
list.push({
|
|
|
- label: '惊喜红包',
|
|
|
+ label: this.selectedPacket.couponName,
|
|
|
amount: parseFloat(this.selectedPacket.faceMoney).toFixed(2)
|
|
|
});
|
|
|
}
|