@pisell/private-materials 3.3.85 → 3.3.86
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/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/Sales/index.js +37 -4
- package/es/components/Sales/Resource/index.js +2 -2
- package/es/components/Sales/Resource/serve.d.ts +7 -0
- package/es/components/Sales/Resource/serve.js +10 -0
- package/es/components/appointmentBooking/components/Cart/Item/index.less +3 -3
- package/es/components/appointmentBooking/components/Content/index.less +1 -1
- package/es/components/appointmentBooking/components/Header/index.d.ts +3 -0
- package/es/components/appointmentBooking/components/Services/index.js +23 -27
- package/es/components/appointmentBooking/components/Voucher/index.js +1 -1
- package/es/components/appointmentBooking/index.js +14 -0
- package/es/components/appointmentBooking/index.less +1 -1
- package/es/components/appointmentBooking/locales.d.ts +0 -3
- package/es/components/appointmentBooking/locales.js +0 -3
- package/es/components/booking/addons/model.d.ts +10 -1
- package/es/components/booking/components/TabProduct/tabs/index.js +1 -5
- package/es/components/booking/components/browserSelect/index.js +1 -1
- package/es/components/booking/components/footer/utils.d.ts +1 -0
- package/es/components/booking/components/footer/utils.js +1 -1
- package/es/components/booking/components/voucher/index.js +2 -2
- package/es/components/booking/editBookingModal/index.d.ts +5 -0
- package/es/components/booking/editBookingModal/index.js +386 -0
- package/es/components/booking/editBookingModal/index.less +8 -0
- package/es/components/booking/editBookingModal/locales.d.ts +21 -0
- package/es/components/booking/editBookingModal/locales.js +20 -0
- package/es/components/booking/editBookingModal/mock.d.ts +807 -0
- package/es/components/booking/editBookingModal/mock.js +2993 -0
- package/es/components/booking/editBookingModal/serve.d.ts +51 -0
- package/es/components/booking/editBookingModal/serve.js +288 -0
- package/es/components/booking/editBookingModal/type.d.ts +12 -0
- package/es/components/booking/editBookingModal/type.js +1 -0
- package/es/components/booking/editBookingModal/utils.d.ts +12 -0
- package/es/components/booking/editBookingModal/utils.js +157 -0
- package/es/components/booking/forms/model.d.ts +10 -1
- package/es/components/booking/forms/model.js +5 -5
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
- package/es/components/booking/info/model.d.ts +10 -1
- package/es/components/booking/info/service/like/index.js +1 -1
- package/es/components/booking/info/service2/utils.d.ts +1 -1
- package/es/components/booking/info/service2/utils.js +3 -2
- package/es/components/booking/info2/service/addService/utils.d.ts +10 -0
- package/es/components/booking/info2/service/addService/utils.js +44 -13
- package/es/components/booking/info2/service/editService/Resources/index.js +22 -8
- package/es/components/booking/info2/service/editService/Resources/index.less +6 -0
- package/es/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.d.ts +7 -0
- package/es/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.js +26 -0
- package/es/components/booking/info2/service/editService/ResourcesV2/index.d.ts +10 -0
- package/es/components/booking/info2/service/editService/ResourcesV2/index.js +308 -0
- package/es/components/booking/info2/service/editService/ResourcesV2/index.less +44 -0
- package/es/components/booking/info2/utilsByBooking.js +9 -0
- package/es/components/booking/locales.d.ts +3 -0
- package/es/components/booking/locales.js +3 -0
- package/es/components/booking/materiels/startTime/index.js +1 -1
- package/es/components/booking/model.d.ts +9 -1
- 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 +10 -1
- package/es/components/booking/notes/model.js +5 -5
- package/es/components/booking/payments/model.d.ts +10 -1
- package/es/components/booking/payments/model.js +5 -5
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/eftposPay/const.d.ts +4 -1
- package/es/components/eftposPay/const.js +3 -1
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/hooks.js +3 -1
- package/es/components/eftposPay/index.js +1 -1
- package/es/components/eftposPay/linkly/const.d.ts +23 -0
- package/es/components/eftposPay/linkly/const.js +82 -0
- package/es/components/eftposPay/linkly/hooks/index.d.ts +2 -0
- package/es/components/eftposPay/linkly/hooks/index.js +2 -0
- package/es/components/eftposPay/linkly/hooks/normal.d.ts +30 -0
- package/es/components/eftposPay/linkly/hooks/normal.js +318 -0
- package/es/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +4 -0
- package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +273 -0
- package/es/components/eftposPay/linkly/index.d.ts +2 -0
- package/es/components/eftposPay/linkly/index.js +197 -0
- package/es/components/eftposPay/linkly/service.d.ts +32 -0
- package/es/components/eftposPay/linkly/service.js +73 -0
- package/es/components/eftposPay/manufacturer.d.ts +1 -0
- package/es/components/eftposPay/manufacturer.js +4 -0
- package/es/components/eftposPay/pay.d.ts +1 -1
- package/es/components/eftposPay/pay.js +6 -2
- package/es/components/eftposPay/store/index.d.ts +1 -1
- package/es/components/eventBooking/components/Provider/Event/index.js +13 -4
- package/es/components/eventBooking/components/bookingDetailModal/index.js +19 -3
- package/es/components/eventBooking/index.js +21 -7
- package/es/components/eventBooking/locales.js +3 -3
- package/es/components/index.d.ts +3 -1
- package/es/components/index.js +3 -1
- package/es/components/listComponent/index.js +5 -5
- package/es/components/pay/toC/PaymentMethods/index.js +5 -4
- package/es/components/pay/toC/model.d.ts +9 -1
- 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/Search/index.js +5 -5
- package/es/components/schedules/model.d.ts +9 -1
- 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.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/stepController/components/Content/index.d.ts +7 -0
- package/es/components/stepController/components/Content/index.js +9 -0
- package/es/components/stepController/components/Content/index.less +8 -0
- package/es/components/stepController/components/Footer/index.d.ts +8 -0
- package/es/components/stepController/components/Footer/index.js +15 -0
- package/es/components/stepController/components/Footer/index.less +39 -0
- package/es/components/stepController/components/Header/index.d.ts +20 -0
- package/es/components/stepController/components/Header/index.js +97 -0
- package/es/components/stepController/components/Header/index.less +21 -0
- package/es/components/stepController/index.d.ts +5 -0
- package/es/components/stepController/index.js +64 -0
- package/es/components/stepController/index.less +11 -0
- package/es/components/stepController/locales.d.ts +27 -0
- package/es/components/stepController/locales.js +32 -0
- package/es/components/stepController/types.d.ts +23 -0
- package/es/components/stepController/types.js +1 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
- package/es/components/ticketBooking/components/ticketBooking/index.d.ts +1 -0
- package/es/components/ticketBooking/components/ticketBooking/index.js +257 -138
- package/es/components/ticketBooking/locales.d.ts +164 -146
- package/es/components/ticketBooking/locales.js +195 -147
- package/es/components/ticketBooking/utils/formatProductMessage.d.ts +2 -0
- package/es/components/ticketBooking/utils/formatProductMessage.js +62 -0
- package/es/components/ticketBooking/utils/formatTime.d.ts +31 -0
- package/es/components/ticketBooking/utils/formatTime.js +144 -0
- package/es/components/wallet/Detail/model.d.ts +13 -1
- package/es/components/wallet/DiscountCard/model.d.ts +14 -1
- package/es/components/wallet/PointCard/model.d.ts +13 -1
- package/es/components/wallet/RechargeableCard/model.d.ts +29 -1
- package/es/components/wallet/Voucher/model.d.ts +13 -1
- package/es/components/wallet/model.d.ts +9 -1
- package/es/hooks/useComponents.js +1 -1
- package/es/hooks/useWindowSize.d.ts +5 -0
- package/es/hooks/useWindowSize.js +26 -0
- package/es/index.d.ts +2 -0
- package/es/index.js +3 -1
- package/es/utils/index.d.ts +1 -1
- package/lib/businessModel/SalesModel/Sales/index.js +22 -8
- package/lib/components/Sales/Resource/index.js +1 -1
- package/lib/components/Sales/Resource/serve.d.ts +7 -0
- package/lib/components/Sales/Resource/serve.js +9 -2
- package/lib/components/appointmentBooking/components/Cart/Item/index.less +3 -3
- package/lib/components/appointmentBooking/components/Content/index.less +1 -1
- package/lib/components/appointmentBooking/components/Header/index.d.ts +3 -0
- package/lib/components/appointmentBooking/components/Services/index.js +6 -11
- package/lib/components/appointmentBooking/components/Voucher/index.js +1 -1
- package/lib/components/appointmentBooking/index.js +11 -0
- package/lib/components/appointmentBooking/index.less +1 -1
- package/lib/components/appointmentBooking/locales.d.ts +0 -3
- package/lib/components/appointmentBooking/locales.js +0 -3
- package/lib/components/booking/addons/model.d.ts +10 -1
- package/lib/components/booking/components/footer/utils.d.ts +1 -0
- package/lib/components/booking/components/footer/utils.js +2 -0
- package/lib/components/booking/components/voucher/index.js +11 -23
- package/lib/components/booking/editBookingModal/index.d.ts +5 -0
- package/lib/components/booking/editBookingModal/index.js +363 -0
- package/lib/components/booking/editBookingModal/index.less +8 -0
- package/lib/components/booking/editBookingModal/locales.d.ts +21 -0
- package/lib/components/booking/editBookingModal/locales.js +44 -0
- package/lib/components/booking/editBookingModal/mock.d.ts +807 -0
- package/lib/components/booking/editBookingModal/mock.js +3314 -0
- package/lib/components/booking/editBookingModal/serve.d.ts +51 -0
- package/lib/components/booking/editBookingModal/serve.js +178 -0
- package/lib/components/booking/editBookingModal/type.d.ts +12 -0
- package/lib/components/booking/editBookingModal/type.js +17 -0
- package/lib/components/booking/editBookingModal/utils.d.ts +12 -0
- package/lib/components/booking/editBookingModal/utils.js +158 -0
- package/lib/components/booking/forms/model.d.ts +10 -1
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
- package/lib/components/booking/info/model.d.ts +10 -1
- package/lib/components/booking/info/service2/utils.d.ts +1 -1
- package/lib/components/booking/info/service2/utils.js +2 -2
- package/lib/components/booking/info2/service/addService/utils.d.ts +10 -0
- package/lib/components/booking/info2/service/addService/utils.js +27 -4
- package/lib/components/booking/info2/service/editService/Resources/index.js +54 -10
- package/lib/components/booking/info2/service/editService/Resources/index.less +6 -0
- package/lib/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.d.ts +7 -0
- package/lib/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.js +53 -0
- package/lib/components/booking/info2/service/editService/ResourcesV2/index.d.ts +10 -0
- package/lib/components/booking/info2/service/editService/ResourcesV2/index.js +311 -0
- package/lib/components/booking/info2/service/editService/ResourcesV2/index.less +44 -0
- package/lib/components/booking/info2/utilsByBooking.js +6 -0
- package/lib/components/booking/locales.d.ts +3 -0
- package/lib/components/booking/locales.js +3 -0
- package/lib/components/booking/model.d.ts +9 -1
- package/lib/components/booking/notes/model.d.ts +10 -1
- package/lib/components/booking/payments/model.d.ts +10 -1
- package/lib/components/booking/utils.d.ts +2 -2
- package/lib/components/eftposPay/const.d.ts +4 -1
- package/lib/components/eftposPay/const.js +2 -0
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/hooks.js +11 -4
- package/lib/components/eftposPay/index.js +1 -1
- package/lib/components/eftposPay/linkly/const.d.ts +23 -0
- package/lib/components/eftposPay/linkly/const.js +102 -0
- package/lib/components/eftposPay/linkly/hooks/index.d.ts +2 -0
- package/lib/components/eftposPay/linkly/hooks/index.js +25 -0
- package/lib/components/eftposPay/linkly/hooks/normal.d.ts +30 -0
- package/lib/components/eftposPay/linkly/hooks/normal.js +239 -0
- package/lib/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +4 -0
- package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +222 -0
- package/lib/components/eftposPay/linkly/index.d.ts +2 -0
- package/lib/components/eftposPay/linkly/index.js +208 -0
- package/lib/components/eftposPay/linkly/service.d.ts +32 -0
- package/lib/components/eftposPay/linkly/service.js +55 -0
- package/lib/components/eftposPay/manufacturer.d.ts +1 -0
- package/lib/components/eftposPay/manufacturer.js +6 -0
- package/lib/components/eftposPay/pay.d.ts +1 -1
- package/lib/components/eftposPay/pay.js +13 -2
- package/lib/components/eftposPay/store/index.d.ts +1 -1
- package/lib/components/eventBooking/components/Provider/Event/index.js +10 -3
- package/lib/components/eventBooking/components/bookingDetailModal/index.js +9 -3
- package/lib/components/eventBooking/index.js +11 -7
- package/lib/components/eventBooking/locales.js +3 -3
- package/lib/components/index.d.ts +3 -1
- package/lib/components/index.js +6 -0
- package/lib/components/pay/toC/PaymentMethods/index.js +10 -9
- package/lib/components/pay/toC/model.d.ts +9 -1
- package/lib/components/schedules/model.d.ts +9 -1
- package/lib/components/schedules/utils.d.ts +1 -1
- package/lib/components/schedules/utils.js +1 -1
- package/lib/components/stepController/components/Content/index.d.ts +7 -0
- package/lib/components/stepController/components/Content/index.js +40 -0
- package/lib/components/stepController/components/Content/index.less +8 -0
- package/lib/components/stepController/components/Footer/index.d.ts +8 -0
- package/lib/components/stepController/components/Footer/index.js +49 -0
- package/lib/components/stepController/components/Footer/index.less +39 -0
- package/lib/components/stepController/components/Header/index.d.ts +20 -0
- package/lib/components/stepController/components/Header/index.js +104 -0
- package/lib/components/stepController/components/Header/index.less +21 -0
- package/lib/components/stepController/index.d.ts +5 -0
- package/lib/components/stepController/index.js +89 -0
- package/lib/components/stepController/index.less +11 -0
- package/lib/components/stepController/locales.d.ts +27 -0
- package/lib/components/stepController/locales.js +50 -0
- package/lib/components/stepController/types.d.ts +23 -0
- package/lib/components/stepController/types.js +17 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
- package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/ticketBooking/index.js +263 -139
- package/lib/components/ticketBooking/locales.d.ts +164 -146
- package/lib/components/ticketBooking/locales.js +22 -4
- package/lib/components/ticketBooking/utils/formatProductMessage.d.ts +2 -0
- package/lib/components/ticketBooking/utils/formatProductMessage.js +84 -0
- package/lib/components/ticketBooking/utils/formatTime.d.ts +31 -0
- package/lib/components/ticketBooking/utils/formatTime.js +139 -0
- package/lib/components/wallet/Detail/model.d.ts +13 -1
- package/lib/components/wallet/DiscountCard/model.d.ts +14 -1
- package/lib/components/wallet/PointCard/model.d.ts +13 -1
- package/lib/components/wallet/RechargeableCard/model.d.ts +29 -1
- package/lib/components/wallet/Voucher/model.d.ts +13 -1
- package/lib/components/wallet/model.d.ts +9 -1
- package/lib/hooks/useWindowSize.d.ts +5 -0
- package/lib/hooks/useWindowSize.js +51 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +6 -0
- package/lib/utils/index.d.ts +1 -1
- package/lowcode/edit-booking-modal/meta.ts +53 -0
- package/lowcode/step-controller/meta.ts +88 -0
- package/package.json +4 -4
|
@@ -0,0 +1,197 @@
|
|
|
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
|
+
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(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
|
+
import React, { useEffect, useRef } from 'react';
|
|
8
|
+
import { Button } from 'antd';
|
|
9
|
+
import { locales } from '@pisell/utils';
|
|
10
|
+
import { useContextData, useDispatch, updateCustom, updateState, updateNextStep } from "../store";
|
|
11
|
+
import { useFail, useStoreRef } from "../hooks";
|
|
12
|
+
import useEngineContext from "../../../hooks/useEngineContext";
|
|
13
|
+
import { request } from "../../../utils";
|
|
14
|
+
import Step from "../component/step/step";
|
|
15
|
+
import { StatusEnum } from "../const";
|
|
16
|
+
import { useLinklyCancel, useLinklyPayOrRefund, useTimeResultQuery, useLinklySignature } from "./hooks";
|
|
17
|
+
import { LinklyActionStatus } from "./const";
|
|
18
|
+
import { getPayParams } from "../helper";
|
|
19
|
+
var Linkly = function Linkly(_ref) {
|
|
20
|
+
var api = _ref.api,
|
|
21
|
+
onChange = _ref.onChange;
|
|
22
|
+
// 设置request
|
|
23
|
+
var context = useEngineContext();
|
|
24
|
+
var utils = context.appHelper.utils || {};
|
|
25
|
+
request.setRequest(utils === null || utils === void 0 ? void 0 : utils.request);
|
|
26
|
+
var _useContextData = useContextData(),
|
|
27
|
+
custom = _useContextData.custom,
|
|
28
|
+
status = _useContextData.status;
|
|
29
|
+
var _useStoreRef = useStoreRef(),
|
|
30
|
+
statusRef = _useStoreRef.statusRef,
|
|
31
|
+
netRef = _useStoreRef.netRef,
|
|
32
|
+
modeRef = _useStoreRef.modeRef,
|
|
33
|
+
amountRef = _useStoreRef.amountRef,
|
|
34
|
+
orderIdRef = _useStoreRef.orderIdRef,
|
|
35
|
+
numRef = _useStoreRef.numRef,
|
|
36
|
+
deviceRef = _useStoreRef.deviceRef,
|
|
37
|
+
payRef = _useStoreRef.payRef;
|
|
38
|
+
var dispatch = useDispatch();
|
|
39
|
+
var stepRef = useRef(custom === null || custom === void 0 ? void 0 : custom.step);
|
|
40
|
+
var fail = useFail(0);
|
|
41
|
+
var failRef = useRef(fail);
|
|
42
|
+
var initRef = useRef(false);
|
|
43
|
+
var controllerRef = useRef();
|
|
44
|
+
var unloadRef = useRef(false);
|
|
45
|
+
var clearRef = useRef();
|
|
46
|
+
|
|
47
|
+
// 检查是否可以继续处理接口返回结果,无网 或 已卸载 则不进行处理
|
|
48
|
+
var handleCheck = function handleCheck() {
|
|
49
|
+
return !(unloadRef.current || !netRef.current);
|
|
50
|
+
};
|
|
51
|
+
var handleLinklySuccess = function handleLinklySuccess(res) {
|
|
52
|
+
var resData = (res === null || res === void 0 ? void 0 : res.data) || {};
|
|
53
|
+
var receipt = Array.isArray(resData === null || resData === void 0 ? void 0 : resData.receipt) ? resData.receipt : [resData.receipt];
|
|
54
|
+
receipt = receipt.filter(function (item) {
|
|
55
|
+
return typeof item === 'string';
|
|
56
|
+
}).filter(Boolean);
|
|
57
|
+
dispatch(updateNextStep());
|
|
58
|
+
// 将所有步骤状态设为完成 resolve
|
|
59
|
+
dispatch(updateCustom({
|
|
60
|
+
card_reader_surcharge: (resData === null || resData === void 0 ? void 0 : resData.card_reader_surcharge) || 0,
|
|
61
|
+
receipt: receipt
|
|
62
|
+
}));
|
|
63
|
+
|
|
64
|
+
// 更新支付状态与文案
|
|
65
|
+
dispatch(updateState({
|
|
66
|
+
status: 'success',
|
|
67
|
+
title: locales.getText('page.eftpos-pay.text.successful')(modeRef.current)
|
|
68
|
+
}));
|
|
69
|
+
clearRef.current = setTimeout(function () {
|
|
70
|
+
var _deviceRef$current;
|
|
71
|
+
var params = getPayParams({
|
|
72
|
+
mode: modeRef.current,
|
|
73
|
+
amount: amountRef.current,
|
|
74
|
+
order_id: orderIdRef.current,
|
|
75
|
+
number: numRef.current,
|
|
76
|
+
device: deviceRef.current,
|
|
77
|
+
pay: payRef.current,
|
|
78
|
+
custom: {
|
|
79
|
+
card_reader_surcharge: (resData === null || resData === void 0 ? void 0 : resData.card_reader_surcharge) || 0,
|
|
80
|
+
receipt: receipt
|
|
81
|
+
}
|
|
82
|
+
}, 'success');
|
|
83
|
+
onChange('success', _objectSpread(_objectSpread({}, params), {}, {
|
|
84
|
+
receipt: (_deviceRef$current = deviceRef.current) !== null && _deviceRef$current !== void 0 && (_deviceRef$current = _deviceRef$current.setting) !== null && _deviceRef$current !== void 0 && _deviceRef$current.receipts ? [] : receipt
|
|
85
|
+
}));
|
|
86
|
+
}, 1000);
|
|
87
|
+
};
|
|
88
|
+
var _useLinklyPayOrRefund = useLinklyPayOrRefund(handleCheck),
|
|
89
|
+
payOrRefund = _useLinklyPayOrRefund.payOrRefund;
|
|
90
|
+
var _useLinklyCancel = useLinklyCancel(handleCheck),
|
|
91
|
+
linklyCancel = _useLinklyCancel.linklyCancel;
|
|
92
|
+
var _useTimeResultQuery = useTimeResultQuery(api, handleCheck, handleLinklySuccess),
|
|
93
|
+
resultQuery = _useTimeResultQuery.run,
|
|
94
|
+
stopResultQuery = _useTimeResultQuery.stop;
|
|
95
|
+
var _useLinklySignature = useLinklySignature(handleCheck),
|
|
96
|
+
linklySignature = _useLinklySignature.linklySignature;
|
|
97
|
+
useEffect(function () {
|
|
98
|
+
stepRef.current = custom === null || custom === void 0 ? void 0 : custom.step;
|
|
99
|
+
}, [custom === null || custom === void 0 ? void 0 : custom.step]);
|
|
100
|
+
useEffect(function () {
|
|
101
|
+
failRef.current = fail;
|
|
102
|
+
}, [fail]);
|
|
103
|
+
useEffect(function () {
|
|
104
|
+
if (statusRef.current === StatusEnum.Success || statusRef.current === StatusEnum.Fail) {
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
if (initRef.current) {
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
initRef.current = true;
|
|
111
|
+
|
|
112
|
+
// 存在支付流水号
|
|
113
|
+
if (numRef.current) {
|
|
114
|
+
resultQuery();
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
payOrRefund(resultQuery, handleLinklySuccess);
|
|
118
|
+
}, []);
|
|
119
|
+
useEffect(function () {
|
|
120
|
+
return function () {
|
|
121
|
+
var _controllerRef$curren;
|
|
122
|
+
(_controllerRef$curren = controllerRef.current) === null || _controllerRef$curren === void 0 || _controllerRef$curren.abort();
|
|
123
|
+
unloadRef.current = true;
|
|
124
|
+
if (clearRef.current) {
|
|
125
|
+
clearTimeout(clearRef.current);
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
}, []);
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* 取消支付
|
|
132
|
+
*/
|
|
133
|
+
var onCancel = function onCancel() {
|
|
134
|
+
stopResultQuery();
|
|
135
|
+
linklyCancel(resultQuery);
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* 拒绝签名
|
|
140
|
+
*/
|
|
141
|
+
var onDecline = function onDecline() {
|
|
142
|
+
stopResultQuery();
|
|
143
|
+
linklySignature(2, resultQuery);
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* 接受签名
|
|
148
|
+
*/
|
|
149
|
+
var onAccept = function onAccept() {
|
|
150
|
+
stopResultQuery();
|
|
151
|
+
linklySignature(3, resultQuery);
|
|
152
|
+
};
|
|
153
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
154
|
+
className: "pisell-lowcode__eft-pay-body"
|
|
155
|
+
}, ((custom === null || custom === void 0 ? void 0 : custom.list) || []).map(function (item) {
|
|
156
|
+
return /*#__PURE__*/React.createElement(Step, {
|
|
157
|
+
key: item.index,
|
|
158
|
+
pedding: item.pedding,
|
|
159
|
+
resolve: item.resolve,
|
|
160
|
+
reject: item.reject,
|
|
161
|
+
status: item.status
|
|
162
|
+
});
|
|
163
|
+
}), status === StatusEnum.Loading ? /*#__PURE__*/React.createElement("div", {
|
|
164
|
+
className: "pisell-lowcode__eft-pay-step-item pisell-lowcode__eft-pay-step-item-tip"
|
|
165
|
+
}, locales.getText('page.eftpos-pay.text.processing')) : null, status === StatusEnum.Question ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
166
|
+
className: "pisell-lowcode__eft-pay-step-item pisell-lowcode__eft-pay-step-item-tip"
|
|
167
|
+
}, locales.getText('page.eftpos-pay.text.receipt.again.title')), /*#__PURE__*/React.createElement("div", {
|
|
168
|
+
className: "pisell-lowcode__eft-pay-step-item pisell-lowcode__eft-pay-step-item-tip"
|
|
169
|
+
}, locales.getText('page.eftpos-pay.text.receipt.again.text'))) : null, status === StatusEnum.Success ? /*#__PURE__*/React.createElement("div", {
|
|
170
|
+
className: "pisell-lowcode__eft-pay-step-item pisell-lowcode__eft-pay-step-item-tip"
|
|
171
|
+
}, locales.getText('page.eftpos-pay.text.transaction.end')) : null), (custom === null || custom === void 0 ? void 0 : custom.actionStatus) === LinklyActionStatus.Cancel ? /*#__PURE__*/React.createElement("div", {
|
|
172
|
+
className: "pisell-lowcode__eft-pay-step-item-btns"
|
|
173
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
174
|
+
block: true,
|
|
175
|
+
className: "pisell-lowcode__eft-pay-step-item-btn",
|
|
176
|
+
onClick: onCancel,
|
|
177
|
+
disabled: !!(custom !== null && custom !== void 0 && custom.buttonDisabled)
|
|
178
|
+
}, locales.getText('page.eftpos-pay.text.cancel'))) : null, (custom === null || custom === void 0 ? void 0 : custom.actionStatus) === LinklyActionStatus.CancelWaiting || (custom === null || custom === void 0 ? void 0 : custom.actionStatus) === LinklyActionStatus.SignatureWaiting ? /*#__PURE__*/React.createElement("div", {
|
|
179
|
+
className: "pisell-lowcode__eft-pay-step-item-btns"
|
|
180
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
181
|
+
block: true,
|
|
182
|
+
className: "pisell-lowcode__eft-pay-step-item-btn",
|
|
183
|
+
disabled: true
|
|
184
|
+
}, locales.getText('page.eftpos-pay.text.leave'))) : null, (custom === null || custom === void 0 ? void 0 : custom.actionStatus) === LinklyActionStatus.Signature ? /*#__PURE__*/React.createElement("div", {
|
|
185
|
+
className: "pisell-lowcode__eft-pay-step-item-btns"
|
|
186
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
187
|
+
block: true,
|
|
188
|
+
className: "pisell-lowcode__eft-pay-step-item-btn",
|
|
189
|
+
onClick: onDecline
|
|
190
|
+
}, locales.getText('page.eftpos-pay.text.decline')), /*#__PURE__*/React.createElement(Button, {
|
|
191
|
+
block: true,
|
|
192
|
+
type: "primary",
|
|
193
|
+
className: "pisell-lowcode__eft-pay-step-item-btn",
|
|
194
|
+
onClick: onAccept
|
|
195
|
+
}, locales.getText('page.eftpos-pay.text.accept'))) : null);
|
|
196
|
+
};
|
|
197
|
+
export default Linkly;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* linkly支付接口
|
|
3
|
+
*/
|
|
4
|
+
export declare const linklyPayApi: (data: any) => Promise<any>;
|
|
5
|
+
/**
|
|
6
|
+
* 查询linkly支付结果
|
|
7
|
+
*/
|
|
8
|
+
export declare const linklyPayQueryApi: (param: any) => Promise<any>;
|
|
9
|
+
/**
|
|
10
|
+
* 取消linkly支付
|
|
11
|
+
*/
|
|
12
|
+
export declare const linklyPayCancelApi: (param: any) => Promise<any>;
|
|
13
|
+
/**
|
|
14
|
+
* linkly支付签名结果处理
|
|
15
|
+
*/
|
|
16
|
+
export declare const linklyPaySignatureApi: (param: any) => Promise<any>;
|
|
17
|
+
/**
|
|
18
|
+
* linkly退款接口
|
|
19
|
+
*/
|
|
20
|
+
export declare const linklyRefundApi: (data: any) => Promise<any>;
|
|
21
|
+
/**
|
|
22
|
+
* 查询linkly退款结果
|
|
23
|
+
*/
|
|
24
|
+
export declare const linklyRefundQueryApi: (param: any) => Promise<any>;
|
|
25
|
+
/**
|
|
26
|
+
* 取消linkly退款
|
|
27
|
+
*/
|
|
28
|
+
export declare const linklyRefundCancelApi: (param: any) => Promise<any>;
|
|
29
|
+
/**
|
|
30
|
+
* linkly退款签名结果处理
|
|
31
|
+
*/
|
|
32
|
+
export declare const linklyRefundSignatureApi: (param: any) => Promise<any>;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { request } from "../../../utils";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* linkly支付接口
|
|
5
|
+
*/
|
|
6
|
+
export var linklyPayApi = function linklyPayApi(data) {
|
|
7
|
+
return request.getRequest().post('/shop/linkly/pay/apply', data, {
|
|
8
|
+
customMessage: true
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* 查询linkly支付结果
|
|
14
|
+
*/
|
|
15
|
+
export var linklyPayQueryApi = function linklyPayQueryApi(param) {
|
|
16
|
+
return request.getRequest().get('/shop/linkly/pay/query', param, {
|
|
17
|
+
customMessage: true
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* 取消linkly支付
|
|
23
|
+
*/
|
|
24
|
+
export var linklyPayCancelApi = function linklyPayCancelApi(param) {
|
|
25
|
+
return request.getRequest().post('/shop/linkly/pay/cancel', param, {
|
|
26
|
+
customMessage: true
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* linkly支付签名结果处理
|
|
32
|
+
*/
|
|
33
|
+
export var linklyPaySignatureApi = function linklyPaySignatureApi(param) {
|
|
34
|
+
return request.getRequest().post('/shop/linkly/pay/signature', param, {
|
|
35
|
+
customMessage: true
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* linkly退款接口
|
|
41
|
+
*/
|
|
42
|
+
export var linklyRefundApi = function linklyRefundApi(data) {
|
|
43
|
+
return request.getRequest().post('/shop/linkly/refund/apply', data, {
|
|
44
|
+
customMessage: true
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* 查询linkly退款结果
|
|
50
|
+
*/
|
|
51
|
+
export var linklyRefundQueryApi = function linklyRefundQueryApi(param) {
|
|
52
|
+
return request.getRequest().get('/shop/linkly/refund/query', param, {
|
|
53
|
+
customMessage: true
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* 取消linkly退款
|
|
59
|
+
*/
|
|
60
|
+
export var linklyRefundCancelApi = function linklyRefundCancelApi(param) {
|
|
61
|
+
return request.getRequest().post('/shop/linkly/refund/cancel', param, {
|
|
62
|
+
customMessage: true
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* linkly退款签名结果处理
|
|
68
|
+
*/
|
|
69
|
+
export var linklyRefundSignatureApi = function linklyRefundSignatureApi(param) {
|
|
70
|
+
return request.getRequest().post('/shop/linkly/refund/signature', param, {
|
|
71
|
+
customMessage: true
|
|
72
|
+
});
|
|
73
|
+
};
|
|
@@ -3,4 +3,5 @@ export { getAmonunt } from './helper';
|
|
|
3
3
|
export { default as Payo } from './payo';
|
|
4
4
|
export { default as Windcave } from './windcave/windcave';
|
|
5
5
|
export { default as Tyro } from './tyro';
|
|
6
|
+
export { default as Linkly } from './linkly';
|
|
6
7
|
export declare const getInitState: (type: string, params?: any) => State;
|
|
@@ -2,10 +2,12 @@ import { EftposEnum } from "./const";
|
|
|
2
2
|
import getPayoInitState from "./payo/const";
|
|
3
3
|
import getTyroInitState from "./tyro/const";
|
|
4
4
|
import getWindcaveInitState from "./windcave/const";
|
|
5
|
+
import getLinklyInitState from "./linkly/const";
|
|
5
6
|
export { getAmonunt } from "./helper";
|
|
6
7
|
export { default as Payo } from "./payo";
|
|
7
8
|
export { default as Windcave } from "./windcave/windcave";
|
|
8
9
|
export { default as Tyro } from "./tyro";
|
|
10
|
+
export { default as Linkly } from "./linkly";
|
|
9
11
|
export var getInitState = function getInitState(type, params) {
|
|
10
12
|
switch (type) {
|
|
11
13
|
case EftposEnum.Payo:
|
|
@@ -14,6 +16,8 @@ export var getInitState = function getInitState(type, params) {
|
|
|
14
16
|
return getWindcaveInitState(params);
|
|
15
17
|
case EftposEnum.Tyro:
|
|
16
18
|
return getTyroInitState(params);
|
|
19
|
+
case EftposEnum.Linkly:
|
|
20
|
+
return getLinklyInitState(params);
|
|
17
21
|
default:
|
|
18
22
|
throw new Error('未知的厂商类型');
|
|
19
23
|
}
|
|
@@ -6,7 +6,7 @@ import './index.less';
|
|
|
6
6
|
* @Author: hongbing.wang
|
|
7
7
|
* @Date: 2024-08-20 14:59
|
|
8
8
|
*/
|
|
9
|
-
declare const Pay: ({ api, onChange: onChangeStatus, className, terminal, net, isMobile, tyroUrl, tyroVersion, formatAmount, client }: PayProps & {
|
|
9
|
+
declare const Pay: ({ api, onChange: onChangeStatus, className, terminal, net, isMobile, tyroUrl, tyroVersion, formatAmount, client, }: PayProps & {
|
|
10
10
|
terminal: {
|
|
11
11
|
network: boolean;
|
|
12
12
|
};
|
|
@@ -10,7 +10,7 @@ import { getPayParams } from "./helper";
|
|
|
10
10
|
import Manual from "./component/manual";
|
|
11
11
|
import Signature from "./component/signature";
|
|
12
12
|
import { StatusEnum, PayRouteEnum, ClientEnum } from "./const";
|
|
13
|
-
import { Payo, Windcave, Tyro } from "./manufacturer";
|
|
13
|
+
import { Payo, Windcave, Tyro, Linkly } from "./manufacturer";
|
|
14
14
|
import { useContextData, useDispatch, updateStatus, backUpProduction, updateComponent, backUpFree, updateState } from "./store";
|
|
15
15
|
import "./index.less";
|
|
16
16
|
|
|
@@ -150,7 +150,7 @@ var Pay = function Pay(_ref) {
|
|
|
150
150
|
}
|
|
151
151
|
};
|
|
152
152
|
}, []);
|
|
153
|
-
|
|
153
|
+
console.log('data =>>>>>> ', data);
|
|
154
154
|
return /*#__PURE__*/React.createElement(React.Fragment, null, data.render ? /*#__PURE__*/React.createElement("div", {
|
|
155
155
|
className: "pisell-lowcode__eft-pay-box ".concat(className),
|
|
156
156
|
style: data.type === 'step' ? {} : {
|
|
@@ -178,6 +178,10 @@ var Pay = function Pay(_ref) {
|
|
|
178
178
|
onChange: onChange,
|
|
179
179
|
key: data.key,
|
|
180
180
|
formatAmount: formatAmount
|
|
181
|
+
}) : null, data.eftpos === 'linkly' ? /*#__PURE__*/React.createElement(Linkly, {
|
|
182
|
+
key: data.key,
|
|
183
|
+
api: api,
|
|
184
|
+
onChange: onChange
|
|
181
185
|
}) : null) : null, data.type === PayRouteEnum.Unset && Comm ? /*#__PURE__*/React.createElement(Comm, {
|
|
182
186
|
onChange: onChange,
|
|
183
187
|
api: api,
|
|
@@ -297,7 +297,7 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
|
297
297
|
amount?: string | number | undefined;
|
|
298
298
|
mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
|
|
299
299
|
order_id?: string | number | undefined;
|
|
300
|
-
eftpos?: "tyro" | "windcave" | "stripe" | "payo" | undefined;
|
|
300
|
+
eftpos?: "tyro" | "windcave" | "stripe" | "payo" | "linkly" | undefined;
|
|
301
301
|
action?: "amount" | "pay" | "deviceList" | undefined;
|
|
302
302
|
key?: number | undefined;
|
|
303
303
|
step?: number | undefined;
|
|
@@ -7,7 +7,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
7
7
|
import React, { useEffect, useState } from 'react';
|
|
8
8
|
import { isMobile, locales } from '@pisell/utils';
|
|
9
9
|
import { Skeleton } from 'antd';
|
|
10
|
-
import { useEvent, useSales, useEventDetail, useStep } from "../../../../Sales";
|
|
10
|
+
import { useEvent, useSales, useEventDetail, useStep, useCustomer } from "../../../../Sales";
|
|
11
11
|
import BookingServiceList from "../../bookingServiceList";
|
|
12
12
|
import BookingDetailModal from "../../bookingDetailModal";
|
|
13
13
|
import "./index.less";
|
|
@@ -31,6 +31,8 @@ var Event = function Event() {
|
|
|
31
31
|
lists = _useState2[0],
|
|
32
32
|
setLists = _useState2[1];
|
|
33
33
|
var customer = useLoginUser();
|
|
34
|
+
var _useCustomer = useCustomer(),
|
|
35
|
+
appUtils = _useCustomer.appUtils;
|
|
34
36
|
useEffect(function () {
|
|
35
37
|
var _data$stepData;
|
|
36
38
|
var eventList = (eventData === null || eventData === void 0 ? void 0 : eventData.eventList) || [];
|
|
@@ -45,16 +47,23 @@ var Event = function Event() {
|
|
|
45
47
|
}
|
|
46
48
|
}, [eventData === null || eventData === void 0 ? void 0 : eventData.eventList]);
|
|
47
49
|
useEffect(function () {
|
|
48
|
-
var _data$resourceData;
|
|
50
|
+
var _data$resourceData, _appUtils$getHistory, _history$location;
|
|
49
51
|
var id = data === null || data === void 0 || (_data$resourceData = data.resourceData) === null || _data$resourceData === void 0 || (_data$resourceData = _data$resourceData.currentResourceItem) === null || _data$resourceData === void 0 ? void 0 : _data$resourceData.id;
|
|
50
52
|
if (!id) return;
|
|
51
|
-
|
|
53
|
+
var history = (appUtils === null || appUtils === void 0 || (_appUtils$getHistory = appUtils.getHistory) === null || _appUtils$getHistory === void 0 ? void 0 : _appUtils$getHistory.call(appUtils)) || {};
|
|
54
|
+
var query = history === null || history === void 0 || (_history$location = history.location) === null || _history$location === void 0 ? void 0 : _history$location.query;
|
|
55
|
+
var params = {
|
|
52
56
|
event_item_resource_id: id,
|
|
53
57
|
skip: 1,
|
|
54
58
|
num: 100,
|
|
55
59
|
customer_id: customer === null || customer === void 0 ? void 0 : customer.id,
|
|
56
60
|
open_quotation: 1
|
|
57
|
-
}
|
|
61
|
+
};
|
|
62
|
+
if (query !== null && query !== void 0 && query.ids) {
|
|
63
|
+
var _query$ids;
|
|
64
|
+
params.ids = query === null || query === void 0 || (_query$ids = query.ids) === null || _query$ids === void 0 ? void 0 : _query$ids.split(',');
|
|
65
|
+
}
|
|
66
|
+
getEventList.run(params);
|
|
58
67
|
}, [data === null || data === void 0 || (_data$resourceData2 = data.resourceData) === null || _data$resourceData2 === void 0 || (_data$resourceData2 = _data$resourceData2.currentResourceItem) === null || _data$resourceData2 === void 0 ? void 0 : _data$resourceData2.id, customer === null || customer === void 0 ? void 0 : customer.id]);
|
|
59
68
|
|
|
60
69
|
/**
|
|
@@ -16,7 +16,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
16
16
|
import React, { useMemo, useRef, useState, useEffect } from 'react';
|
|
17
17
|
import { PisellModal, PisellAnchor, PisellImageCarousels } from '@pisell/materials';
|
|
18
18
|
import EventCard from "../eventCard";
|
|
19
|
-
import { useCart, useEventDetail } from "../../../Sales";
|
|
19
|
+
import { useCart, useEventDetail, useInit } from "../../../Sales";
|
|
20
20
|
import { isMobile, locales } from '@pisell/utils';
|
|
21
21
|
import Schedule from "./components/Schedule";
|
|
22
22
|
import Resource from "./components/Resource";
|
|
@@ -25,7 +25,7 @@ import OrderProductModal from "../Provider/OrderProductModal/index";
|
|
|
25
25
|
import "./index.less";
|
|
26
26
|
import useEngineContext from "../../../../hooks/useEngineContext";
|
|
27
27
|
var BookingDetailModal = function BookingDetailModal(props) {
|
|
28
|
-
var _detail$introduction2;
|
|
28
|
+
var _initData$boardSettin2, _detail$introduction2;
|
|
29
29
|
var modalContentRef = useRef(null);
|
|
30
30
|
var context = useEngineContext();
|
|
31
31
|
var _ref = context.appHelper || {},
|
|
@@ -43,6 +43,8 @@ var BookingDetailModal = function BookingDetailModal(props) {
|
|
|
43
43
|
addToCart = _useCart.addToCart,
|
|
44
44
|
checkBeforeAddToCart = _useCart.checkBeforeAddToCart,
|
|
45
45
|
checkBeforeAddToCartResquest = _useCart.checkBeforeAddToCartResquest;
|
|
46
|
+
var _useInit = useInit(),
|
|
47
|
+
initData = _useInit.initData;
|
|
46
48
|
var _useState = useState('introduction'),
|
|
47
49
|
_useState2 = _slicedToArray(_useState, 2),
|
|
48
50
|
activeTab = _useState2[0],
|
|
@@ -59,6 +61,20 @@ var BookingDetailModal = function BookingDetailModal(props) {
|
|
|
59
61
|
var isUserClickRef = useRef(false); // 添加用户点击标记
|
|
60
62
|
var scrollTimeoutRef = useRef(null);
|
|
61
63
|
|
|
64
|
+
/**
|
|
65
|
+
* @title: 按钮确认文案
|
|
66
|
+
* @description:
|
|
67
|
+
* @param {*} useMemo
|
|
68
|
+
* @return {*}
|
|
69
|
+
* @Author: WangHan
|
|
70
|
+
* @Date: 2025-06-26 15:34
|
|
71
|
+
*/
|
|
72
|
+
var buttonText = useMemo(function () {
|
|
73
|
+
var _initData$boardSettin, _utils$translation;
|
|
74
|
+
var config = (initData === null || initData === void 0 || (_initData$boardSettin = initData.boardSetting) === null || _initData$boardSettin === void 0 || (_initData$boardSettin = _initData$boardSettin.config) === null || _initData$boardSettin === void 0 ? void 0 : _initData$boardSettin.product_display_setting) || {};
|
|
75
|
+
return (utils === null || utils === void 0 || (_utils$translation = utils.translation) === null || _utils$translation === void 0 ? void 0 : _utils$translation.call(utils, config === null || config === void 0 ? void 0 : config.booking_event_v2_product_detail_button)) || locales.getText('pisell2.event.add.to.cart');
|
|
76
|
+
}, [initData === null || initData === void 0 || (_initData$boardSettin2 = initData.boardSetting) === null || _initData$boardSettin2 === void 0 || (_initData$boardSettin2 = _initData$boardSettin2.config) === null || _initData$boardSettin2 === void 0 ? void 0 : _initData$boardSettin2.product_display_setting]);
|
|
77
|
+
|
|
62
78
|
/**
|
|
63
79
|
* @title: 详情锚点
|
|
64
80
|
* @description:
|
|
@@ -377,7 +393,7 @@ var BookingDetailModal = function BookingDetailModal(props) {
|
|
|
377
393
|
destroyOnClose: true,
|
|
378
394
|
className: "booking-detail-modal",
|
|
379
395
|
onCancel: onCloseEventDetail,
|
|
380
|
-
okText:
|
|
396
|
+
okText: buttonText,
|
|
381
397
|
cancelVisible: false,
|
|
382
398
|
onOk: handleOk,
|
|
383
399
|
width: isMobile() ? '100%' : 600,
|
|
@@ -36,14 +36,28 @@ var Content = function Content() {
|
|
|
36
36
|
* @Author: WangHan
|
|
37
37
|
* @Date: 2025-01-17 14:25
|
|
38
38
|
*/
|
|
39
|
+
// useEffect(() => {
|
|
40
|
+
// if (!form_id) return;
|
|
41
|
+
|
|
42
|
+
// getResourceList.run({
|
|
43
|
+
// form_id: form_id,
|
|
44
|
+
// shop_id: shop_id,
|
|
45
|
+
// form_data_status: 'active',
|
|
46
|
+
// });
|
|
47
|
+
// }, [form_id]);
|
|
39
48
|
useEffect(function () {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
|
|
49
|
+
var _utils$getHistory, _history$location;
|
|
50
|
+
var history = (utils === null || utils === void 0 || (_utils$getHistory = utils.getHistory) === null || _utils$getHistory === void 0 ? void 0 : _utils$getHistory.call(utils)) || {};
|
|
51
|
+
var query = history === null || history === void 0 || (_history$location = history.location) === null || _history$location === void 0 ? void 0 : _history$location.query;
|
|
52
|
+
var params = {
|
|
53
|
+
front_end_cache_id: (query === null || query === void 0 ? void 0 : query.cacheId) || ''
|
|
54
|
+
};
|
|
55
|
+
if (query !== null && query !== void 0 && query.ids) {
|
|
56
|
+
var _query$ids;
|
|
57
|
+
params.event_item_ids = query === null || query === void 0 || (_query$ids = query.ids) === null || _query$ids === void 0 ? void 0 : _query$ids.split(',');
|
|
58
|
+
}
|
|
59
|
+
getResourceList.run(params);
|
|
60
|
+
}, []);
|
|
47
61
|
return /*#__PURE__*/React.createElement("div", {
|
|
48
62
|
className: "event-booking-wrap ".concat(isMobile() ? 'event-booking-mobile-wrap' : '')
|
|
49
63
|
}, /*#__PURE__*/React.createElement(Header, null), /*#__PURE__*/React.createElement(EventContent, null), isMobile() && (currentStepData === null || currentStepData === void 0 ? void 0 : currentStepData.key) !== 'select-category' ? /*#__PURE__*/React.createElement(Footer, null) : null);
|
|
@@ -35,7 +35,7 @@ export default {
|
|
|
35
35
|
'pisell2.event.campus': 'Campus',
|
|
36
36
|
'pisell2.event.resource': 'Location',
|
|
37
37
|
'pisell2.event.booking.options': 'Booking options',
|
|
38
|
-
'pisell2.event.add.to.cart': 'Add to
|
|
38
|
+
'pisell2.event.add.to.cart': 'Add to Cart',
|
|
39
39
|
'pisell2.event.description': 'Description',
|
|
40
40
|
'pisell2.event.view.more': 'View more',
|
|
41
41
|
'pisell2.event.view.less': 'View less',
|
|
@@ -120,7 +120,7 @@ export default {
|
|
|
120
120
|
'pisell2.event.campus': '校区',
|
|
121
121
|
'pisell2.event.resource': '资源',
|
|
122
122
|
'pisell2.event.booking.options': '预约选项',
|
|
123
|
-
'pisell2.event.add.to.cart': '
|
|
123
|
+
'pisell2.event.add.to.cart': '加入购物车',
|
|
124
124
|
'pisell2.event.description': '描述',
|
|
125
125
|
'pisell2.event.view.more': '查看更多',
|
|
126
126
|
'pisell2.event.view.less': '收起',
|
|
@@ -205,7 +205,7 @@ export default {
|
|
|
205
205
|
'pisell2.event.campus': '校區',
|
|
206
206
|
'pisell2.event.resource': '資源',
|
|
207
207
|
'pisell2.event.booking.options': '預約選項',
|
|
208
|
-
'pisell2.event.add.to.cart': '
|
|
208
|
+
'pisell2.event.add.to.cart': '加入購物車',
|
|
209
209
|
'pisell2.event.description': '描述',
|
|
210
210
|
'pisell2.event.view.more': '查看更多',
|
|
211
211
|
'pisell2.event.view.less': '收起',
|
package/es/components/index.d.ts
CHANGED
|
@@ -15,4 +15,6 @@ import WorkspaceListDetail from './workSpaceListDetail/';
|
|
|
15
15
|
import WorkspaceList from './workSpaceList';
|
|
16
16
|
import PisellSelectCustomerModal from './pisellSelectCustomerModal';
|
|
17
17
|
import SubTotal from './subTotal';
|
|
18
|
-
|
|
18
|
+
import StepController from './stepController';
|
|
19
|
+
import EditBookingModal from './booking/editBookingModal';
|
|
20
|
+
export { Login, BookingInfo, Booking, BookingNotes, BookingAddons, BookingForms, Schedules, ProductExtension, RuleSetting, TaxSelect, ToCPay, PisellSelectCustomerModal, Wallet, WalletList, WorkspaceList, WorkspaceListDetail, SubTotal, StepController, EditBookingModal };
|
package/es/components/index.js
CHANGED
|
@@ -15,4 +15,6 @@ import WorkspaceListDetail from "./workSpaceListDetail/";
|
|
|
15
15
|
import WorkspaceList from "./workSpaceList";
|
|
16
16
|
import PisellSelectCustomerModal from "./pisellSelectCustomerModal";
|
|
17
17
|
import SubTotal from "./subTotal";
|
|
18
|
-
|
|
18
|
+
import StepController from "./stepController";
|
|
19
|
+
import EditBookingModal from "./booking/editBookingModal";
|
|
20
|
+
export { Login, BookingInfo, Booking, BookingNotes, BookingAddons, BookingForms, Schedules, ProductExtension, RuleSetting, TaxSelect, ToCPay, PisellSelectCustomerModal, Wallet, WalletList, WorkspaceList, WorkspaceListDetail, SubTotal, StepController, EditBookingModal };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
function _typeof(
|
|
2
|
-
function ownKeys(
|
|
3
|
-
function _objectSpread(
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
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(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
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); }
|
|
@@ -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, _interaction$utils, _interaction$utils$is;
|
|
39
39
|
var MWCreditCardRef = useRef(null);
|
|
40
40
|
var SuperPayAliPayH5Ref = useRef(null);
|
|
41
41
|
var StripePayRef = useRef(null);
|
|
@@ -118,10 +118,11 @@ var PaymentMethods = function PaymentMethods(props, ref) {
|
|
|
118
118
|
return _ref2.apply(this, arguments);
|
|
119
119
|
};
|
|
120
120
|
}();
|
|
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);
|
|
121
122
|
useEffect(function () {
|
|
122
|
-
var _interaction$
|
|
123
|
-
console.log('paymentResult isAppEnv', interaction === null || interaction === void 0 || (_interaction$
|
|
124
|
-
if (interaction !== null && interaction !== void 0 && (_interaction$
|
|
123
|
+
var _interaction$utils2, _interaction$utils2$i, _interaction$utils3, _interaction$utils3$i;
|
|
124
|
+
console.log('paymentResult isAppEnv', 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 ? void 0 : _interaction$utils2$i.call(_interaction$utils2));
|
|
125
|
+
if (interaction !== null && interaction !== void 0 && (_interaction$utils3 = interaction.utils) !== null && _interaction$utils3 !== void 0 && (_interaction$utils3$i = _interaction$utils3.isAppEnv) !== null && _interaction$utils3$i !== void 0 && _interaction$utils3$i.call(_interaction$utils3)) {
|
|
125
126
|
interaction.utils.mountFunction('global', 'paymentResult', function (strResult) {
|
|
126
127
|
console.log('paymentResult', strResult);
|
|
127
128
|
if (!isJson(strResult)) return;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export interface FormState {
|
|
2
3
|
platform: 'pc' | 'h5' | '' | undefined;
|
|
3
4
|
order: any;
|
|
@@ -28,4 +29,11 @@ export interface PayGroup {
|
|
|
28
29
|
pay_number?: string;
|
|
29
30
|
_order: any;
|
|
30
31
|
}
|
|
31
|
-
export declare const Provider: any, Context:
|
|
32
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
33
|
+
state: FormState;
|
|
34
|
+
} & {
|
|
35
|
+
dispatch: (params: {
|
|
36
|
+
type: string;
|
|
37
|
+
payload: any;
|
|
38
|
+
}) => void;
|
|
39
|
+
}>;
|