|
@@ -276,10 +276,8 @@ var shoppingCart = new Vue({
|
|
shop.cartList.forEach(function(pros){
|
|
shop.cartList.forEach(function(pros){
|
|
if(_self.submitIds.includes(pros.productId*1)){
|
|
if(_self.submitIds.includes(pros.productId*1)){
|
|
_self.totalCouponList.forEach(function (coupon,index){//循环优惠券
|
|
_self.totalCouponList.forEach(function (coupon,index){//循环优惠券
|
|
- console.log('asdasdasdada')
|
|
|
|
switch(coupon.couponType){
|
|
switch(coupon.couponType){
|
|
case 0:// 活动券
|
|
case 0:// 活动券
|
|
- console.log('00000000000')
|
|
|
|
if(coupon.productType == 1){// 活动券-全商城商品
|
|
if(coupon.productType == 1){// 活动券-全商城商品
|
|
if(_self.totalPrice >= coupon.touchPrice){
|
|
if(_self.totalPrice >= coupon.touchPrice){
|
|
eligibleCoupons.push(coupon)
|
|
eligibleCoupons.push(coupon)
|
|
@@ -293,7 +291,6 @@ var shoppingCart = new Vue({
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
case 1:// 品类券适用于产品或者仪器 categoryType(commodityType) : 1 产品 2 仪器
|
|
case 1:// 品类券适用于产品或者仪器 categoryType(commodityType) : 1 产品 2 仪器
|
|
- console.log('111111111111')
|
|
|
|
if( coupon.categoryType && coupon.categoryType == pros.commodityType){
|
|
if( coupon.categoryType && coupon.categoryType == pros.commodityType){
|
|
if(_self.totalPrice >= coupon.touchPrice){
|
|
if(_self.totalPrice >= coupon.touchPrice){
|
|
eligibleCoupons.push(coupon)
|
|
eligibleCoupons.push(coupon)
|
|
@@ -301,21 +298,18 @@ var shoppingCart = new Vue({
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
case 2:// 用户专享券 适用于商城全部商品
|
|
case 2:// 用户专享券 适用于商城全部商品
|
|
- console.log('2222222222')
|
|
|
|
if(_self.totalPrice >= coupon.touchPrice){
|
|
if(_self.totalPrice >= coupon.touchPrice){
|
|
eligibleCoupons.push(coupon)
|
|
eligibleCoupons.push(coupon)
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
case 3:// 店铺券适用于某个供应商的全部商品
|
|
case 3:// 店铺券适用于某个供应商的全部商品
|
|
if(coupon.shopId && pros.shopId == coupon.shopId){
|
|
if(coupon.shopId && pros.shopId == coupon.shopId){
|
|
- console.log('33333333333')
|
|
|
|
if(_self.totalPrice >= coupon.touchPrice){
|
|
if(_self.totalPrice >= coupon.touchPrice){
|
|
eligibleCoupons.push(coupon)
|
|
eligibleCoupons.push(coupon)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
case 4://新用户券 适用于商城全部商品
|
|
case 4://新用户券 适用于商城全部商品
|
|
- console.log('444444444444')
|
|
|
|
if(_self.totalPrice >= coupon.touchPrice){
|
|
if(_self.totalPrice >= coupon.touchPrice){
|
|
eligibleCoupons.push(coupon)
|
|
eligibleCoupons.push(coupon)
|
|
}
|
|
}
|