|
@@ -1,7 +1,8 @@
|
|
-import { calculateDiscount } from "@/api/parking";
|
|
|
|
|
|
+import { calculateDiscount, getPaperCouponDescription,getConfValueOfKey } from "@/api/parking";
|
|
import {paperCouponDescription} from '@/utils/api-crm-member'
|
|
import {paperCouponDescription} from '@/utils/api-crm-member'
|
|
import { setSelected } from "@/store/order/utils";
|
|
import { setSelected } from "@/store/order/utils";
|
|
import uni from '@/utils/uniHooks';
|
|
import uni from '@/utils/uniHooks';
|
|
|
|
+import {tempParkingH5VoucherSwitchByParkMallCode} from '@/common/js/BaseDictionary'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
/*
|
|
/*
|
|
@@ -23,12 +24,27 @@ export default {
|
|
commit('setEnablePaperCoupons', false);
|
|
commit('setEnablePaperCoupons', false);
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- const res = await paperCouponDescription({
|
|
|
|
|
|
+ const siteName = tempParkingH5VoucherSwitchByParkMallCode[checkOutResponse?.parkInfo?.parkMallCode]
|
|
|
|
+ let method = paperCouponDescription;
|
|
|
|
+ // 获取config接口中的迁移开关配置
|
|
|
|
+ const new_old_discount_switch = await getConfValueOfKey('new_old_discount_switch')
|
|
|
|
+ let newOldDiscountSwitch = false
|
|
|
|
+ if(new_old_discount_switch.hasOwnProperty(siteName) && new_old_discount_switch[siteName]){
|
|
|
|
+ newOldDiscountSwitch = true
|
|
|
|
+ method = getPaperCouponDescription
|
|
|
|
+ }
|
|
|
|
+ const res = await method({
|
|
groupId: groupId,
|
|
groupId: groupId,
|
|
mallId: mallId,
|
|
mallId: mallId,
|
|
- parkMallCode: checkOutResponse?.parkInfo?.parkMallCode
|
|
|
|
|
|
+ parkMallCode: checkOutResponse?.parkInfo?.parkMallCode,
|
|
|
|
+ brandId: groupId,
|
|
|
|
+ lbsId: mallId,
|
|
})
|
|
})
|
|
- console.log(30, res)
|
|
|
|
|
|
+ if(newOldDiscountSwitch && res) {
|
|
|
|
+ commit('setEnablePaperCoupons', true);
|
|
|
|
+ commit('setPaperCouponsDesc', res)
|
|
|
|
+ return
|
|
|
|
+ }
|
|
if (res.msg === 'success' && res.data) {
|
|
if (res.msg === 'success' && res.data) {
|
|
commit('setEnablePaperCoupons', true);
|
|
commit('setEnablePaperCoupons', true);
|
|
commit('setPaperCouponsDesc', res.data)
|
|
commit('setPaperCouponsDesc', res.data)
|