修复:内测问题修改:免费课程及课程详情代码优化、积分支付默认值、书籍价格显示

This commit is contained in:
2025-12-01 16:39:58 +08:00
parent cd54ee48de
commit 1049030a46
15 changed files with 520 additions and 799 deletions

View File

@@ -290,7 +290,11 @@ const handlePointsInput = (value: any) => {
}
// 重新计算实付款
calculateFinalPrice()
const result = Math.max(
0,
totalAmount.value - pointsDiscounted.value - promotionDiscounted.value - vipDiscounted.value
)
finalAmount.value = result
}
/**
@@ -314,9 +318,11 @@ const calculateFinalPrice = () => {
props?.userInfo?.jf || 0,
Math.floor(orderAmountAfterDiscount - couponAmount)
)
pointsDiscounted.value = pointsUsableMax.value
// 限制当前积分不超过最大值
if (pointsDiscounted.value > pointsUsableMax.value) {
if (pointsDiscounted.value >= pointsUsableMax.value) {
pointsDiscounted.value = pointsUsableMax.value
}