修改支付金额的显示问题
This commit is contained in:
parent
3fb80ce105
commit
20b03f0f02
@ -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
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@ -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() { },
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user