积分问题修复

This commit is contained in:
2025-09-30 17:42:28 +08:00
parent 31e386bd3c
commit b2cb18b114
7 changed files with 141 additions and 135 deletions

View File

@@ -470,22 +470,16 @@
shopUserId: props.orderVIP.id,
orderAmount: maxMoney.value
})
console.log(res);
Object.assign(pointsRes, res)
const maxUsablePoints = res.maxUsablePoints
maxPointDiscount.value = res.maxDeductionAmount
// props.listinfo.pointsDiscountAmount = await APImemberPointscalcDeductionAmount({
// points: maxUsablePoints,
// shopUserId: props.orderVIP.id,
// orderAmount: maxMoney
// })
if (usePoints.value) {
cartStore.setUserPoints(maxUsablePoints)
}
cartStore.setUserPoints(res.maxUsablePoints||0)
console.log('getMaxPointsDiscount:cartStore.orderCostSummary.pointUsed', cartStore.orderCostSummary.pointUsed);
}
watch(() => maxMoney.value, (newval) => {
console.log('maxMoney.value', newval);
getMaxPointsDiscount()
if (usePoints.value) {
getMaxPointsDiscount()
}
})
watch(() => usePoints.value, (newval) => {
if (newval) {
@@ -493,6 +487,7 @@
} else {
cartStore.setUserPoints(0)
}
})
const handleConfirm = async (integral) => {
@@ -532,7 +527,7 @@
calcUsablePointsData.integral = null
props.listinfo.pointsDiscountAmount = 0
calcUsablePointsData.showModal = false
cartStore.setUserPoints(0);
// cartStore.setUserPoints(0);
}
// * 复制订单号