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