|
@@ -744,12 +744,12 @@
|
|
|
case 0:// 活动券
|
|
|
if(coupon.productType == 1){// 活动券-全商城商品
|
|
|
if(this.allPrice >= coupon.touchPrice){
|
|
|
- eligibleCoupons = this.setCouponsArr(coupon)
|
|
|
+ eligibleCoupons.push(coupon)
|
|
|
}
|
|
|
}else if(coupon.productType == 2){// 活动券-指定商品
|
|
|
if(coupon.productIds && coupon.productIds.includes(pros.productId)){
|
|
|
if(this.allPrice >= coupon.touchPrice){
|
|
|
- eligibleCoupons = this.setCouponsArr(coupon)
|
|
|
+ eligibleCoupons.push(coupon)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -757,25 +757,25 @@
|
|
|
case 1:// 品类券适用于产品或者仪器 categoryType(commodityType) : 1 产品 2 仪器
|
|
|
if( coupon.categoryType && coupon.categoryType == pros.commodityType){
|
|
|
if(this.allPrice >= coupon.touchPrice){
|
|
|
- eligibleCoupons = this.setCouponsArr(coupon)
|
|
|
+ eligibleCoupons.push(coupon)
|
|
|
}
|
|
|
}
|
|
|
break;
|
|
|
case 2:// 用户专享券 适用于商城全部商品
|
|
|
if(this.allPrice >= coupon.touchPrice){
|
|
|
- eligibleCoupons = this.setCouponsArr(coupon)
|
|
|
+ eligibleCoupons.push(coupon)
|
|
|
}
|
|
|
break;
|
|
|
case 3:// 店铺券适用于某个供应商的全部商品
|
|
|
if(coupon.shopId && pros.supplierId == coupon.shopId){
|
|
|
if(this.allPrice >= coupon.touchPrice){
|
|
|
- eligibleCoupons = this.setCouponsArr(coupon)
|
|
|
+ eligibleCoupons.push(coupon)
|
|
|
}
|
|
|
}
|
|
|
break;
|
|
|
case 4://新用户券 适用于商城全部商品
|
|
|
if(this.allPrice >= coupon.touchPrice){
|
|
|
- eligibleCoupons = this.setCouponsArr(coupon)
|
|
|
+ eligibleCoupons.push(coupon)
|
|
|
}
|
|
|
break;
|
|
|
}
|
|
@@ -788,12 +788,6 @@
|
|
|
})
|
|
|
return eligibleCoupons;
|
|
|
},
|
|
|
- setCouponsArr(coupon){//处理
|
|
|
- const list = []
|
|
|
- list.push(coupon)
|
|
|
- list.sort((a,b)=> b.couponAmount - a.couponAmount )
|
|
|
- return list
|
|
|
- },
|
|
|
changeCountAdd(item,pros){//商品数量加加
|
|
|
if(pros.step === 2){
|
|
|
pros.isStep = false
|