Browse Source

feat(KIP-17684): 移除纸质优惠券和buildingId

john 1 year ago
parent
commit
c4399e9238
2 changed files with 9 additions and 7 deletions
  1. 1 1
      src/store/order/index.js
  2. 8 6
      src/store/order/paperCoupon.js

+ 1 - 1
src/store/order/index.js

@@ -84,7 +84,7 @@ export default {
       dispatch('paperCouponRule', checkOutResponse)
       // 是否展示优惠
       commit('setIsShowDiscounts',isShowDiscounts);
-      if ( checkOutResponse.parkingRule ) {
+      if ( checkOutResponse.parkingRule && this.isLogin === 'haveLoggedIn') {
         // 会员等级减免
         // 停车优惠(首停、会员减免、消费减免)
         dispatch('getCheckedTotal',checkOutResponse);

+ 8 - 6
src/store/order/paperCoupon.js

@@ -1,8 +1,10 @@
-import { calculateDiscount, getPaperCouponDescription,getConfValueOfKey } from "@/api/parking";
-import {paperCouponDescription} from '@/utils/api-crm-member'
+import { calculateDiscount, 
+  // getPaperCouponDescription,getConfValueOfKey
+ } from "@/api/parking";
+// import {paperCouponDescription} from '@/utils/api-crm-member'
 import { setSelected } from "@/store/order/utils";
 import uni from '@/utils/uniHooks'; 
-import {tempParkingH5VoucherSwitchByParkMallCode} from '@/common/js/BaseDictionary'
+// import {tempParkingH5VoucherSwitchByParkMallCode} from '@/common/js/BaseDictionary'
 
 export default {
   /*
@@ -35,9 +37,9 @@ export default {
         dispatch('setDiscountFee')
       }
     }
-    if(checkOutResponse?.parkInfo.hasOwnProperty('enablePaperCoupons')) {
-      commit('setEnablePaperCoupons', checkOutResponse.parkInfo.enablePaperCoupons);
-      commit('setPaperCouponsDesc', checkOutResponse.parkInfo.paperDiscountDescription)
+    if(checkOutResponse?.parkingRule.hasOwnProperty('enablePaperCoupons')) {
+      commit('setEnablePaperCoupons', checkOutResponse.parkingRule.enablePaperCoupons);
+      commit('setPaperCouponsDesc', checkOutResponse.parkingRule.paperDiscountDescription)
     }
   },
   async savePaperCoupon( {commit,dispatch,state},{paperCoupons,callback} ) {