修改支付金额的显示问题
This commit is contained in:
parent
3fb80ce105
commit
20b03f0f02
@ -461,7 +461,7 @@ export default {
|
||||
}
|
||||
});
|
||||
// 加运费
|
||||
return total;
|
||||
return total.toFixed(2);
|
||||
} else {
|
||||
let total = 0;
|
||||
this.orderList2.forEach(goods => {
|
||||
@ -475,7 +475,7 @@ export default {
|
||||
}
|
||||
});
|
||||
// 加运费
|
||||
return total;
|
||||
return total.toFixed(2);
|
||||
}
|
||||
},
|
||||
selectPayment(payment) {
|
||||
@ -498,13 +498,16 @@ export default {
|
||||
|
||||
const params = {
|
||||
user_id: uni.getStorageSync('userId'),
|
||||
// TODO 应该判断是否为团购
|
||||
is_group_buy: true,
|
||||
goods_list: this.orderList2.map(item => {
|
||||
// 团购活动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 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 {
|
||||
supplier_id: item.commodity_goods_info.group_buy_activity_info.supplier_id,
|
||||
supplier_name: item.supplier_name || '',
|
||||
@ -516,7 +519,7 @@ export default {
|
||||
goods_and_count: [{
|
||||
goods_id: item.commodity_goods_info.goods_id,
|
||||
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
|
||||
}]
|
||||
}
|
||||
})
|
||||
|
||||
@ -493,7 +493,7 @@ export default {
|
||||
});
|
||||
});
|
||||
|
||||
this.shopMoney = total;
|
||||
this.shopMoney = total.toFixed(2);
|
||||
},
|
||||
|
||||
// 减少数量
|
||||
@ -717,6 +717,11 @@ export default {
|
||||
},
|
||||
onShow() {
|
||||
this.getShopCar();
|
||||
// 取消所有选中状态并重置金额
|
||||
this.isAllchecked = false;
|
||||
this.isDaychecked = false;
|
||||
this.isParcelPostchecked = false;
|
||||
this.shopMoney = 0.00;
|
||||
},
|
||||
onReachBottom() { },
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user