修改支付金额的显示问题

This commit is contained in:
赵毅 2025-09-02 16:09:59 +08:00
parent 3fb80ce105
commit 20b03f0f02
2 changed files with 17 additions and 9 deletions

View File

@ -43,7 +43,7 @@
<view class="group-price"> <view class="group-price">
<view>{{ item.commodity_goods_info.sales_price }}/{{ <view>{{ item.commodity_goods_info.sales_price }}/{{
item.commodity_goods_info.goods_unit item.commodity_goods_info.goods_unit
}}</view> }}</view>
<!-- 运费 --> <!-- 运费 -->
<view class="goods-desc" style="margin-top: 10rpx;">运费 {{ <view class="goods-desc" style="margin-top: 10rpx;">运费 {{
item.commodity_goods_info.freight }}</view> item.commodity_goods_info.freight }}</view>
@ -461,7 +461,7 @@ export default {
} }
}); });
// //
return total; return total.toFixed(2);
} else { } else {
let total = 0; let total = 0;
this.orderList2.forEach(goods => { this.orderList2.forEach(goods => {
@ -475,7 +475,7 @@ export default {
} }
}); });
// //
return total; return total.toFixed(2);
} }
}, },
selectPayment(payment) { selectPayment(payment) {
@ -498,13 +498,16 @@ export default {
const params = { const params = {
user_id: uni.getStorageSync('userId'), user_id: uni.getStorageSync('userId'),
// TODO
is_group_buy: true, is_group_buy: true,
goods_list: this.orderList2.map(item => { goods_list: this.orderList2.map(item => {
// id // id
this.group_buy_activity_id = item.commodity_goods_info.group_buy_activity_id this.group_buy_activity_id = item.commodity_goods_info.group_buy_activity_id
const ztAddress = this.defZTAddress.find(adItem => adItem.id === item.goods_id) || {}; const ztAddress = this.defZTAddress.find(adItem => adItem.id === item.goods_id) || {};
//
const currentTime = new Date().getTime();
const startTime = new Date(item.commodity_goods_info.group_buy_activity_info?.start_time).getTime();
const endTime = new Date(item.commodity_goods_info.group_buy_activity_info?.end_time).getTime();
const isGroupBuy = currentTime >= startTime && currentTime <= endTime;
return { return {
supplier_id: item.commodity_goods_info.group_buy_activity_info.supplier_id, supplier_id: item.commodity_goods_info.group_buy_activity_info.supplier_id,
supplier_name: item.supplier_name || '', supplier_name: item.supplier_name || '',
@ -516,7 +519,7 @@ export default {
goods_and_count: [{ goods_and_count: [{
goods_id: item.commodity_goods_info.goods_id, goods_id: item.commodity_goods_info.goods_id,
count: item.count, count: item.count,
price: item.commodity_goods_info.group_buy_price price: isGroupBuy ? item.commodity_goods_info.group_buy_price : item.commodity_goods_info.sales_price
}] }]
} }
}) })

View File

@ -493,7 +493,7 @@ export default {
}); });
}); });
this.shopMoney = total; this.shopMoney = total.toFixed(2);
}, },
// //
@ -717,6 +717,11 @@ export default {
}, },
onShow() { onShow() {
this.getShopCar(); this.getShopCar();
//
this.isAllchecked = false;
this.isDaychecked = false;
this.isParcelPostchecked = false;
this.shopMoney = 0.00;
}, },
onReachBottom() { }, onReachBottom() { },