增加商品券限制,过滤不满足使用条件的商品券

This commit is contained in:
2024-11-12 09:49:05 +08:00
parent 7d39bc2bee
commit c41f78fca8
5 changed files with 66 additions and 39 deletions

View File

@@ -204,14 +204,14 @@
console.log(order.value);
const res = await $activateByOrderId(option)
canDikouGoodsArr = returnNewGoodsList(order.value.detailList || [])
res.fullReductionCoupon = res.fullReductionCoupon.filter((v) => !v.use)
res.fullReductionCoupon = res.fullReductionCoupon.filter((v) => v.use)
res.productCoupon = res.productCoupon.map(v => {
const calcCoup = returnProductCoupon(v, canDikouGoodsArr, user.value)
return {
...calcCoup,
checked: false
}
});
}).filter((v) => v.use);
myQuan.res = res
myQuan.hasAjax = true;
}