@@ -176,6 +176,19 @@
if( isScope ){
totalPrice = this.$decimal.add(totalPrice,this.$decimal.mul(this.cartList[j].price,this.cartList[j].buy_num));
}
+ // 如果排除商品
+ }else if( this.couponList[i].type_id == 3 ){
+ // 判断商品是不是在排除范围
+ var isExclude = false;
+ // 循环排除范围
+ for (let k in this.couponList[i].product_exclude) {
+ // 如果存在排除范围
+ if( this.couponList[i].product_exclude[k].product_id == this.cartList[j].product_id) isExclude = true;
+ }
+ // 不在排除内的做计算
+ if( !isExclude ){
+ totalPrice = this.$decimal.add(totalPrice,this.$decimal.mul(this.cartList[j].price,this.cartList[j].buy_num));
// 店铺券
}else{
// 折扣券以及满减券的话,计算价格
@@ -32,6 +32,7 @@
<view class="product_scope">
<text class="" v-if="item.type_id == 1">限定商品可用</text>
<text class="" v-if="item.type_id == 2">全场可用</text>
+ <text class="" v-if="item.type_id == 3">部分商品不可用</text>
</view>
<view class="coupon_info">
<view class="coupon_exp">{{item.exp_time}} 到期</view>