ソースを参照

fix(SCRM-5191): 杭州、前海达到电子券上限和优惠上限的入口拦截

john 1 年間 前
コミット
b443d12178

+ 5 - 1
src/pages/parkingFee/mixins/parkingFeeDetail.js

@@ -678,7 +678,11 @@ export default {
     },
     coupon() {
       // 前海电子券上限提示逻辑补充
-      if(this.couponDesc == '当日优惠已达上线,不可用') {
+      if(this.couponDesc == '当日优惠已达上限,不可用') {
+        return
+      }
+      // 杭州电子券上限提示逻辑补充
+      if(this.couponDesc == '优惠券已达当日使用上限,不可用') {
         return
       }
       // totalFee 为零的时候不做跳转

+ 5 - 1
src/pages/parkingFeeV2/mixins/parkingFeeDetail.js

@@ -784,7 +784,11 @@ export default {
     },
     coupon() {
       // 前海电子券上限提示逻辑补充
-      if(this.couponDesc == '当日优惠已达上线,不可用') {
+      if(this.couponDesc == '当日优惠已达上限,不可用') {
+        return
+      }
+      // 杭州电子券上限提示逻辑补充
+      if(this.couponDesc == '优惠券已达当日使用上限,不可用') {
         return
       }
       // totalFee 为零的时候不做跳转

+ 8 - 4
src/store/order/coupon.js

@@ -16,9 +16,13 @@ export default {
         let bN = bTime.getTime(bTime) // 方法2
         return aN - bN;
       }
-      // 前海电子券上限提示逻辑补充
-      if(checkOutResponse.parkInfo.parkMallCode === 5 && !checkOutResponse.parkingRule.availableDiscountFee) {
-        return commit('setCouponDesc', '当日优惠已达上线,不可用');
+      // 优惠金额达到上限提示逻辑:前海
+      if([5].indexOf(checkOutResponse.parkInfo.parkMallCode) > -1 && !checkOutResponse.parkingRule.availableDiscountFee) {
+        return commit('setCouponDesc', '当日优惠已达上限,不可用');
+      }
+      // 电子券使用数量上限提示逻辑补充: 杭州
+      if([2].indexOf(checkOutResponse.parkInfo.parkMallCode) > -1 && !checkOutResponse.parkingRule.remainCoupons) {
+        return commit('setCouponDesc', '优惠券已达当日使用上限,不可用');
       }
       if ( checkOutResponse?.discountInfo?.coupons?.length ) {
         const coupons = checkOutResponse.discountInfo.coupons.sort(couponSort)
@@ -38,7 +42,7 @@ export default {
         }
         if ( checkOutResponse.discountInfo.coupons.length ) {
           return commit('setCouponDesc',`您有${ checkOutResponse.discountInfo.coupons.length }张可用优惠劵`);
-        }  
+        }
       }
       commit('setCouponDesc',`暂无可用优惠券`);
     } else {