@pisell/private-materials 6.4.75 → 6.4.76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +2 -2
- package/build/lowcode/preview.js +7 -7
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +9 -9
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +9 -9
- package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
- package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Cart/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Voucher/index.js +2 -1
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +1 -0
- package/es/components/booking/addons/index.js +20 -17
- package/es/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
- package/es/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -0
- package/es/components/booking/components/collapsibleList/utils.d.ts +1 -0
- package/es/components/booking/components/emptyBooking/index.d.ts +1 -0
- package/es/components/booking/components/footer/FooterMenus/index.d.ts +1 -0
- package/es/components/booking/components/footer/utils.d.ts +5 -0
- package/es/components/booking/components/footer/utils.js +86 -54
- package/es/components/booking/components/reloadResourceModal/index.d.ts +1 -0
- package/es/components/booking/components/voucher/index.js +20 -6
- package/es/components/booking/forms/footer.d.ts +1 -0
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
- package/es/components/booking/forms/single/index.d.ts +1 -0
- package/es/components/booking/hooks/useClearCart.d.ts +1 -0
- package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
- package/es/components/booking/info/date/index.d.ts +1 -0
- package/es/components/booking/info/dateRange/index.d.ts +1 -0
- package/es/components/booking/info/service/actions/index.d.ts +1 -0
- package/es/components/booking/info/service2/utils.js +1 -0
- package/es/components/booking/info2/service/actions/index.d.ts +1 -0
- package/es/components/booking/info2/service/addService/index.js +2 -3
- package/es/components/booking/info2/service/contactInfoMode/index.d.ts +1 -0
- package/es/components/booking/materiels/contacts/index.d.ts +1 -0
- package/es/components/booking/materiels/duration/index.d.ts +1 -0
- package/es/components/booking/materiels/startTime/index.d.ts +1 -0
- package/es/components/booking/notes/NoteBlock/NoteItem/index.d.ts +1 -0
- package/es/components/booking/utils.d.ts +1 -0
- package/es/components/booking/utils.js +16 -3
- package/es/components/eftpos/index.d.ts +1 -0
- package/es/components/eftpos/pos.d.ts +1 -0
- package/es/components/eftposPay/amount.d.ts +1 -0
- package/es/components/eftposPay/component/fail/failCustom.d.ts +1 -0
- package/es/components/eftposPay/component/fail/network.d.ts +1 -0
- package/es/components/eftposPay/component/fail/unknow.d.ts +1 -0
- package/es/components/eftposPay/component/manual/index.d.ts +1 -0
- package/es/components/eftposPay/component/signature/index.d.ts +1 -0
- package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +14 -6
- package/es/components/eftposPay/pay.d.ts +1 -0
- package/es/components/eftposPay/payo/config.d.ts +1 -0
- package/es/components/eftposPay/payo/config.js +70 -32
- package/es/components/eftposPay/payo/payment.d.ts +66 -0
- package/es/components/eftposPay/payo/payment.js +579 -0
- package/es/components/eftposPay/tip.d.ts +1 -0
- package/es/components/eftposPay/utils/log/index.d.ts +110 -0
- package/es/components/eftposPay/utils/log/index.js +371 -0
- package/es/components/eftposPay/windcave/receiptAction.d.ts +1 -0
- package/es/components/eftposPay/windcave/windcave.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
- package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
- package/es/components/login/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +6 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/utils.js +4 -2
- package/es/components/pay/toC/index.js +5 -3
- package/es/components/pay/toC/status.d.ts +1 -0
- package/es/components/pay/toC/status.js +3 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
- package/es/components/ruleSetting/ruleBorder/index.d.ts +1 -0
- package/es/components/schedules/calendar/index.d.ts +1 -0
- package/es/components/schedules/components/ScheduleDetailList/index.d.ts +1 -0
- package/es/components/schedules/components/ScheduleList/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/index.d.ts +1 -0
- package/es/components/schedules/products/list/ProductItem/index.d.ts +1 -0
- package/es/components/schedules/products/list/index.d.ts +1 -0
- package/es/components/schedules/resources/index.d.ts +1 -0
- package/es/components/schedules/resources/list/index.d.ts +1 -0
- package/es/components/schedules/schedules/AllSchedules/index.d.ts +1 -0
- package/es/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -0
- package/es/components/schedules/schedules/index.d.ts +1 -0
- package/es/components/shoppingCart/hooks/useAddService.d.ts +1 -0
- package/es/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
- package/es/components/shoppingCart/index.d.ts +1 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +3 -3
- package/es/components/ticketBooking/utils/index.d.ts +3 -0
- package/es/components/ticketBooking/utils/index.js +36 -13
- package/es/components/wallet/Detail/index.js +34 -2
- package/es/components/wallet/Detail/index.less +11 -0
- package/es/components/wallet/Detail/locales.d.ts +6 -0
- package/es/components/wallet/Detail/locales.js +14 -2
- package/es/components/wallet/Voucher/index.js +11 -10
- package/es/components/wallet/components/WalletCard.js +5 -1
- package/es/components/wallet/hooks/useWalletCard.d.ts +1 -0
- package/es/components/wallet/index.js +4 -2
- package/es/components/wallet/serve.d.ts +7 -0
- package/es/components/wallet/utils.d.ts +48 -0
- package/es/components/wallet/utils.js +342 -0
- package/es/hooks/usePaymentLogger.d.ts +1 -0
- package/es/index.d.ts +1 -0
- package/es/index.js +2 -1
- package/es/plus/saasCreateOrganization/components/Header.d.ts +1 -0
- package/es/plus/saasRegister/components/EntryEmail.d.ts +1 -0
- package/es/plus/saasRegister/components/EntryInfo.d.ts +1 -0
- package/es/plus/saasRegister/components/GoLogin.d.ts +1 -0
- package/es/plus/saasRegister/components/Header.d.ts +1 -0
- package/es/plus/saasRegister/components/VerifyError.d.ts +1 -0
- package/es/plus/saasRegister/components/VerifyingLink.d.ts +1 -0
- package/es/plus/saasRegister/components/VertifyEmail.d.ts +1 -0
- package/es/plus/walletEditor/components/relationProduct/index.d.ts +1 -0
- package/es/plus/walletPassGallery/components/footerButton/index.js +2 -4
- package/es/plus/walletPassGallery/components/footerButton/index.less +14 -59
- package/es/plus/walletPassGallery/components/passDetail/index.d.ts +1 -0
- package/es/plus/walletPassGallery/components/passDetail/index.js +84 -31
- package/es/plus/walletPassGallery/components/passDetail/index.less +4 -0
- package/es/plus/walletPassGallery/components/passList/index.d.ts +1 -0
- package/es/plus/walletPassGallery/components/recharge/index.js +19 -8
- package/es/plus/walletPassGallery/components/timelineSection/index.d.ts +1 -0
- package/es/plus/walletPassGallery/index.js +7 -3
- package/es/plus/walletPassGallery/serve.d.ts +3 -0
- package/es/plus/walletPassGallery/serve.js +4 -2
- package/es/pro/Login2.0/index.less +15 -8
- package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Cart/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Voucher/index.js +2 -1
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +1 -0
- package/lib/components/booking/addons/index.js +10 -7
- package/lib/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
- package/lib/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -0
- package/lib/components/booking/components/collapsibleList/utils.d.ts +1 -0
- package/lib/components/booking/components/emptyBooking/index.d.ts +1 -0
- package/lib/components/booking/components/footer/FooterMenus/index.d.ts +1 -0
- package/lib/components/booking/components/footer/utils.d.ts +5 -0
- package/lib/components/booking/components/footer/utils.js +53 -32
- package/lib/components/booking/components/reloadResourceModal/index.d.ts +1 -0
- package/lib/components/booking/components/voucher/index.js +21 -7
- package/lib/components/booking/forms/footer.d.ts +1 -0
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
- package/lib/components/booking/forms/single/index.d.ts +1 -0
- package/lib/components/booking/hooks/useClearCart.d.ts +1 -0
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
- package/lib/components/booking/info/date/index.d.ts +1 -0
- package/lib/components/booking/info/dateRange/index.d.ts +1 -0
- package/lib/components/booking/info/service/actions/index.d.ts +1 -0
- package/lib/components/booking/info/service2/utils.js +1 -0
- package/lib/components/booking/info2/service/actions/index.d.ts +1 -0
- package/lib/components/booking/info2/service/addService/index.js +1 -2
- package/lib/components/booking/info2/service/contactInfoMode/index.d.ts +1 -0
- package/lib/components/booking/materiels/contacts/index.d.ts +1 -0
- package/lib/components/booking/materiels/duration/index.d.ts +1 -0
- package/lib/components/booking/materiels/startTime/index.d.ts +1 -0
- package/lib/components/booking/notes/NoteBlock/NoteItem/index.d.ts +1 -0
- package/lib/components/booking/utils.d.ts +1 -0
- package/lib/components/booking/utils.js +11 -0
- package/lib/components/eftpos/index.d.ts +1 -0
- package/lib/components/eftpos/pos.d.ts +1 -0
- package/lib/components/eftposPay/amount.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/network.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/unknow.d.ts +1 -0
- package/lib/components/eftposPay/component/manual/index.d.ts +1 -0
- package/lib/components/eftposPay/component/signature/index.d.ts +1 -0
- package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +12 -6
- package/lib/components/eftposPay/pay.d.ts +1 -0
- package/lib/components/eftposPay/payo/config.d.ts +1 -0
- package/lib/components/eftposPay/payo/config.js +98 -73
- package/lib/components/eftposPay/payo/payment.d.ts +66 -0
- package/lib/components/eftposPay/payo/payment.js +357 -0
- package/lib/components/eftposPay/tip.d.ts +1 -0
- package/lib/components/eftposPay/utils/log/index.d.ts +110 -0
- package/lib/components/eftposPay/utils/log/index.js +294 -0
- package/lib/components/eftposPay/windcave/receiptAction.d.ts +1 -0
- package/lib/components/eftposPay/windcave/windcave.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
- package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
- package/lib/components/login/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +6 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.js +4 -2
- package/lib/components/pay/toC/index.js +3 -1
- package/lib/components/pay/toC/status.d.ts +1 -0
- package/lib/components/pay/toC/status.js +5 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
- package/lib/components/ruleSetting/ruleBorder/index.d.ts +1 -0
- package/lib/components/schedules/calendar/index.d.ts +1 -0
- package/lib/components/schedules/components/ScheduleDetailList/index.d.ts +1 -0
- package/lib/components/schedules/components/ScheduleList/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/index.d.ts +1 -0
- package/lib/components/schedules/products/list/ProductItem/index.d.ts +1 -0
- package/lib/components/schedules/products/list/index.d.ts +1 -0
- package/lib/components/schedules/resources/index.d.ts +1 -0
- package/lib/components/schedules/resources/list/index.d.ts +1 -0
- package/lib/components/schedules/schedules/AllSchedules/index.d.ts +1 -0
- package/lib/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -0
- package/lib/components/schedules/schedules/index.d.ts +1 -0
- package/lib/components/shoppingCart/hooks/useAddService.d.ts +1 -0
- package/lib/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
- package/lib/components/shoppingCart/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
- package/lib/components/ticketBooking/utils/index.d.ts +3 -0
- package/lib/components/ticketBooking/utils/index.js +20 -6
- package/lib/components/wallet/Detail/index.js +31 -3
- package/lib/components/wallet/Detail/index.less +11 -0
- package/lib/components/wallet/Detail/locales.d.ts +6 -0
- package/lib/components/wallet/Detail/locales.js +14 -2
- package/lib/components/wallet/Voucher/index.js +8 -8
- package/lib/components/wallet/components/WalletCard.js +4 -0
- package/lib/components/wallet/hooks/useWalletCard.d.ts +1 -0
- package/lib/components/wallet/index.js +2 -2
- package/lib/components/wallet/serve.d.ts +7 -0
- package/lib/components/wallet/utils.d.ts +48 -0
- package/lib/components/wallet/utils.js +287 -0
- package/lib/hooks/usePaymentLogger.d.ts +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -0
- package/lib/plus/saasCreateOrganization/components/Header.d.ts +1 -0
- package/lib/plus/saasRegister/components/EntryEmail.d.ts +1 -0
- package/lib/plus/saasRegister/components/EntryInfo.d.ts +1 -0
- package/lib/plus/saasRegister/components/GoLogin.d.ts +1 -0
- package/lib/plus/saasRegister/components/Header.d.ts +1 -0
- package/lib/plus/saasRegister/components/VerifyError.d.ts +1 -0
- package/lib/plus/saasRegister/components/VerifyingLink.d.ts +1 -0
- package/lib/plus/saasRegister/components/VertifyEmail.d.ts +1 -0
- package/lib/plus/walletEditor/components/relationProduct/index.d.ts +1 -0
- package/lib/plus/walletPassGallery/components/footerButton/index.js +2 -2
- package/lib/plus/walletPassGallery/components/footerButton/index.less +14 -59
- package/lib/plus/walletPassGallery/components/passDetail/index.d.ts +1 -0
- package/lib/plus/walletPassGallery/components/passDetail/index.js +54 -15
- package/lib/plus/walletPassGallery/components/passDetail/index.less +4 -0
- package/lib/plus/walletPassGallery/components/passList/index.d.ts +1 -0
- package/lib/plus/walletPassGallery/components/recharge/index.js +7 -1
- package/lib/plus/walletPassGallery/components/timelineSection/index.d.ts +1 -0
- package/lib/plus/walletPassGallery/index.js +7 -3
- package/lib/plus/walletPassGallery/serve.d.ts +3 -0
- package/lib/plus/walletPassGallery/serve.js +3 -2
- package/lib/pro/Login2.0/index.less +15 -8
- package/lowcode/wallet-pass-detail/meta.ts +89 -0
- package/package.json +4 -4
|
@@ -113,4 +113,7 @@ export var paymentKeys = Object.keys(paymentServices);
|
|
|
113
113
|
*/
|
|
114
114
|
export var isTripartitePayment = function isTripartitePayment(service) {
|
|
115
115
|
return tripartitePaymentKeys.includes(service);
|
|
116
|
+
};
|
|
117
|
+
export var saleChannelMap = {
|
|
118
|
+
'mobile_order': 'mobile-order'
|
|
116
119
|
};
|
|
@@ -21,7 +21,7 @@ import { getUniqueId, locales, sendWarningLog } from '@pisell/utils';
|
|
|
21
21
|
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
|
22
22
|
import { useMemoizedFn } from 'ahooks';
|
|
23
23
|
import useEngineContext from "../../../../hooks/useEngineContext";
|
|
24
|
-
import { isSessionProduct, request, getProductTotalPrice, getIsEject, getIsOnlySession } from "../../../booking/utils";
|
|
24
|
+
import { isSessionProduct, request, getProductTotalPrice, getIsEject, getIsOnlySession, getMainPrice } from "../../../booking/utils";
|
|
25
25
|
import { getProductExtend } from "../../../booking/info2/service/addService/utils";
|
|
26
26
|
import { holderId, isDaysBooking, isNormalProductByDurationSchedule } from "../../../booking/info/service2/utils";
|
|
27
27
|
import { isBooking4Shop } from "../../../booking/info/utils";
|
|
@@ -288,12 +288,12 @@ var AddSerivce = function AddSerivce(props) {
|
|
|
288
288
|
_extend: {
|
|
289
289
|
start_date: state.date.value,
|
|
290
290
|
quantity: (e === null || e === void 0 ? void 0 : e.quantity) || 1,
|
|
291
|
-
price: _detail.price,
|
|
292
291
|
product_name: item.title,
|
|
293
292
|
other: other
|
|
294
293
|
},
|
|
295
294
|
new: 1
|
|
296
295
|
});
|
|
296
|
+
cacheItem._extend.price = getMainPrice(_detail, _detail.price);
|
|
297
297
|
_total = getProductTotalPrice(cacheItem); // 用于折扣 可修改
|
|
298
298
|
cacheItem._extend.total = _total;
|
|
299
299
|
// 用于储存原价
|
|
@@ -384,7 +384,7 @@ var AddSerivce = function AddSerivce(props) {
|
|
|
384
384
|
});
|
|
385
385
|
onEdit === null || onEdit === void 0 || onEdit(cacheItem);
|
|
386
386
|
}
|
|
387
|
-
case
|
|
387
|
+
case 25:
|
|
388
388
|
case "end":
|
|
389
389
|
return _context.stop();
|
|
390
390
|
}
|
|
@@ -2,10 +2,14 @@ var _excluded = ["detail"];
|
|
|
2
2
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
3
3
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
4
4
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
5
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
6
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
7
5
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
8
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
8
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
10
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
11
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
12
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
9
13
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
10
14
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
11
15
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -146,21 +150,30 @@ export var addService = function addService(list, addItem, state) {
|
|
|
146
150
|
// 是否设置过 只追加到第一个中
|
|
147
151
|
var isSetCount = false;
|
|
148
152
|
value = list.map(function (item) {
|
|
153
|
+
var _item$_extend;
|
|
149
154
|
// 是否商品券折扣的商品
|
|
150
155
|
var isGoodPassDiscountProduct = (item.discount_list || []).some(function (item) {
|
|
151
156
|
return item.type === 'good_pass';
|
|
152
157
|
});
|
|
153
158
|
var isEdit = item === null || item === void 0 ? void 0 : item.edit;
|
|
154
|
-
|
|
155
|
-
|
|
159
|
+
// 子商品是否有商品券折扣的商品
|
|
160
|
+
var bundleDiscountList = [];
|
|
161
|
+
((item === null || item === void 0 || (_item$_extend = item._extend) === null || _item$_extend === void 0 || (_item$_extend = _item$_extend.other) === null || _item$_extend === void 0 ? void 0 : _item$_extend.bundle) || []).forEach(function (item) {
|
|
162
|
+
bundleDiscountList.push.apply(bundleDiscountList, _toConsumableArray((item === null || item === void 0 ? void 0 : item.discount_list) || []));
|
|
163
|
+
});
|
|
164
|
+
var isGoodPassBundleProduct = bundleDiscountList.some(function (item) {
|
|
165
|
+
return item.type === 'good_pass';
|
|
166
|
+
});
|
|
167
|
+
if (isSameProduct(item, addItem) && !isSetCount && !isGoodPassDiscountProduct && !isEdit && !isGoodPassBundleProduct) {
|
|
168
|
+
var _item$_extend2, _addItem$_extend, _item$_extend3;
|
|
156
169
|
isNotSame = false;
|
|
157
|
-
var quantity = ((item === null || item === void 0 || (_item$
|
|
170
|
+
var quantity = ((item === null || item === void 0 || (_item$_extend2 = item._extend) === null || _item$_extend2 === void 0 ? void 0 : _item$_extend2.quantity) || 1) + ((addItem === null || addItem === void 0 || (_addItem$_extend = addItem._extend) === null || _addItem$_extend === void 0 ? void 0 : _addItem$_extend.quantity) || 1);
|
|
158
171
|
count = quantity;
|
|
159
172
|
isSetCount = true;
|
|
160
173
|
return _objectSpread(_objectSpread({}, item), {}, {
|
|
161
174
|
_extend: _objectSpread(_objectSpread({}, item._extend), {}, {
|
|
162
175
|
quantity: quantity,
|
|
163
|
-
other: _objectSpread(_objectSpread({}, ((_item$
|
|
176
|
+
other: _objectSpread(_objectSpread({}, ((_item$_extend3 = item._extend) === null || _item$_extend3 === void 0 ? void 0 : _item$_extend3.other) || {}), {}, {
|
|
164
177
|
quantity: quantity
|
|
165
178
|
})
|
|
166
179
|
})
|
|
@@ -237,11 +250,11 @@ export var getIsShowNumber = function getIsShowNumber(item, state) {
|
|
|
237
250
|
|
|
238
251
|
// 生成服务key
|
|
239
252
|
export var genServiceKey = function genServiceKey(item) {
|
|
240
|
-
var _item$
|
|
253
|
+
var _item$_extend4, _item$_extend5, _item$_extend6;
|
|
241
254
|
var product_id = item.product_id;
|
|
242
|
-
var durationKey = (_item$
|
|
243
|
-
var start_time = (_item$
|
|
244
|
-
var total = (_item$
|
|
255
|
+
var durationKey = (_item$_extend4 = item._extend) === null || _item$_extend4 === void 0 ? void 0 : _item$_extend4.duration;
|
|
256
|
+
var start_time = (_item$_extend5 = item._extend) === null || _item$_extend5 === void 0 ? void 0 : _item$_extend5.start_time;
|
|
257
|
+
var total = (_item$_extend6 = item._extend) === null || _item$_extend6 === void 0 ? void 0 : _item$_extend6.total;
|
|
245
258
|
var resourceKey = '';
|
|
246
259
|
Object.values(item._extend.resource || []).forEach(function (resources) {
|
|
247
260
|
resources.forEach(function (resource) {
|
|
@@ -346,17 +359,21 @@ export var getShopDiscountKey = function getShopDiscountKey(osKey) {
|
|
|
346
359
|
export var rulesHooks = {
|
|
347
360
|
// 获取商品关键信息
|
|
348
361
|
getProduct: function getProduct(product) {
|
|
362
|
+
var _product$_extend, _product$_extend2, _product$_extend3;
|
|
349
363
|
var detail = {
|
|
350
364
|
booking_id: product.booking_id,
|
|
351
365
|
id: product.id,
|
|
352
366
|
_id: product._id,
|
|
353
|
-
price: product.price,
|
|
367
|
+
price: product._extend.price,
|
|
354
368
|
total: product._extend.total,
|
|
355
369
|
discount_list: product.discount_list,
|
|
356
370
|
origin_total: product._extend.origin_total,
|
|
357
371
|
num: product._extend.quantity,
|
|
358
372
|
quantity: product._extend.quantity || 1,
|
|
359
|
-
vouchersApplicable: product.vouchersApplicable
|
|
373
|
+
vouchersApplicable: product.vouchersApplicable,
|
|
374
|
+
startDate: (_product$_extend = product._extend) === null || _product$_extend === void 0 ? void 0 : _product$_extend.startDate,
|
|
375
|
+
bundle: ((_product$_extend2 = product._extend) === null || _product$_extend2 === void 0 || (_product$_extend2 = _product$_extend2.other) === null || _product$_extend2 === void 0 ? void 0 : _product$_extend2.bundle) || [],
|
|
376
|
+
options: ((_product$_extend3 = product._extend) === null || _product$_extend3 === void 0 || (_product$_extend3 = _product$_extend3.other) === null || _product$_extend3 === void 0 ? void 0 : _product$_extend3.option) || []
|
|
360
377
|
};
|
|
361
378
|
return detail;
|
|
362
379
|
},
|
|
@@ -364,8 +381,14 @@ export var rulesHooks = {
|
|
|
364
381
|
var detail = _objectSpread(_objectSpread({}, product), {}, {
|
|
365
382
|
_id: values._id || product._id,
|
|
366
383
|
discount_list: values.discount_list,
|
|
367
|
-
_extend: _objectSpread(_objectSpread(_objectSpread({}, product._extend),
|
|
384
|
+
_extend: _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, product._extend), {}, {
|
|
385
|
+
other: _objectSpread(_objectSpread({}, product._extend.other), 'bundle' in values ? {
|
|
386
|
+
bundle: values.bundle
|
|
387
|
+
} : {})
|
|
388
|
+
}, 'total' in values ? {
|
|
368
389
|
total: values.total
|
|
390
|
+
} : {}), 'main_product_selling_price' in values ? {
|
|
391
|
+
main_product_selling_price: values.main_product_selling_price
|
|
369
392
|
} : {}), 'quantity' in values ? {
|
|
370
393
|
quantity: values.quantity
|
|
371
394
|
} : {})
|
|
@@ -22,6 +22,7 @@ import localeTexts from "./locales";
|
|
|
22
22
|
import { getAssetList, getDetailApi } from "./serve";
|
|
23
23
|
import { request } from "./../../../utils";
|
|
24
24
|
import { WalletBar, FooterButtons, UsageRules } from "../components";
|
|
25
|
+
import { formatScheduleText } from "../utils";
|
|
25
26
|
import "./index.less";
|
|
26
27
|
var Text = Typography.Text;
|
|
27
28
|
|
|
@@ -54,7 +55,9 @@ var Detail = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
54
55
|
_detail$expire_date = detail.expire_date,
|
|
55
56
|
expire_date = _detail$expire_date === void 0 ? '' : _detail$expire_date,
|
|
56
57
|
_detail$product = detail.product,
|
|
57
|
-
product = _detail$product === void 0 ? {} : _detail$product
|
|
58
|
+
product = _detail$product === void 0 ? {} : _detail$product,
|
|
59
|
+
custom_schedule_snapshot = detail.custom_schedule_snapshot;
|
|
60
|
+
console.log(detail, 'detail22');
|
|
58
61
|
var _ref = product || {},
|
|
59
62
|
_ref$description = _ref.description,
|
|
60
63
|
description = _ref$description === void 0 ? '' : _ref$description,
|
|
@@ -298,7 +301,36 @@ var Detail = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
298
301
|
onGoogleClick();
|
|
299
302
|
}
|
|
300
303
|
};
|
|
304
|
+
var scheduleList = useMemo(function () {
|
|
305
|
+
return (custom_schedule_snapshot === null || custom_schedule_snapshot === void 0 ? void 0 : custom_schedule_snapshot.data) || [];
|
|
306
|
+
}, [custom_schedule_snapshot]);
|
|
301
307
|
useEffect(function () {
|
|
308
|
+
var detail = formatScheduleText(scheduleList, 'zh-CN');
|
|
309
|
+
var expireText = expire_date ? expire_date : locales.getText('page.wallet.expireDate');
|
|
310
|
+
if (scheduleList.length > 0) {
|
|
311
|
+
// 换行展示
|
|
312
|
+
var validityTexts = "";
|
|
313
|
+
var excludedText = "";
|
|
314
|
+
var includedText = "";
|
|
315
|
+
detail.forEach(function (item) {
|
|
316
|
+
if (item.validityTexts.length > 0) {
|
|
317
|
+
validityTexts = "".concat(validityTexts).concat(item.validityTexts.join('\n'), "\n");
|
|
318
|
+
}
|
|
319
|
+
if (item.excluded_date.length > 0) {
|
|
320
|
+
excludedText = "".concat(excludedText).concat(item.excluded_date.join('\n'), "\n");
|
|
321
|
+
}
|
|
322
|
+
if (item.included_date.length > 0) {
|
|
323
|
+
includedText = "".concat(includedText).concat(item.included_date.join('\n'), "\n");
|
|
324
|
+
}
|
|
325
|
+
});
|
|
326
|
+
expireText = /*#__PURE__*/React.createElement("span", {
|
|
327
|
+
className: "wallet-detail-expire-text"
|
|
328
|
+
}, validityTexts, excludedText && /*#__PURE__*/React.createElement("div", {
|
|
329
|
+
className: "wallet-detail-expire-text-title"
|
|
330
|
+
}, locales.getText('page.wallet.notValidDate')), excludedText, includedText && /*#__PURE__*/React.createElement("div", {
|
|
331
|
+
className: "wallet-detail-expire-text-title"
|
|
332
|
+
}, locales.getText('page.wallet.includedDate')), includedText);
|
|
333
|
+
}
|
|
302
334
|
var data = [{
|
|
303
335
|
label: locales.getText('page.wallet.cardName'),
|
|
304
336
|
value: product_title
|
|
@@ -308,7 +340,7 @@ var Detail = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
308
340
|
isLink: false
|
|
309
341
|
}, {
|
|
310
342
|
label: locales.getText('page.wallet.validDate'),
|
|
311
|
-
value:
|
|
343
|
+
value: expireText
|
|
312
344
|
}];
|
|
313
345
|
//折扣卡显示折扣字段 其他显示余额字段
|
|
314
346
|
if (tag === 'product_discount_card') {
|
|
@@ -373,3 +373,14 @@
|
|
|
373
373
|
font-weight: 500;
|
|
374
374
|
line-height: 24px;
|
|
375
375
|
}
|
|
376
|
+
|
|
377
|
+
.wallet-detail-expire-text {
|
|
378
|
+
white-space: pre-wrap;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
.wallet-detail-expire-text-title {
|
|
382
|
+
font-size: 14px;
|
|
383
|
+
font-weight: 500;
|
|
384
|
+
line-height: 20px;
|
|
385
|
+
color: #667085;
|
|
386
|
+
}
|
|
@@ -21,6 +21,8 @@ declare const _default: {
|
|
|
21
21
|
'page.wallet.addGoogle': string;
|
|
22
22
|
'page.wallet.viewDetails': string;
|
|
23
23
|
'page.wallet.expireDate': string;
|
|
24
|
+
'page.wallet.notValidDate': string;
|
|
25
|
+
'page.wallet.includedDate': string;
|
|
24
26
|
'page.wallet.urlEmpty': string;
|
|
25
27
|
'page.wallet.notIOS': string;
|
|
26
28
|
'page.wallet.addSuccess': string;
|
|
@@ -69,6 +71,8 @@ declare const _default: {
|
|
|
69
71
|
'page.wallet.addGoogle': string;
|
|
70
72
|
'page.wallet.viewDetails': string;
|
|
71
73
|
'page.wallet.expireDate': string;
|
|
74
|
+
'page.wallet.notValidDate': string;
|
|
75
|
+
'page.wallet.includedDate': string;
|
|
72
76
|
'page.wallet.urlEmpty': string;
|
|
73
77
|
'page.wallet.notIOS': string;
|
|
74
78
|
'page.wallet.addSuccess': string;
|
|
@@ -117,6 +121,8 @@ declare const _default: {
|
|
|
117
121
|
'page.wallet.addGoogle': string;
|
|
118
122
|
'page.wallet.viewDetails': string;
|
|
119
123
|
'page.wallet.expireDate': string;
|
|
124
|
+
'page.wallet.notValidDate': string;
|
|
125
|
+
'page.wallet.includedDate': string;
|
|
120
126
|
'page.wallet.urlEmpty': string;
|
|
121
127
|
'page.wallet.notIOS': string;
|
|
122
128
|
'page.wallet.addSuccess': string;
|
|
@@ -24,6 +24,10 @@ export default {
|
|
|
24
24
|
'page.wallet.addGoogle': 'Add to Google Wallet',
|
|
25
25
|
'page.wallet.viewDetails': 'See details',
|
|
26
26
|
'page.wallet.expireDate': 'Long term',
|
|
27
|
+
'page.wallet.notValidDate': 'Not valid on',
|
|
28
|
+
// 不可用日期
|
|
29
|
+
'page.wallet.includedDate': 'Included dates',
|
|
30
|
+
// 包含日期
|
|
27
31
|
'page.wallet.urlEmpty': 'Wallet link is empty',
|
|
28
32
|
'page.wallet.notIOS': 'Apple Wallet is not supported on non-iOS devices',
|
|
29
33
|
'page.wallet.addSuccess': 'Successfully added to wallet',
|
|
@@ -76,6 +80,10 @@ export default {
|
|
|
76
80
|
'page.wallet.addGoogle': '添加到谷歌钱包',
|
|
77
81
|
'page.wallet.viewDetails': '查看详情',
|
|
78
82
|
'page.wallet.expireDate': '长期',
|
|
83
|
+
'page.wallet.notValidDate': '不可用日期',
|
|
84
|
+
// 不可用日期
|
|
85
|
+
'page.wallet.includedDate': '包含日期',
|
|
86
|
+
// 包含日期
|
|
79
87
|
'page.wallet.urlEmpty': '钱包链接为空',
|
|
80
88
|
'page.wallet.notIOS': '非iOS设备不支持Apple Wallet',
|
|
81
89
|
'page.wallet.addSuccess': '已成功添加到钱包',
|
|
@@ -87,7 +95,7 @@ export default {
|
|
|
87
95
|
// Usage Rules
|
|
88
96
|
'page.wallet.usageRules': '使用规则',
|
|
89
97
|
'page.wallet.usageRulesSubtitle': '请仔细阅读以下使用条件',
|
|
90
|
-
'page.wallet.timeUsageLimits': '
|
|
98
|
+
'page.wallet.timeUsageLimits': '使用频次限制',
|
|
91
99
|
'page.wallet.totalQuantityControl': '总量控制',
|
|
92
100
|
'page.wallet.dailyLimit': '每日限制:',
|
|
93
101
|
'page.wallet.weeklyLimit': '每周限制:',
|
|
@@ -128,6 +136,10 @@ export default {
|
|
|
128
136
|
'page.wallet.addGoogle': '添加到谷歌錢包',
|
|
129
137
|
'page.wallet.viewDetails': '查看詳情',
|
|
130
138
|
'page.wallet.expireDate': '長期',
|
|
139
|
+
'page.wallet.notValidDate': '不可用日期',
|
|
140
|
+
// 不可用日期
|
|
141
|
+
'page.wallet.includedDate': '包含日期',
|
|
142
|
+
// 包含日期
|
|
131
143
|
'page.wallet.urlEmpty': '錢包連結為空',
|
|
132
144
|
'page.wallet.notIOS': '非iOS設備不支持Apple Wallet',
|
|
133
145
|
'page.wallet.addSuccess': '已成功添加到錢包',
|
|
@@ -139,7 +151,7 @@ export default {
|
|
|
139
151
|
// Usage Rules
|
|
140
152
|
'page.wallet.usageRules': '使用規則',
|
|
141
153
|
'page.wallet.usageRulesSubtitle': '請仔細閱讀以下使用條件',
|
|
142
|
-
'page.wallet.timeUsageLimits': '
|
|
154
|
+
'page.wallet.timeUsageLimits': '使用頻次限制',
|
|
143
155
|
'page.wallet.totalQuantityControl': '總量控制',
|
|
144
156
|
'page.wallet.dailyLimit': '每日限制:',
|
|
145
157
|
'page.wallet.weeklyLimit': '每週限制:',
|
|
@@ -48,6 +48,17 @@ var Voucher = Provider(function (props) {
|
|
|
48
48
|
}
|
|
49
49
|
}, [globalState.setup]);
|
|
50
50
|
|
|
51
|
+
// 添加处理后退按钮的方法
|
|
52
|
+
var handleBack = useCallback(function () {
|
|
53
|
+
if (recordViewRef.current) {
|
|
54
|
+
recordViewRef.current.closeDetailModal();
|
|
55
|
+
}
|
|
56
|
+
// 更新状态
|
|
57
|
+
setGlobalState({
|
|
58
|
+
setup: 'list'
|
|
59
|
+
});
|
|
60
|
+
}, [recordViewRef, setGlobalState]);
|
|
61
|
+
|
|
51
62
|
// 渲染卡片项
|
|
52
63
|
var renderItem = function renderItem(item) {
|
|
53
64
|
return /*#__PURE__*/React.createElement(WalletCard, {
|
|
@@ -67,16 +78,6 @@ var Voucher = Provider(function (props) {
|
|
|
67
78
|
if (isEmpty) {
|
|
68
79
|
return /*#__PURE__*/React.createElement(PisellEmpty, null);
|
|
69
80
|
}
|
|
70
|
-
// 添加处理后退按钮的方法
|
|
71
|
-
var handleBack = useCallback(function () {
|
|
72
|
-
if (recordViewRef.current) {
|
|
73
|
-
recordViewRef.current.closeDetailModal();
|
|
74
|
-
}
|
|
75
|
-
// 更新状态
|
|
76
|
-
setGlobalState({
|
|
77
|
-
setup: 'list'
|
|
78
|
-
});
|
|
79
|
-
}, [recordViewRef, setGlobalState]);
|
|
80
81
|
return /*#__PURE__*/React.createElement(React.Fragment, null, platform !== 'pc' && /*#__PURE__*/React.createElement(Title, {
|
|
81
82
|
className: "wallet-voucher-title"
|
|
82
83
|
}, locales.getText('page.wallet.voucher')), /*#__PURE__*/React.createElement(CardMetricItem, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["id", "tag", "product_title", "balance", "code", "encoded", "expire_date", "shop", "limit_status", "product_cover", "par_value", "unified_messages"];
|
|
1
|
+
var _excluded = ["id", "tag", "product_title", "balance", "code", "encoded", "expire_date", "shop", "limit_status", "product_cover", "par_value", "unified_messages", "custom_schedule_snapshot", "metadata"];
|
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
3
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
4
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
@@ -40,6 +40,8 @@ var WalletCard = function WalletCard(_ref) {
|
|
|
40
40
|
par_value = _item$par_value === void 0 ? '' : _item$par_value,
|
|
41
41
|
_item$unified_message = item.unified_messages,
|
|
42
42
|
unified_messages = _item$unified_message === void 0 ? {} : _item$unified_message,
|
|
43
|
+
custom_schedule_snapshot = item.custom_schedule_snapshot,
|
|
44
|
+
metadata = item.metadata,
|
|
43
45
|
rest = _objectWithoutProperties(item, _excluded);
|
|
44
46
|
|
|
45
47
|
// 获取平台
|
|
@@ -58,6 +60,8 @@ var WalletCard = function WalletCard(_ref) {
|
|
|
58
60
|
// 是否禁用
|
|
59
61
|
var isDisabled = limit_status !== 'enable';
|
|
60
62
|
return /*#__PURE__*/React.createElement(PisellWalletPassCard, _extends({}, rest, {
|
|
63
|
+
scheduleList: (custom_schedule_snapshot === null || custom_schedule_snapshot === void 0 ? void 0 : custom_schedule_snapshot.data) || [],
|
|
64
|
+
validDateBySchedule: (metadata === null || metadata === void 0 ? void 0 : metadata.validity_type) === 'custom_schedule_validity',
|
|
61
65
|
balanceTitle: balanceTitle,
|
|
62
66
|
showDetail: false,
|
|
63
67
|
showRedeem: false,
|
|
@@ -72,7 +72,8 @@ var Wallet = Provider(function () {
|
|
|
72
72
|
document.body.id = 'body';
|
|
73
73
|
getList({
|
|
74
74
|
num: 999,
|
|
75
|
-
skip: 1
|
|
75
|
+
skip: 1,
|
|
76
|
+
with: ['customScheduleSnapshot']
|
|
76
77
|
});
|
|
77
78
|
}, []);
|
|
78
79
|
var transformData = function transformData(data) {
|
|
@@ -477,7 +478,8 @@ var Wallet = Provider(function () {
|
|
|
477
478
|
// 重新获取列表
|
|
478
479
|
getList({
|
|
479
480
|
num: 999,
|
|
480
|
-
skip: 1
|
|
481
|
+
skip: 1,
|
|
482
|
+
with: ['customScheduleSnapshot']
|
|
481
483
|
}, code);
|
|
482
484
|
}
|
|
483
485
|
|
|
@@ -15,6 +15,7 @@ export interface IWalletListParmsProps {
|
|
|
15
15
|
used_status?: string;
|
|
16
16
|
num?: number;
|
|
17
17
|
skip?: number;
|
|
18
|
+
with?: string[];
|
|
18
19
|
}
|
|
19
20
|
/**
|
|
20
21
|
* 钱包列表项属性接口
|
|
@@ -48,6 +49,12 @@ export interface IWalletListItemProps {
|
|
|
48
49
|
machinecode_config?: {
|
|
49
50
|
hide_recharge?: number;
|
|
50
51
|
};
|
|
52
|
+
metadata: {
|
|
53
|
+
validity_type: string;
|
|
54
|
+
};
|
|
55
|
+
custom_schedule_snapshot: {
|
|
56
|
+
data: any[];
|
|
57
|
+
};
|
|
51
58
|
}
|
|
52
59
|
/**
|
|
53
60
|
* 商店信息接口
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
interface ScheduleTextResult {
|
|
2
|
+
validityTexts: string[];
|
|
3
|
+
excluded_date: string[];
|
|
4
|
+
included_date: string[];
|
|
5
|
+
}
|
|
6
|
+
declare type Locale = 'en' | 'zh-CN' | 'zh-HK';
|
|
7
|
+
interface ScheduleItem {
|
|
8
|
+
id: number;
|
|
9
|
+
name: string | {
|
|
10
|
+
[key: string]: string;
|
|
11
|
+
};
|
|
12
|
+
type: 'standard' | 'time-slots' | 'designation';
|
|
13
|
+
start_time: string | null;
|
|
14
|
+
end_time: string | null;
|
|
15
|
+
repeat_type: 'none' | 'daily' | 'weekly';
|
|
16
|
+
repeat_rule: {
|
|
17
|
+
end: {
|
|
18
|
+
type: 'never' | 'date' | 'occurrence';
|
|
19
|
+
end_date: string | null;
|
|
20
|
+
occurrence: number | null;
|
|
21
|
+
};
|
|
22
|
+
frequency: number;
|
|
23
|
+
excluded_date: Array<{
|
|
24
|
+
start: string;
|
|
25
|
+
end: string;
|
|
26
|
+
}>;
|
|
27
|
+
included_date: any[];
|
|
28
|
+
frequency_date: number[];
|
|
29
|
+
} | null;
|
|
30
|
+
designation: Array<{
|
|
31
|
+
start_date: string;
|
|
32
|
+
start_time: string;
|
|
33
|
+
end_date: string;
|
|
34
|
+
end_time: string;
|
|
35
|
+
}> | null;
|
|
36
|
+
is_all: number;
|
|
37
|
+
time_slot: Array<{
|
|
38
|
+
start_time: string;
|
|
39
|
+
end_time: string;
|
|
40
|
+
}>;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* 根据scheduleList格式化文案展示
|
|
44
|
+
* @param scheduleList 日程列表
|
|
45
|
+
* @returns 格式化后的文案结果数组,每个日程对应一个结果
|
|
46
|
+
*/
|
|
47
|
+
export declare function formatScheduleText(scheduleList: ScheduleItem[], locale?: Locale): ScheduleTextResult[];
|
|
48
|
+
export {};
|