修复判断是否有可用优惠券
This commit is contained in:
@@ -18,7 +18,8 @@ export async function returnHasCouponCanUse(args) {
|
||||
if(!res||res.length<=0){
|
||||
return false
|
||||
}
|
||||
|
||||
console.log('returnHasCouponCanUse:goodsOrderPrice',goodsOrderPrice);
|
||||
console.log('returnHasCouponCanUse:allGoods',allGoods);
|
||||
const canDikouGoodsArr = UTILS.returnCanDikouGoods(allGoods, [], user);
|
||||
for (let i = 0; i < res.length; i++) {
|
||||
const coupon = res[i]
|
||||
|
||||
@@ -126,12 +126,11 @@ export function returnCouponCanUse(args) {
|
||||
selCoupon,
|
||||
shopInfo
|
||||
} = args;
|
||||
|
||||
// 优惠券未启用
|
||||
if (!coupon.use) {
|
||||
return {
|
||||
canUse: false,
|
||||
reason: "优惠券未启用"
|
||||
reason:coupon.noUseRestrictions|| "不在可用时间段内"
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user