feat: 优惠券金额不足错误

This commit is contained in:
2026-07-09 11:21:34 +08:00
parent 770d2298e0
commit 7a55d303da
@@ -831,7 +831,7 @@ export default {
const params = {
id: this.id,
};
if(this.isCoupon){
if (this.isCoupon) {
params.type = -1;
}
const resp = await getGoodsDetail(params);
@@ -944,7 +944,7 @@ export default {
const params = {
id: this.id,
};
if(this.isCoupon){
if (this.isCoupon) {
params.type = -1;
}
const resp = await getGoodsSpecs(params);
@@ -1065,7 +1065,7 @@ export default {
params["specsId"] = selectTempl;
console.log("----------", params, this.isCoupon, this.orderInfo.buyDeductionValue, this.orderInfo.quantity, this.curAmount);
const buyCouponvalue = Number((this.orderInfo.buyDeduction * (this.orderInfo.quantity || 1)).toFixed(2)) || 0;
const buyCouponvalue = Number((this.orderInfo.buyDeductionValue * (this.orderInfo.quantity || 1)).toFixed(2)) || 0;
if (this.isCoupon && buyCouponvalue > this.curAmount) {
uni.showToast({