feat: 优惠券金额不足错误
This commit is contained in:
@@ -831,7 +831,7 @@ export default {
|
|||||||
const params = {
|
const params = {
|
||||||
id: this.id,
|
id: this.id,
|
||||||
};
|
};
|
||||||
if(this.isCoupon){
|
if (this.isCoupon) {
|
||||||
params.type = -1;
|
params.type = -1;
|
||||||
}
|
}
|
||||||
const resp = await getGoodsDetail(params);
|
const resp = await getGoodsDetail(params);
|
||||||
@@ -944,7 +944,7 @@ export default {
|
|||||||
const params = {
|
const params = {
|
||||||
id: this.id,
|
id: this.id,
|
||||||
};
|
};
|
||||||
if(this.isCoupon){
|
if (this.isCoupon) {
|
||||||
params.type = -1;
|
params.type = -1;
|
||||||
}
|
}
|
||||||
const resp = await getGoodsSpecs(params);
|
const resp = await getGoodsSpecs(params);
|
||||||
@@ -1065,7 +1065,7 @@ export default {
|
|||||||
params["specsId"] = selectTempl;
|
params["specsId"] = selectTempl;
|
||||||
console.log("----------", params, this.isCoupon, this.orderInfo.buyDeductionValue, this.orderInfo.quantity, this.curAmount);
|
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) {
|
if (this.isCoupon && buyCouponvalue > this.curAmount) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|||||||
Reference in New Issue
Block a user