@pisell/private-materials 3.3.107 → 3.4.2
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 +1 -1
- package/build/lowcode/preview.js +13 -13
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +11 -11
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +11 -11
- package/es/businessModel/SalesModel/index.d.ts +0 -1
- package/es/components/Sales/Cart/index.js +9 -8
- package/es/components/Sales/Cart/utils.d.ts +0 -40
- package/es/components/Sales/Cart/utils.js +0 -167
- package/es/components/Sales/Checkout/index.d.ts +0 -4
- package/es/components/Sales/Checkout/index.js +8 -52
- package/es/components/Sales/Checkout/serve.d.ts +0 -13
- package/es/components/Sales/Checkout/serve.js +2 -16
- package/es/components/Sales/Checkout/utils.d.ts +6 -1
- package/es/components/Sales/Checkout/utils.js +8 -9
- package/es/components/Sales/Customer/index.d.ts +1 -0
- package/es/components/Sales/Customer/index.js +1 -0
- package/es/components/Sales/Summary/index.d.ts +0 -10
- package/es/components/Sales/Summary/index.js +2 -17
- package/es/components/Sales/Summary/serve.d.ts +0 -1
- package/es/components/Sales/Summary/serve.js +0 -6
- package/es/components/Sales/Summary/utils.d.ts +0 -15
- package/es/components/Sales/Summary/utils.js +1 -43
- package/es/components/appointmentBooking/components/Cart/Item/index.js +0 -1
- package/es/components/appointmentBooking/components/Cart/Item/index.less +3 -3
- package/es/components/appointmentBooking/components/Content/index.js +1 -15
- package/es/components/appointmentBooking/components/Content/index.less +1 -1
- package/es/components/appointmentBooking/components/Deposit/index.d.ts +0 -6
- package/es/components/appointmentBooking/components/Deposit/index.js +7 -27
- package/es/components/appointmentBooking/components/Form/index.js +1 -1
- package/es/components/appointmentBooking/components/Form/utils.d.ts +1 -1
- package/es/components/appointmentBooking/components/Form/utils.js +17 -15
- package/es/components/appointmentBooking/components/Header/index.js +2 -1
- package/es/components/appointmentBooking/components/Resource/index.js +0 -1
- package/es/components/appointmentBooking/components/Services/index.js +27 -23
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.js +20 -25
- package/es/components/appointmentBooking/deposit/index.js +2 -4
- package/es/components/appointmentBooking/index.js +0 -14
- package/es/components/appointmentBooking/index.less +1 -1
- package/es/components/booking/addons/model.d.ts +1 -10
- package/es/components/booking/components/TabProduct/tabs/index.js +5 -1
- package/es/components/booking/components/browserSelect/index.js +1 -1
- package/es/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
- package/es/components/booking/components/voucher/index.js +2 -2
- package/es/components/booking/forms/model.d.ts +1 -10
- package/es/components/booking/forms/model.js +5 -5
- package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/es/components/booking/info/model.d.ts +1 -10
- package/es/components/booking/info/service/like/index.d.ts +0 -1
- package/es/components/booking/info/service/like/index.js +1 -1
- package/es/components/booking/info/service/serviceManager/index.js +4 -4
- package/es/components/booking/info2/index.js +6 -4
- package/es/components/booking/info2/utils.d.ts +4 -0
- package/es/components/booking/materiels/startTime/index.js +1 -1
- package/es/components/booking/model.d.ts +1 -9
- package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
- package/es/components/booking/notes/NoteBlock/index.js +11 -11
- package/es/components/booking/notes/model.d.ts +1 -10
- package/es/components/booking/notes/model.js +5 -5
- package/es/components/booking/payments/model.d.ts +1 -10
- package/es/components/booking/payments/model.js +5 -5
- package/es/components/eftpos/deviceList/index.d.ts +0 -1
- package/es/components/eftpos/form/index.d.ts +0 -1
- package/es/components/eftpos/group/index.d.ts +0 -1
- package/es/components/eftpos/hooks.d.ts +0 -1
- package/es/components/eftpos/icon/apiKey.d.ts +0 -1
- package/es/components/eftpos/icon/device.d.ts +0 -1
- package/es/components/eftpos/receipt/index.d.ts +0 -1
- package/es/components/eftpos/surcharge/index.d.ts +0 -1
- package/es/components/eftposPay/component/alert/warn.d.ts +0 -1
- package/es/components/eftposPay/component/header/titlebar.d.ts +0 -1
- package/es/components/eftposPay/component/step/step.d.ts +0 -1
- package/es/components/eftposPay/const.d.ts +1 -4
- package/es/components/eftposPay/const.js +1 -3
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/hooks.js +1 -3
- package/es/components/eftposPay/index.js +1 -1
- package/es/components/eftposPay/manufacturer.d.ts +0 -1
- package/es/components/eftposPay/manufacturer.js +0 -4
- package/es/components/eftposPay/pay.d.ts +1 -1
- package/es/components/eftposPay/pay.js +2 -6
- package/es/components/eftposPay/store/index.d.ts +1 -1
- package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +28 -31
- package/es/components/eventBooking/components/Provider/Cart/Item/Total.js +6 -10
- package/es/components/eventBooking/components/Provider/Cart/Item/index.js +2 -4
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingDetailModal/index.js +1 -3
- package/es/components/eventBooking/locales.d.ts +0 -24
- package/es/components/eventBooking/locales.js +3 -27
- package/es/components/listComponent/index.js +5 -5
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/index.js +74 -26
- package/es/components/pay/toC/index.js +46 -14
- package/es/components/pay/toC/model.d.ts +1 -9
- package/es/components/productExtension/card/index.js +3 -3
- package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
- package/es/components/productExtension/fields/Forms/index.js +12 -12
- package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
- package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
- package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
- package/es/components/productExtension/server.js +2 -2
- package/es/components/ruleSetting/ruleBorder/index.js +1 -1
- package/es/components/schedules/calendar/index.js +4 -4
- package/es/components/schedules/calendar/serve.js +2 -2
- package/es/components/schedules/components/CurrentDay/index.js +5 -5
- package/es/components/schedules/components/CurrentDay/serve.js +2 -2
- package/es/components/schedules/components/DropdownSort/index.js +1 -1
- package/es/components/schedules/components/ResourceList/index.js +1 -1
- package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
- package/es/components/schedules/components/Search/index.js +5 -5
- package/es/components/schedules/model.d.ts +1 -9
- package/es/components/schedules/model.js +5 -5
- package/es/components/schedules/openHours/index.js +1 -1
- package/es/components/schedules/openHours/serve.js +2 -2
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
- package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
- package/es/components/schedules/products/serve.js +2 -2
- package/es/components/schedules/products/utils.js +5 -5
- package/es/components/schedules/resources/detail/detailContent.js +2 -2
- package/es/components/schedules/resources/detail/index.js +10 -10
- package/es/components/schedules/resources/list/index.js +2 -2
- package/es/components/schedules/resources/relationProduct/index.d.ts +0 -1
- package/es/components/schedules/resources/relationProduct/index.js +1 -1
- package/es/components/schedules/resources/serve.js +2 -2
- package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
- package/es/components/schedules/utils.d.ts +1 -1
- package/es/components/schedules/utils.js +4 -4
- package/es/components/selectModal/index.js +2 -2
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
- package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
- package/es/components/ticketBooking/components/ticketBooking/index.js +2 -2
- package/es/components/wallet/Detail/model.d.ts +1 -13
- package/es/components/wallet/DiscountCard/model.d.ts +1 -14
- package/es/components/wallet/PointCard/model.d.ts +1 -13
- package/es/components/wallet/RechargeableCard/model.d.ts +1 -29
- package/es/components/wallet/Voucher/model.d.ts +1 -13
- package/es/components/wallet/model.d.ts +1 -9
- package/es/hooks/useComponents.js +1 -1
- package/es/utils/index.d.ts +1 -1
- package/lib/businessModel/SalesModel/index.d.ts +0 -1
- package/lib/components/Sales/Cart/index.js +8 -5
- package/lib/components/Sales/Cart/utils.d.ts +0 -40
- package/lib/components/Sales/Cart/utils.js +0 -117
- package/lib/components/Sales/Checkout/index.d.ts +0 -4
- package/lib/components/Sales/Checkout/index.js +7 -39
- package/lib/components/Sales/Checkout/serve.d.ts +0 -13
- package/lib/components/Sales/Checkout/serve.js +2 -7
- package/lib/components/Sales/Checkout/utils.d.ts +6 -1
- package/lib/components/Sales/Checkout/utils.js +5 -5
- package/lib/components/Sales/Customer/index.d.ts +1 -0
- package/lib/components/Sales/Customer/index.js +1 -0
- package/lib/components/Sales/Summary/index.d.ts +0 -10
- package/lib/components/Sales/Summary/index.js +1 -7
- package/lib/components/Sales/Summary/serve.d.ts +0 -1
- package/lib/components/Sales/Summary/serve.js +0 -32
- package/lib/components/Sales/Summary/utils.d.ts +0 -15
- package/lib/components/Sales/Summary/utils.js +1 -30
- package/lib/components/appointmentBooking/components/Cart/Item/index.js +0 -1
- package/lib/components/appointmentBooking/components/Cart/Item/index.less +3 -3
- package/lib/components/appointmentBooking/components/Content/index.js +1 -6
- package/lib/components/appointmentBooking/components/Content/index.less +1 -1
- package/lib/components/appointmentBooking/components/Deposit/index.d.ts +0 -6
- package/lib/components/appointmentBooking/components/Deposit/index.js +4 -36
- package/lib/components/appointmentBooking/components/Form/index.js +6 -1
- package/lib/components/appointmentBooking/components/Form/utils.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Form/utils.js +9 -12
- package/lib/components/appointmentBooking/components/Header/index.js +1 -0
- package/lib/components/appointmentBooking/components/Resource/index.js +0 -1
- package/lib/components/appointmentBooking/components/Services/index.js +11 -6
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.js +4 -8
- package/lib/components/appointmentBooking/deposit/index.js +2 -4
- package/lib/components/appointmentBooking/index.js +0 -11
- package/lib/components/appointmentBooking/index.less +1 -1
- package/lib/components/booking/addons/model.d.ts +1 -10
- package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
- package/lib/components/booking/components/voucher/index.js +2 -2
- package/lib/components/booking/forms/model.d.ts +1 -10
- package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/lib/components/booking/info/model.d.ts +1 -10
- package/lib/components/booking/info/service/like/index.d.ts +0 -1
- package/lib/components/booking/info/service/serviceManager/index.js +3 -3
- package/lib/components/booking/info2/index.js +21 -11
- package/lib/components/booking/info2/utils.d.ts +4 -0
- package/lib/components/booking/model.d.ts +1 -9
- package/lib/components/booking/notes/model.d.ts +1 -10
- package/lib/components/booking/payments/model.d.ts +1 -10
- package/lib/components/eftpos/deviceList/index.d.ts +0 -1
- package/lib/components/eftpos/form/index.d.ts +0 -1
- package/lib/components/eftpos/group/index.d.ts +0 -1
- package/lib/components/eftpos/hooks.d.ts +0 -1
- package/lib/components/eftpos/icon/apiKey.d.ts +0 -1
- package/lib/components/eftpos/icon/device.d.ts +0 -1
- package/lib/components/eftpos/receipt/index.d.ts +0 -1
- package/lib/components/eftpos/surcharge/index.d.ts +0 -1
- package/lib/components/eftposPay/component/alert/warn.d.ts +0 -1
- package/lib/components/eftposPay/component/header/titlebar.d.ts +0 -1
- package/lib/components/eftposPay/component/step/step.d.ts +0 -1
- package/lib/components/eftposPay/const.d.ts +1 -4
- package/lib/components/eftposPay/const.js +0 -2
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/hooks.js +4 -11
- package/lib/components/eftposPay/index.js +1 -1
- package/lib/components/eftposPay/manufacturer.d.ts +0 -1
- package/lib/components/eftposPay/manufacturer.js +0 -6
- package/lib/components/eftposPay/pay.d.ts +1 -1
- package/lib/components/eftposPay/pay.js +2 -13
- package/lib/components/eftposPay/store/index.d.ts +1 -1
- package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +17 -21
- package/lib/components/eventBooking/components/Provider/Cart/Item/Total.js +5 -8
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.js +2 -4
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingDetailModal/index.js +1 -1
- package/lib/components/eventBooking/locales.d.ts +0 -24
- package/lib/components/eventBooking/locales.js +3 -27
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/index.js +39 -12
- package/lib/components/pay/toC/index.js +29 -9
- package/lib/components/pay/toC/model.d.ts +1 -9
- package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
- package/lib/components/schedules/model.d.ts +1 -9
- package/lib/components/schedules/resources/relationProduct/index.d.ts +0 -1
- package/lib/components/schedules/utils.d.ts +1 -1
- package/lib/components/schedules/utils.js +1 -1
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
- package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
- package/lib/components/ticketBooking/components/ticketBooking/index.js +25 -25
- package/lib/components/wallet/Detail/model.d.ts +1 -13
- package/lib/components/wallet/DiscountCard/model.d.ts +1 -14
- package/lib/components/wallet/PointCard/model.d.ts +1 -13
- package/lib/components/wallet/RechargeableCard/model.d.ts +1 -29
- package/lib/components/wallet/Voucher/model.d.ts +1 -13
- package/lib/components/wallet/model.d.ts +1 -9
- package/lib/utils/index.d.ts +1 -1
- package/package.json +4 -4
- package/es/components/eftposPay/linkly/const.d.ts +0 -23
- package/es/components/eftposPay/linkly/const.js +0 -82
- package/es/components/eftposPay/linkly/hooks/index.d.ts +0 -2
- package/es/components/eftposPay/linkly/hooks/index.js +0 -2
- package/es/components/eftposPay/linkly/hooks/normal.d.ts +0 -30
- package/es/components/eftposPay/linkly/hooks/normal.js +0 -321
- package/es/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +0 -4
- package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +0 -273
- package/es/components/eftposPay/linkly/index.d.ts +0 -2
- package/es/components/eftposPay/linkly/index.js +0 -197
- package/es/components/eftposPay/linkly/service.d.ts +0 -32
- package/es/components/eftposPay/linkly/service.js +0 -81
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -2
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.js +0 -17
- package/lib/components/eftposPay/linkly/const.d.ts +0 -23
- package/lib/components/eftposPay/linkly/const.js +0 -102
- package/lib/components/eftposPay/linkly/hooks/index.d.ts +0 -2
- package/lib/components/eftposPay/linkly/hooks/index.js +0 -25
- package/lib/components/eftposPay/linkly/hooks/normal.d.ts +0 -30
- package/lib/components/eftposPay/linkly/hooks/normal.js +0 -242
- package/lib/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +0 -4
- package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +0 -222
- package/lib/components/eftposPay/linkly/index.d.ts +0 -2
- package/lib/components/eftposPay/linkly/index.js +0 -208
- package/lib/components/eftposPay/linkly/service.d.ts +0 -32
- package/lib/components/eftposPay/linkly/service.js +0 -55
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -2
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.js +0 -55
|
@@ -16,7 +16,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
16
16
|
import React, { useMemo, useState } from 'react';
|
|
17
17
|
import { locales } from '@pisell/utils';
|
|
18
18
|
import { Button, PisellToast } from '@pisell/materials';
|
|
19
|
-
import { useCart, useHolder, useStep, useCheckout, useSales, useCustomer
|
|
19
|
+
import { useCart, useHolder, useStep, useCheckout, useSales, useCustomer } from "../../../../../Sales";
|
|
20
20
|
import { formatValues, getFormParams } from "../../../../../Sales/Checkout/utils";
|
|
21
21
|
import OrderProductModal from "../../OrderProductModal/index";
|
|
22
22
|
import EmptyHolderModal from "../../EmptyHolderModal";
|
|
@@ -24,7 +24,6 @@ import { getProductPrice } from "../../../../../Sales/Event/serve";
|
|
|
24
24
|
import { useRequest } from 'ahooks';
|
|
25
25
|
import useEngineContext from "../../../../../../hooks/useEngineContext";
|
|
26
26
|
import "./index.less";
|
|
27
|
-
import { Toast } from "../../../../../appointmentBooking/utils";
|
|
28
27
|
var ContinueButton = function ContinueButton() {
|
|
29
28
|
var _context$appHelper, _cartData$cartItems;
|
|
30
29
|
var _useSales = useSales(),
|
|
@@ -44,14 +43,10 @@ var ContinueButton = function ContinueButton() {
|
|
|
44
43
|
onCheckout = _useCheckout.onCheckout,
|
|
45
44
|
createBooking = _useCheckout.createBooking,
|
|
46
45
|
onCheckBeforeBooking = _useCheckout.onCheckBeforeBooking,
|
|
47
|
-
checkBeforeBooking = _useCheckout.checkBeforeBooking
|
|
48
|
-
freePay = _useCheckout.freePay;
|
|
46
|
+
checkBeforeBooking = _useCheckout.checkBeforeBooking;
|
|
49
47
|
var _useCustomer = useCustomer(),
|
|
50
48
|
openLoginModal = _useCustomer.openLoginModal,
|
|
51
49
|
isLogin = _useCustomer.isLogin;
|
|
52
|
-
var _useSummary = useSummary(),
|
|
53
|
-
deposit = _useSummary.deposit,
|
|
54
|
-
isAgreeDepositPolicy = _useSummary.isAgreeDepositPolicy;
|
|
55
50
|
|
|
56
51
|
// 下单之前是否检测失败
|
|
57
52
|
var _useState = useState(false),
|
|
@@ -95,6 +90,7 @@ var ContinueButton = function ContinueButton() {
|
|
|
95
90
|
data: params,
|
|
96
91
|
callback: function () {
|
|
97
92
|
var _callback = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(e) {
|
|
93
|
+
var _context$appHelper2;
|
|
98
94
|
var value, result, _result$err;
|
|
99
95
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
100
96
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -105,8 +101,13 @@ var ContinueButton = function ContinueButton() {
|
|
|
105
101
|
}
|
|
106
102
|
return _context.abrupt("return");
|
|
107
103
|
case 2:
|
|
108
|
-
value = formatValues(
|
|
109
|
-
|
|
104
|
+
value = formatValues({
|
|
105
|
+
state: data,
|
|
106
|
+
platform: context === null || context === void 0 || (_context$appHelper2 = context.appHelper) === null || _context$appHelper2 === void 0 || (_context$appHelper2 = _context$appHelper2.constants) === null || _context$appHelper2 === void 0 ? void 0 : _context$appHelper2.platform,
|
|
107
|
+
excludeDisabled: false,
|
|
108
|
+
extra: {
|
|
109
|
+
relation_forms: e
|
|
110
|
+
}
|
|
110
111
|
}); // 如果检测成功,则直接下单
|
|
111
112
|
_context.next = 5;
|
|
112
113
|
return onCheckout(value);
|
|
@@ -389,48 +390,44 @@ var ContinueButton = function ContinueButton() {
|
|
|
389
390
|
*/
|
|
390
391
|
var handleContinue = /*#__PURE__*/function () {
|
|
391
392
|
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
|
|
392
|
-
var
|
|
393
|
+
var _context$appHelper3, value, checkRes, emptyHolders;
|
|
393
394
|
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
394
395
|
while (1) switch (_context6.prev = _context6.next) {
|
|
395
396
|
case 0:
|
|
396
397
|
if (!isLastStep) {
|
|
397
|
-
_context6.next =
|
|
398
|
-
break;
|
|
399
|
-
}
|
|
400
|
-
value = formatValues(data); // 如果未同意定金政策,则提示
|
|
401
|
-
if (!(deposit !== null && deposit !== void 0 && deposit.hasDeposit && (deposit === null || deposit === void 0 || (_deposit$protocols = deposit.protocols) === null || _deposit$protocols === void 0 ? void 0 : _deposit$protocols.length) > 0 && !isAgreeDepositPolicy)) {
|
|
402
|
-
_context6.next = 5;
|
|
398
|
+
_context6.next = 14;
|
|
403
399
|
break;
|
|
404
400
|
}
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
401
|
+
value = formatValues({
|
|
402
|
+
state: data,
|
|
403
|
+
platform: context === null || context === void 0 || (_context$appHelper3 = context.appHelper) === null || _context$appHelper3 === void 0 || (_context$appHelper3 = _context$appHelper3.constants) === null || _context$appHelper3 === void 0 ? void 0 : _context$appHelper3.platform
|
|
404
|
+
}); // 检测商品是否可以下单
|
|
405
|
+
_context6.next = 4;
|
|
409
406
|
return onCheckBeforeBooking(value);
|
|
410
|
-
case
|
|
407
|
+
case 4:
|
|
411
408
|
checkRes = _context6.sent;
|
|
412
409
|
if (!((checkRes === null || checkRes === void 0 ? void 0 : checkRes.result) === false)) {
|
|
413
|
-
_context6.next =
|
|
410
|
+
_context6.next = 9;
|
|
414
411
|
break;
|
|
415
412
|
}
|
|
416
413
|
setCheckedNumber(checkRes === null || checkRes === void 0 ? void 0 : checkRes.num);
|
|
417
414
|
setOpenCheckout(true);
|
|
418
415
|
return _context6.abrupt("return");
|
|
419
|
-
case
|
|
416
|
+
case 9:
|
|
420
417
|
// 验证holder是否为空
|
|
421
418
|
emptyHolders = getWithoutCartItemsHolderNames();
|
|
422
419
|
if (!((emptyHolders === null || emptyHolders === void 0 ? void 0 : emptyHolders.length) > 0)) {
|
|
423
|
-
_context6.next =
|
|
420
|
+
_context6.next = 12;
|
|
424
421
|
break;
|
|
425
422
|
}
|
|
426
423
|
return _context6.abrupt("return", setOpenEmptyHolder(true));
|
|
427
|
-
case
|
|
424
|
+
case 12:
|
|
428
425
|
// 关闭购物车弹窗
|
|
429
426
|
onCloseCart();
|
|
430
427
|
return _context6.abrupt("return", handleCheckout());
|
|
431
|
-
case
|
|
428
|
+
case 14:
|
|
432
429
|
if (isLogin()) {
|
|
433
|
-
_context6.next =
|
|
430
|
+
_context6.next = 17;
|
|
434
431
|
break;
|
|
435
432
|
}
|
|
436
433
|
onCloseCart();
|
|
@@ -460,9 +457,9 @@ var ContinueButton = function ContinueButton() {
|
|
|
460
457
|
return callback;
|
|
461
458
|
}()
|
|
462
459
|
}));
|
|
463
|
-
case
|
|
460
|
+
case 17:
|
|
464
461
|
handleHolder();
|
|
465
|
-
case
|
|
462
|
+
case 18:
|
|
466
463
|
case "end":
|
|
467
464
|
return _context6.stop();
|
|
468
465
|
}
|
|
@@ -499,8 +496,8 @@ var ContinueButton = function ContinueButton() {
|
|
|
499
496
|
*/
|
|
500
497
|
var confirmLoading = useMemo(function () {
|
|
501
498
|
if (!isLastStep) return false;
|
|
502
|
-
return (createBooking === null || createBooking === void 0 ? void 0 : createBooking.loading) || (checkBeforeBooking === null || checkBeforeBooking === void 0 ? void 0 : checkBeforeBooking.loading)
|
|
503
|
-
}, [isLastStep, createBooking === null || createBooking === void 0 ? void 0 : createBooking.loading, checkBeforeBooking === null || checkBeforeBooking === void 0 ? void 0 : checkBeforeBooking.loading
|
|
499
|
+
return (createBooking === null || createBooking === void 0 ? void 0 : createBooking.loading) || (checkBeforeBooking === null || checkBeforeBooking === void 0 ? void 0 : checkBeforeBooking.loading);
|
|
500
|
+
}, [isLastStep, createBooking === null || createBooking === void 0 ? void 0 : createBooking.loading, checkBeforeBooking === null || checkBeforeBooking === void 0 ? void 0 : checkBeforeBooking.loading]);
|
|
504
501
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
|
|
505
502
|
disabled: !(cartData !== null && cartData !== void 0 && (_cartData$cartItems = cartData.cartItems) !== null && _cartData$cartItems !== void 0 && _cartData$cartItems.length),
|
|
506
503
|
size: "large",
|
|
@@ -5,25 +5,21 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { locales } from '@pisell/utils';
|
|
7
7
|
import { PisellText } from '@pisell/materials';
|
|
8
|
-
import {
|
|
8
|
+
import { useSummary } from "../../../../../Sales";
|
|
9
9
|
import useEngineContext from "../../../../../../hooks/useEngineContext";
|
|
10
10
|
import "./index.less";
|
|
11
11
|
import classNames from 'classnames';
|
|
12
12
|
var Total = function Total(_ref) {
|
|
13
|
-
var _context$appHelper, _context$appHelper$ge,
|
|
13
|
+
var _context$appHelper, _context$appHelper$ge, _context$appHelper2, _context$appHelper2$g;
|
|
14
14
|
var className = _ref.className,
|
|
15
15
|
isFooter = _ref.isFooter;
|
|
16
|
-
var _useCart = useCart(),
|
|
17
|
-
cartData = _useCart.cartData;
|
|
18
16
|
var _useSummary = useSummary(),
|
|
19
17
|
taxTitle = _useSummary.taxTitle,
|
|
20
18
|
totalTaxFee = _useSummary.totalTaxFee,
|
|
21
19
|
isPriceIncludeTax = _useSummary.isPriceIncludeTax,
|
|
22
|
-
total = _useSummary.total
|
|
23
|
-
deposit = _useSummary.deposit;
|
|
20
|
+
total = _useSummary.total;
|
|
24
21
|
var context = useEngineContext();
|
|
25
|
-
console.log(taxTitle, isPriceIncludeTax, totalTaxFee, total, context === null || context === void 0 || (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 || (_context$appHelper = _context$appHelper.utils) === null || _context$appHelper === void 0 || (_context$appHelper$ge = _context$appHelper.getSymbolic) === null || _context$appHelper$ge === void 0 ? void 0 : _context$appHelper$ge.call(_context$appHelper),
|
|
26
|
-
var showDeposit = (cartData === null || cartData === void 0 || (_cartData$cartItems = cartData.cartItems) === null || _cartData$cartItems === void 0 ? void 0 : _cartData$cartItems.length) > 0 && (deposit === null || deposit === void 0 ? void 0 : deposit.hasDeposit);
|
|
22
|
+
console.log(taxTitle, isPriceIncludeTax, totalTaxFee, total, context === null || context === void 0 || (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 || (_context$appHelper = _context$appHelper.utils) === null || _context$appHelper === void 0 || (_context$appHelper$ge = _context$appHelper.getSymbolic) === null || _context$appHelper$ge === void 0 ? void 0 : _context$appHelper$ge.call(_context$appHelper), 'wh97978');
|
|
27
23
|
return /*#__PURE__*/React.createElement("div", {
|
|
28
24
|
className: "event-total-wrap ".concat(className)
|
|
29
25
|
}, !isPriceIncludeTax && Number(totalTaxFee) > 0 ? /*#__PURE__*/React.createElement("div", {
|
|
@@ -35,8 +31,8 @@ var Total = function Total(_ref) {
|
|
|
35
31
|
className: classNames('event-total', _defineProperty({}, ['total-gst-wrap'], !isPriceIncludeTax && Number(totalTaxFee) > 0))
|
|
36
32
|
}, /*#__PURE__*/React.createElement("div", {
|
|
37
33
|
className: "left"
|
|
38
|
-
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", null,
|
|
39
|
-
value:
|
|
34
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", null, locales.getText('pisell2.event.total'), isFooter ? ': ' : ''), isFooter ? /*#__PURE__*/React.createElement(PisellText.Amount, {
|
|
35
|
+
value: total,
|
|
40
36
|
showCurrencySymbol: true,
|
|
41
37
|
className: "event-amount"
|
|
42
38
|
}) : null), isPriceIncludeTax && Number(totalTaxFee) > 0 ? /*#__PURE__*/React.createElement("span", {
|
|
@@ -5,10 +5,8 @@ import { useCart, useHolder, useSummary, useStep } from "../../../../../Sales";
|
|
|
5
5
|
import SelectHolderModal from "../../SelectHolderModal";
|
|
6
6
|
import ContinueButton from "../ContinueButton";
|
|
7
7
|
import Total from "./Total";
|
|
8
|
-
import Deposit from "../Deposit";
|
|
9
8
|
import "./index.less";
|
|
10
9
|
var CartItem = function CartItem() {
|
|
11
|
-
var _cartData$cartItems;
|
|
12
10
|
var _useHolder = useHolder(),
|
|
13
11
|
open = _useHolder.open,
|
|
14
12
|
holderData = _useHolder.holderData,
|
|
@@ -19,7 +17,7 @@ var CartItem = function CartItem() {
|
|
|
19
17
|
cartData = _useCart.cartData,
|
|
20
18
|
addNoteToCartItem = _useCart.addNoteToCartItem;
|
|
21
19
|
var _useSummary = useSummary(),
|
|
22
|
-
|
|
20
|
+
subtotal = _useSummary.subtotal;
|
|
23
21
|
var _useStep = useStep(),
|
|
24
22
|
isLastStep = _useStep.isLastStep;
|
|
25
23
|
var handleClickCard = function handleClickCard(e, type, key) {
|
|
@@ -58,7 +56,7 @@ var CartItem = function CartItem() {
|
|
|
58
56
|
}
|
|
59
57
|
})), /*#__PURE__*/React.createElement("div", {
|
|
60
58
|
className: "event-footer"
|
|
61
|
-
}, /*#__PURE__*/React.createElement(Total, null),
|
|
59
|
+
}, /*#__PURE__*/React.createElement(Total, null), /*#__PURE__*/React.createElement(ContinueButton, null))), /*#__PURE__*/React.createElement(SelectHolderModal, {
|
|
62
60
|
open: open
|
|
63
61
|
}));
|
|
64
62
|
};
|
|
@@ -304,9 +304,7 @@ var BookingDetailModal = function BookingDetailModal(props) {
|
|
|
304
304
|
utils === null || utils === void 0 || utils.action({
|
|
305
305
|
type: 'pisell1.productDetail',
|
|
306
306
|
data: {
|
|
307
|
-
detail: _objectSpread(
|
|
308
|
-
open_deposit: 1
|
|
309
|
-
}),
|
|
307
|
+
detail: _objectSpread({}, (bookingOption === null || bookingOption === void 0 ? void 0 : bookingOption._originData) || {}),
|
|
310
308
|
isOS: false
|
|
311
309
|
},
|
|
312
310
|
callback: function callback(data) {
|
|
@@ -71,14 +71,6 @@ declare const _default: {
|
|
|
71
71
|
'pisell2.event.capacity.limit.reached.tip': string;
|
|
72
72
|
'pisell2.event.schedule.item.expand': string;
|
|
73
73
|
'pisell2.event.schedule.item.collapse': string;
|
|
74
|
-
'pisell2.appointment.deposit': string;
|
|
75
|
-
'pisell2.appointment.deposit.agreed': string;
|
|
76
|
-
'pisell2.appointment.deposit.agree.policy': string;
|
|
77
|
-
'pisell2.appointment.deposit.and': string;
|
|
78
|
-
'pisell2.appointment.deposit.amount.tip1': string;
|
|
79
|
-
'pisell2.appointment.deposit.amount.tip2': string;
|
|
80
|
-
'pisell2.appointment.deposit.close': string;
|
|
81
|
-
'pisell2.appointment.booking.empty.data': string;
|
|
82
74
|
};
|
|
83
75
|
'zh-CN': {
|
|
84
76
|
'pisell2.event.calendar.limit.unavailable': string;
|
|
@@ -152,14 +144,6 @@ declare const _default: {
|
|
|
152
144
|
'pisell2.event.capacity.limit.reached.tip': string;
|
|
153
145
|
'pisell2.event.schedule.item.expand': string;
|
|
154
146
|
'pisell2.event.schedule.item.collapse': string;
|
|
155
|
-
'pisell2.appointment.deposit': string;
|
|
156
|
-
'pisell2.appointment.deposit.agreed': string;
|
|
157
|
-
'pisell2.appointment.deposit.agree.policy': string;
|
|
158
|
-
'pisell2.appointment.deposit.and': string;
|
|
159
|
-
'pisell2.appointment.deposit.amount.tip1': string;
|
|
160
|
-
'pisell2.appointment.deposit.amount.tip2': string;
|
|
161
|
-
'pisell2.appointment.deposit.close': string;
|
|
162
|
-
'pisell2.appointment.booking.empty.data': string;
|
|
163
147
|
};
|
|
164
148
|
'zh-HK': {
|
|
165
149
|
'pisell2.event.calendar.limit.unavailable': string;
|
|
@@ -233,14 +217,6 @@ declare const _default: {
|
|
|
233
217
|
'pisell2.event.capacity.limit.reached.tip': string;
|
|
234
218
|
'pisell2.event.schedule.item.expand': string;
|
|
235
219
|
'pisell2.event.schedule.item.collapse': string;
|
|
236
|
-
'pisell2.appointment.deposit': string;
|
|
237
|
-
'pisell2.appointment.deposit.agreed': string;
|
|
238
|
-
'pisell2.appointment.deposit.agree.policy': string;
|
|
239
|
-
'pisell2.appointment.deposit.and': string;
|
|
240
|
-
'pisell2.appointment.deposit.amount.tip1': string;
|
|
241
|
-
'pisell2.appointment.deposit.amount.tip2': string;
|
|
242
|
-
'pisell2.appointment.deposit.close': string;
|
|
243
|
-
'pisell2.appointment.booking.empty.data': string;
|
|
244
220
|
};
|
|
245
221
|
};
|
|
246
222
|
export default _default;
|
|
@@ -82,15 +82,7 @@ export default {
|
|
|
82
82
|
'pisell2.event.capacity.limit.reached.title': 'Capacity limit reached',
|
|
83
83
|
'pisell2.event.capacity.limit.reached.tip': 'One or more events in your cart are no longer available due to full capacity. Please remove unavailable events from your cart to complete checkout.',
|
|
84
84
|
'pisell2.event.schedule.item.expand': 'See more',
|
|
85
|
-
'pisell2.event.schedule.item.collapse': 'See less'
|
|
86
|
-
'pisell2.appointment.deposit': 'Deposit',
|
|
87
|
-
'pisell2.appointment.deposit.agreed': 'I have read and agree to the ',
|
|
88
|
-
'pisell2.appointment.deposit.agree.policy': 'You need to agree the policy to proceed',
|
|
89
|
-
'pisell2.appointment.deposit.and': ' & ',
|
|
90
|
-
'pisell2.appointment.deposit.amount.tip1': ' needs to be paid as deposit.',
|
|
91
|
-
'pisell2.appointment.deposit.amount.tip2': ' ',
|
|
92
|
-
'pisell2.appointment.deposit.close': 'Close',
|
|
93
|
-
'pisell2.appointment.booking.empty.data': 'No data'
|
|
85
|
+
'pisell2.event.schedule.item.collapse': 'See less'
|
|
94
86
|
},
|
|
95
87
|
'zh-CN': {
|
|
96
88
|
'pisell2.event.calendar.limit.unavailable': '不可预约',
|
|
@@ -175,15 +167,7 @@ export default {
|
|
|
175
167
|
'pisell2.event.capacity.limit.reached.title': '活动名额已满',
|
|
176
168
|
'pisell2.event.capacity.limit.reached.tip': '购物车中有一个或多个活动已达预约上限,请将已满额的活动从购物车中移除后再完成结算。',
|
|
177
169
|
'pisell2.event.schedule.item.expand': '查看更多',
|
|
178
|
-
'pisell2.event.schedule.item.collapse': '收起'
|
|
179
|
-
'pisell2.appointment.deposit': '定金',
|
|
180
|
-
'pisell2.appointment.deposit.agreed': '我已阅读并同意 ',
|
|
181
|
-
'pisell2.appointment.deposit.agree.policy': '您需要同意协议才能继续',
|
|
182
|
-
'pisell2.appointment.deposit.and': ' 和 ',
|
|
183
|
-
'pisell2.appointment.deposit.amount.tip1': '请支付 ',
|
|
184
|
-
'pisell2.appointment.deposit.amount.tip2': ' 定金。',
|
|
185
|
-
'pisell2.appointment.deposit.close': '关闭',
|
|
186
|
-
'pisell2.appointment.booking.empty.data': '暂无数据'
|
|
170
|
+
'pisell2.event.schedule.item.collapse': '收起'
|
|
187
171
|
},
|
|
188
172
|
'zh-HK': {
|
|
189
173
|
'pisell2.event.calendar.limit.unavailable': '不可預約',
|
|
@@ -268,14 +252,6 @@ export default {
|
|
|
268
252
|
'pisell2.event.capacity.limit.reached.title': '活動名額已滿',
|
|
269
253
|
'pisell2.event.capacity.limit.reached.tip': '購物車中有一個或多個活動已達預約上限,請將已滿額的活動從購物車中移除後再完成結算。',
|
|
270
254
|
'pisell2.event.schedule.item.expand': '查看更多',
|
|
271
|
-
'pisell2.event.schedule.item.collapse': '收起'
|
|
272
|
-
'pisell2.appointment.deposit': '定金',
|
|
273
|
-
'pisell2.appointment.deposit.agreed': '我已閱讀並同意 ',
|
|
274
|
-
'pisell2.appointment.deposit.agree.policy': '您需要同意協議才能繼續',
|
|
275
|
-
'pisell2.appointment.deposit.and': ' 和 ',
|
|
276
|
-
'pisell2.appointment.deposit.amount.tip1': '請支付 ',
|
|
277
|
-
'pisell2.appointment.deposit.amount.tip2': ' 定金。',
|
|
278
|
-
'pisell2.appointment.deposit.close': '关闭',
|
|
279
|
-
'pisell2.appointment.booking.empty.data': '暫無數據'
|
|
255
|
+
'pisell2.event.schedule.item.collapse': '收起'
|
|
280
256
|
}
|
|
281
257
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
function _typeof(
|
|
2
|
-
function ownKeys(
|
|
3
|
-
function _objectSpread(
|
|
1
|
+
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); }
|
|
2
|
+
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; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
4
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
-
function _toPropertyKey(
|
|
6
|
-
function _toPrimitive(
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
7
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
8
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
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); }
|
|
@@ -27,7 +27,7 @@ import GlobePayQrcode from "./GlobePayQrcode";
|
|
|
27
27
|
import { walletPassPay } from "./WalletPass/serve";
|
|
28
28
|
import { formatWalletPassParams } from "../utils";
|
|
29
29
|
import useEngineContext from "../../../../hooks/useEngineContext";
|
|
30
|
-
import { isJson } from "@pisell/utils";
|
|
30
|
+
import { isJson, sendWarningLog } from "@pisell/utils";
|
|
31
31
|
var isOfflinePayment = function isOfflinePayment(type) {
|
|
32
32
|
if (isCustomPayment(type)) {
|
|
33
33
|
return true;
|
|
@@ -35,7 +35,7 @@ var isOfflinePayment = function isOfflinePayment(type) {
|
|
|
35
35
|
return ['pisell.bank_deposit', 'pisell.offline_payment', 'pisell.other.cashmanual', 'pisell.custom_bank_transfer'].includes(type);
|
|
36
36
|
};
|
|
37
37
|
var PaymentMethods = function PaymentMethods(props, ref) {
|
|
38
|
-
var _context$appHelper
|
|
38
|
+
var _context$appHelper;
|
|
39
39
|
var MWCreditCardRef = useRef(null);
|
|
40
40
|
var SuperPayAliPayH5Ref = useRef(null);
|
|
41
41
|
var StripePayRef = useRef(null);
|
|
@@ -62,15 +62,33 @@ var PaymentMethods = function PaymentMethods(props, ref) {
|
|
|
62
62
|
case 0:
|
|
63
63
|
type = _ref.type, payGroup = _ref.payGroup;
|
|
64
64
|
waitAmount = (payGroup === null || payGroup === void 0 ? void 0 : payGroup.wait_amount) || 0;
|
|
65
|
-
cards = payGroup === null || payGroup === void 0 || (_payGroup$walletPass = payGroup.walletPass) === null || _payGroup$walletPass === void 0 || (_payGroup$walletPass = _payGroup$walletPass.cards) === null || _payGroup$walletPass === void 0 ? void 0 : _payGroup$walletPass.length;
|
|
65
|
+
cards = payGroup === null || payGroup === void 0 || (_payGroup$walletPass = payGroup.walletPass) === null || _payGroup$walletPass === void 0 || (_payGroup$walletPass = _payGroup$walletPass.cards) === null || _payGroup$walletPass === void 0 ? void 0 : _payGroup$walletPass.length;
|
|
66
|
+
sendWarningLog({
|
|
67
|
+
title: '支付初始化',
|
|
68
|
+
content: [{
|
|
69
|
+
key: 'type',
|
|
70
|
+
value: type
|
|
71
|
+
}, {
|
|
72
|
+
key: 'payGroup',
|
|
73
|
+
value: JSON.stringify(payGroup)
|
|
74
|
+
}, {
|
|
75
|
+
key: 'waitAmount',
|
|
76
|
+
value: waitAmount
|
|
77
|
+
}, {
|
|
78
|
+
key: 'cards',
|
|
79
|
+
value: cards
|
|
80
|
+
}]
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
// 仅选择钱包 并且当前选择的支付方式是 线下支付|自定义支付|银行转账, 前置支付钱包
|
|
66
84
|
if (!(cards && (waitAmount <= 0 || isOfflinePayment(type)))) {
|
|
67
|
-
_context.next =
|
|
85
|
+
_context.next = 15;
|
|
68
86
|
break;
|
|
69
87
|
}
|
|
70
|
-
_context.prev =
|
|
71
|
-
_context.next =
|
|
88
|
+
_context.prev = 5;
|
|
89
|
+
_context.next = 8;
|
|
72
90
|
return walletPassPay(formatWalletPassParams(payGroup));
|
|
73
|
-
case
|
|
91
|
+
case 8:
|
|
74
92
|
// 支付成功后 清空卡片
|
|
75
93
|
syncPayGroupToStorage(_objectSpread(_objectSpread({}, payGroup), {}, {
|
|
76
94
|
walletPass: _objectSpread(_objectSpread({}, payGroup.walletPass), {}, {
|
|
@@ -78,11 +96,26 @@ var PaymentMethods = function PaymentMethods(props, ref) {
|
|
|
78
96
|
paid: true
|
|
79
97
|
})
|
|
80
98
|
}));
|
|
81
|
-
_context.next =
|
|
99
|
+
_context.next = 15;
|
|
82
100
|
break;
|
|
83
|
-
case
|
|
84
|
-
_context.prev =
|
|
85
|
-
_context.t0 = _context["catch"](
|
|
101
|
+
case 11:
|
|
102
|
+
_context.prev = 11;
|
|
103
|
+
_context.t0 = _context["catch"](5);
|
|
104
|
+
sendWarningLog({
|
|
105
|
+
title: '钱包支付失败 catch',
|
|
106
|
+
content: [{
|
|
107
|
+
key: '错误信息',
|
|
108
|
+
value: (_context.t0 === null || _context.t0 === void 0 ? void 0 : _context.t0.message) || '未知错误'
|
|
109
|
+
}, {
|
|
110
|
+
key: '错误堆栈',
|
|
111
|
+
value: (_context.t0 === null || _context.t0 === void 0 ? void 0 : _context.t0.stack) || '无堆栈信息'
|
|
112
|
+
}, {
|
|
113
|
+
key: '错误类型',
|
|
114
|
+
value: (_context.t0 === null || _context.t0 === void 0 ? void 0 : _context.t0.name) || '未知错误类型'
|
|
115
|
+
}]
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
// 钱包支付失败时 跳转失败页面 不继续后续流程
|
|
86
119
|
return _context.abrupt("return", props.payCallback({
|
|
87
120
|
key: 'fail',
|
|
88
121
|
data: {
|
|
@@ -91,38 +124,53 @@ var PaymentMethods = function PaymentMethods(props, ref) {
|
|
|
91
124
|
fn: 'init'
|
|
92
125
|
}
|
|
93
126
|
}));
|
|
94
|
-
case
|
|
127
|
+
case 15:
|
|
95
128
|
if (!(waitAmount <= 0)) {
|
|
96
|
-
_context.next =
|
|
129
|
+
_context.next = 18;
|
|
97
130
|
break;
|
|
98
131
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
132
|
+
try {
|
|
133
|
+
// 清空交易组
|
|
134
|
+
removePayGroupFromStorage(payGroup.order_id);
|
|
135
|
+
props.payCallback({
|
|
136
|
+
key: 'success'
|
|
137
|
+
});
|
|
138
|
+
} catch (err) {
|
|
139
|
+
sendWarningLog({
|
|
140
|
+
title: '跳转成功页面 catch',
|
|
141
|
+
content: [{
|
|
142
|
+
key: '错误信息',
|
|
143
|
+
value: (err === null || err === void 0 ? void 0 : err.message) || '未知错误'
|
|
144
|
+
}, {
|
|
145
|
+
key: '错误堆栈',
|
|
146
|
+
value: (err === null || err === void 0 ? void 0 : err.stack) || '无堆栈信息'
|
|
147
|
+
}, {
|
|
148
|
+
key: '错误类型',
|
|
149
|
+
value: (err === null || err === void 0 ? void 0 : err.name) || '未知错误类型'
|
|
150
|
+
}]
|
|
151
|
+
});
|
|
152
|
+
}
|
|
104
153
|
return _context.abrupt("return");
|
|
105
|
-
case
|
|
106
|
-
_context.next =
|
|
154
|
+
case 18:
|
|
155
|
+
_context.next = 20;
|
|
107
156
|
return onPayByType({
|
|
108
157
|
type: type,
|
|
109
158
|
payGroup: payGroup
|
|
110
159
|
});
|
|
111
|
-
case
|
|
160
|
+
case 20:
|
|
112
161
|
case "end":
|
|
113
162
|
return _context.stop();
|
|
114
163
|
}
|
|
115
|
-
}, _callee, null, [[
|
|
164
|
+
}, _callee, null, [[5, 11]]);
|
|
116
165
|
}));
|
|
117
166
|
return function init(_x) {
|
|
118
167
|
return _ref2.apply(this, arguments);
|
|
119
168
|
};
|
|
120
169
|
}();
|
|
121
|
-
console.log('paymentResult isAppEnv', interaction === null || interaction === void 0 || (_interaction$utils = interaction.utils) === null || _interaction$utils === void 0 || (_interaction$utils$is = _interaction$utils.isAppEnv) === null || _interaction$utils$is === void 0 ? void 0 : _interaction$utils$is.call(_interaction$utils), interaction, context);
|
|
122
170
|
useEffect(function () {
|
|
123
|
-
var _interaction$
|
|
124
|
-
console.log('paymentResult isAppEnv', interaction === null || interaction === void 0 || (_interaction$
|
|
125
|
-
if (interaction !== null && interaction !== void 0 && (_interaction$
|
|
171
|
+
var _interaction$utils, _interaction$utils$is, _interaction$utils2, _interaction$utils2$i;
|
|
172
|
+
console.log('paymentResult isAppEnv', interaction === null || interaction === void 0 || (_interaction$utils = interaction.utils) === null || _interaction$utils === void 0 || (_interaction$utils$is = _interaction$utils.isAppEnv) === null || _interaction$utils$is === void 0 ? void 0 : _interaction$utils$is.call(_interaction$utils));
|
|
173
|
+
if (interaction !== null && interaction !== void 0 && (_interaction$utils2 = interaction.utils) !== null && _interaction$utils2 !== void 0 && (_interaction$utils2$i = _interaction$utils2.isAppEnv) !== null && _interaction$utils2$i !== void 0 && _interaction$utils2$i.call(_interaction$utils2)) {
|
|
126
174
|
interaction.utils.mountFunction('global', 'paymentResult', function (strResult) {
|
|
127
175
|
console.log('paymentResult', strResult);
|
|
128
176
|
if (!isJson(strResult)) return;
|