@pisell/private-materials 3.4.12 → 3.4.14
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 +8 -8
- package/build/lowcode/render/default/view.js +12 -12
- package/build/lowcode/view.js +11 -11
- package/es/components/booking/addons/model.d.ts +1 -10
- package/es/components/booking/components/customSelect/index.d.ts +38 -0
- package/es/components/booking/editBookingModal/index.js +3 -4
- package/es/components/booking/forms/model.d.ts +1 -10
- package/es/components/booking/forms/single/RenderValueById.d.ts +7 -0
- package/es/components/booking/hooks/useClearCart.d.ts +2 -0
- package/es/components/booking/hooks/useQuotation.d.ts +5 -0
- package/es/components/booking/info/client/index.d.ts +4 -0
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +9 -0
- package/es/components/booking/info/model.d.ts +1 -10
- package/es/components/booking/info/service/Lists.d.ts +2 -0
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info/service2/utils.d.ts +247 -0
- package/es/components/booking/info/utils.d.ts +50 -0
- package/es/components/booking/info2/index.d.ts +12 -0
- package/es/components/booking/info2/service/addService/utils.d.ts +98 -0
- package/es/components/booking/info2/service/addService/utils.js +16 -1
- package/es/components/booking/info2/service/addTimeModal/index.d.ts +3 -0
- package/es/components/booking/info2/service/editService/Resources/index.d.ts +4 -0
- package/es/components/booking/info2/service/editService/index.d.ts +7 -0
- package/es/components/booking/info2/service/index.d.ts +4 -0
- package/es/components/booking/info2/utilsByBooking.d.ts +35 -0
- package/es/components/booking/locales.d.ts +822 -0
- package/es/components/booking/materiels/duration/index.d.ts +13 -0
- package/es/components/booking/materiels/startTime/index.d.ts +9 -0
- package/es/components/booking/model.d.ts +1 -9
- package/es/components/booking/notes/model.d.ts +1 -10
- package/es/components/booking/payments/model.d.ts +1 -10
- package/es/components/booking/utils.d.ts +174 -0
- package/es/components/eftposPay/const.d.ts +4 -1
- package/es/components/eftposPay/const.js +3 -1
- package/es/components/eftposPay/hooks.d.ts +2 -2
- 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 +321 -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 +81 -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 +4 -4
- package/es/components/pay/toC/model.d.ts +1 -9
- package/es/components/schedules/model.d.ts +1 -9
- package/es/components/shoppingCart/components/Cart/Product.d.ts +3 -0
- package/es/components/shoppingCart/components/Cart/index.d.ts +3 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +9 -0
- package/es/components/ticketBooking/components/ticketBooking/index.js +3 -0
- package/es/components/ticketBooking/components/timeBar/index.d.ts +12 -0
- package/es/components/ticketBooking/utils/index.d.ts +25 -0
- 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/lib/components/booking/addons/model.d.ts +1 -10
- package/lib/components/booking/components/customSelect/index.d.ts +38 -0
- package/lib/components/booking/editBookingModal/index.js +3 -4
- package/lib/components/booking/forms/model.d.ts +1 -10
- package/lib/components/booking/forms/single/RenderValueById.d.ts +7 -0
- package/lib/components/booking/hooks/useClearCart.d.ts +2 -0
- package/lib/components/booking/hooks/useQuotation.d.ts +5 -0
- package/lib/components/booking/info/client/index.d.ts +4 -0
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +9 -0
- package/lib/components/booking/info/model.d.ts +1 -10
- package/lib/components/booking/info/service/Lists.d.ts +2 -0
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info/service2/utils.d.ts +247 -0
- package/lib/components/booking/info/utils.d.ts +50 -0
- package/lib/components/booking/info2/index.d.ts +12 -0
- package/lib/components/booking/info2/service/addService/utils.d.ts +98 -0
- package/lib/components/booking/info2/service/addService/utils.js +15 -3
- package/lib/components/booking/info2/service/addTimeModal/index.d.ts +3 -0
- package/lib/components/booking/info2/service/editService/Resources/index.d.ts +4 -0
- package/lib/components/booking/info2/service/editService/index.d.ts +7 -0
- package/lib/components/booking/info2/service/index.d.ts +4 -0
- package/lib/components/booking/info2/utilsByBooking.d.ts +35 -0
- package/lib/components/booking/locales.d.ts +822 -0
- package/lib/components/booking/materiels/duration/index.d.ts +13 -0
- package/lib/components/booking/materiels/startTime/index.d.ts +9 -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/booking/utils.d.ts +174 -0
- package/lib/components/eftposPay/const.d.ts +4 -1
- package/lib/components/eftposPay/const.js +2 -0
- package/lib/components/eftposPay/hooks.d.ts +2 -2
- 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 +242 -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 +4 -4
- package/lib/components/pay/toC/model.d.ts +1 -9
- package/lib/components/schedules/model.d.ts +1 -9
- package/lib/components/shoppingCart/components/Cart/Product.d.ts +3 -0
- package/lib/components/shoppingCart/components/Cart/index.d.ts +3 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +9 -0
- package/lib/components/ticketBooking/components/ticketBooking/index.js +3 -0
- package/lib/components/ticketBooking/components/timeBar/index.d.ts +12 -0
- package/lib/components/ticketBooking/utils/index.d.ts +25 -0
- 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/package.json +1 -1
|
@@ -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,81 @@
|
|
|
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
|
+
fullResult: true
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* 查询linkly支付结果
|
|
15
|
+
*/
|
|
16
|
+
export var linklyPayQueryApi = function linklyPayQueryApi(param) {
|
|
17
|
+
return request.getRequest().get('/shop/linkly/pay/query', param, {
|
|
18
|
+
customMessage: true,
|
|
19
|
+
fullResult: true
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* 取消linkly支付
|
|
25
|
+
*/
|
|
26
|
+
export var linklyPayCancelApi = function linklyPayCancelApi(param) {
|
|
27
|
+
return request.getRequest().post('/shop/linkly/pay/cancel', param, {
|
|
28
|
+
customMessage: true,
|
|
29
|
+
fullResult: true
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* linkly支付签名结果处理
|
|
35
|
+
*/
|
|
36
|
+
export var linklyPaySignatureApi = function linklyPaySignatureApi(param) {
|
|
37
|
+
return request.getRequest().post('/shop/linkly/pay/signature', param, {
|
|
38
|
+
customMessage: true,
|
|
39
|
+
fullResult: true
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* linkly退款接口
|
|
45
|
+
*/
|
|
46
|
+
export var linklyRefundApi = function linklyRefundApi(data) {
|
|
47
|
+
return request.getRequest().post('/shop/linkly/refund/apply', data, {
|
|
48
|
+
customMessage: true,
|
|
49
|
+
fullResult: true
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* 查询linkly退款结果
|
|
55
|
+
*/
|
|
56
|
+
export var linklyRefundQueryApi = function linklyRefundQueryApi(param) {
|
|
57
|
+
return request.getRequest().get('/shop/linkly/refund/query', param, {
|
|
58
|
+
customMessage: true,
|
|
59
|
+
fullResult: true
|
|
60
|
+
});
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* 取消linkly退款
|
|
65
|
+
*/
|
|
66
|
+
export var linklyRefundCancelApi = function linklyRefundCancelApi(param) {
|
|
67
|
+
return request.getRequest().post('/shop/linkly/refund/cancel', param, {
|
|
68
|
+
customMessage: true,
|
|
69
|
+
fullResult: true
|
|
70
|
+
});
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* linkly退款签名结果处理
|
|
75
|
+
*/
|
|
76
|
+
export var linklyRefundSignatureApi = function linklyRefundSignatureApi(param) {
|
|
77
|
+
return request.getRequest().post('/shop/linkly/refund/signature', param, {
|
|
78
|
+
customMessage: true,
|
|
79
|
+
fullResult: true
|
|
80
|
+
});
|
|
81
|
+
};
|
|
@@ -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,
|
|
@@ -174,7 +174,7 @@ export declare const updateCustom: (payload: {
|
|
|
174
174
|
export declare const updateStatus: (status: 'loading' | 'warn' | 'fail' | 'success' | 'question') => {
|
|
175
175
|
type: EActionTypes;
|
|
176
176
|
payload: {
|
|
177
|
-
status: "
|
|
177
|
+
status: "loading" | "warn" | "success" | "fail" | "question";
|
|
178
178
|
};
|
|
179
179
|
};
|
|
180
180
|
/**
|
|
@@ -297,8 +297,8 @@ 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?: "
|
|
301
|
-
action?: "amount" | "
|
|
300
|
+
eftpos?: "stripe" | "payo" | "tyro" | "windcave" | "linkly" | undefined;
|
|
301
|
+
action?: "amount" | "deviceList" | "pay" | undefined;
|
|
302
302
|
key?: number | undefined;
|
|
303
303
|
step?: number | undefined;
|
|
304
304
|
title?: string | undefined;
|
|
@@ -308,7 +308,7 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
|
308
308
|
net?: boolean | undefined;
|
|
309
309
|
component?: string | undefined;
|
|
310
310
|
form?: string | undefined;
|
|
311
|
-
status?: "
|
|
311
|
+
status?: "loading" | "warn" | "success" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
|
|
312
312
|
warn?: string | undefined;
|
|
313
313
|
steps?: {
|
|
314
314
|
/** 用于重置当前步骤 */
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export interface FormState {
|
|
3
2
|
platform: 'pc' | 'h5' | '' | undefined;
|
|
4
3
|
order: any;
|
|
@@ -29,11 +28,4 @@ export interface PayGroup {
|
|
|
29
28
|
pay_number?: string;
|
|
30
29
|
_order: any;
|
|
31
30
|
}
|
|
32
|
-
export declare const Provider:
|
|
33
|
-
state: FormState;
|
|
34
|
-
} & {
|
|
35
|
-
dispatch: (params: {
|
|
36
|
-
type: string;
|
|
37
|
-
payload: any;
|
|
38
|
-
}) => void;
|
|
39
|
-
}>;
|
|
31
|
+
export declare const Provider: any, Context: any;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { CalendarDataItem, ScheduleItem } from "./type";
|
|
3
2
|
import dayjs from "dayjs";
|
|
4
3
|
export interface FormState {
|
|
@@ -69,11 +68,4 @@ export interface FormState {
|
|
|
69
68
|
};
|
|
70
69
|
setGlobalState: Function | null;
|
|
71
70
|
}
|
|
72
|
-
export declare const Provider:
|
|
73
|
-
state: FormState;
|
|
74
|
-
} & {
|
|
75
|
-
dispatch: (params: {
|
|
76
|
-
type: string;
|
|
77
|
-
payload: any;
|
|
78
|
-
}) => void;
|
|
79
|
-
}>;
|
|
71
|
+
export declare const Provider: any, Context: any;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Dayjs } from 'dayjs';
|
|
2
|
+
import './index.less';
|
|
3
|
+
interface ITimeBarProps {
|
|
4
|
+
globalState: any;
|
|
5
|
+
setGlobalState: any;
|
|
6
|
+
onDateChange: (date: Dayjs, dateString?: string) => void;
|
|
7
|
+
onDateTimeChange: (date: Dayjs, timeString: string) => void;
|
|
8
|
+
setIntervalTime: (value: boolean) => void;
|
|
9
|
+
locale: string;
|
|
10
|
+
}
|
|
11
|
+
declare const TimeBar: (props: ITimeBarProps) => JSX.Element;
|
|
12
|
+
export default TimeBar;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { Dayjs } from 'dayjs';
|
|
2
|
+
/** dayjs对象格式化为字符串时间 */
|
|
3
|
+
export declare const formatDateToStr: (date: Dayjs[]) => string | string[];
|
|
4
|
+
export declare const getDefaultStartParam: () => string | string[];
|
|
5
|
+
export declare const formatBookingList: (bookingList: any[]) => any[];
|
|
6
|
+
export declare const getNextTimeSlice: (sliceMinutes: number) => Dayjs;
|
|
7
|
+
export declare const getDisabledEdit: ({ shop_discount, bookings, payment_status }: any) => boolean;
|
|
8
|
+
export declare const restoreProductOtherData: (data: any) => {
|
|
9
|
+
product_id: any;
|
|
10
|
+
option: never[];
|
|
11
|
+
bundle: any;
|
|
12
|
+
product_variant_id: number;
|
|
13
|
+
quantity: number;
|
|
14
|
+
} | undefined;
|
|
15
|
+
export declare const isSameProduct: (a: any, b: any) => boolean;
|
|
16
|
+
export declare const addService: (list: any[], addItem: any, state: any) => {
|
|
17
|
+
list: any[];
|
|
18
|
+
quantity: any;
|
|
19
|
+
};
|
|
20
|
+
export declare const addServiceScroll: (rowKey: string, cacheItem: any) => void;
|
|
21
|
+
export declare const getCartProductOverlay: (state: any) => any;
|
|
22
|
+
export declare const getIsOverlayProduct: (item: any, state: any) => any;
|
|
23
|
+
export declare const getIsShowNumber: (item: any, state: any) => any;
|
|
24
|
+
export declare const genServiceKey: (item: any) => string;
|
|
25
|
+
export declare const createSimpleCacheItem: (item: any, e: any, state: any) => any;
|
|
@@ -1,13 +1 @@
|
|
|
1
|
-
|
|
2
|
-
interface RechargeState {
|
|
3
|
-
addWalletCard: any;
|
|
4
|
-
}
|
|
5
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
6
|
-
walletDetailState: RechargeState;
|
|
7
|
-
} & {
|
|
8
|
-
dispatch: (params: {
|
|
9
|
-
type: string;
|
|
10
|
-
payload: any;
|
|
11
|
-
}) => void;
|
|
12
|
-
}>;
|
|
13
|
-
export {};
|
|
1
|
+
export declare const Provider: any, Context: any;
|
|
@@ -1,14 +1 @@
|
|
|
1
|
-
|
|
2
|
-
interface RechargeState {
|
|
3
|
-
total: number;
|
|
4
|
-
setup?: 'menu' | 'list' | 'detail' | string;
|
|
5
|
-
}
|
|
6
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
7
|
-
state: RechargeState;
|
|
8
|
-
} & {
|
|
9
|
-
dispatch: (params: {
|
|
10
|
-
type: string;
|
|
11
|
-
payload: any;
|
|
12
|
-
}) => void;
|
|
13
|
-
}>;
|
|
14
|
-
export {};
|
|
1
|
+
export declare const Provider: any, Context: any;
|
|
@@ -1,13 +1 @@
|
|
|
1
|
-
|
|
2
|
-
interface RechargeState {
|
|
3
|
-
total: number;
|
|
4
|
-
}
|
|
5
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
6
|
-
state: RechargeState;
|
|
7
|
-
} & {
|
|
8
|
-
dispatch: (params: {
|
|
9
|
-
type: string;
|
|
10
|
-
payload: any;
|
|
11
|
-
}) => void;
|
|
12
|
-
}>;
|
|
13
|
-
export {};
|
|
1
|
+
export declare const Provider: any, Context: any;
|
|
@@ -1,29 +1 @@
|
|
|
1
|
-
|
|
2
|
-
interface RechargeState {
|
|
3
|
-
selectedGiftOptionId: string | null;
|
|
4
|
-
cardList: Array<{
|
|
5
|
-
id: string;
|
|
6
|
-
name: string;
|
|
7
|
-
price: number;
|
|
8
|
-
}>;
|
|
9
|
-
selectedItem: {
|
|
10
|
-
id?: string;
|
|
11
|
-
gift_price?: number;
|
|
12
|
-
price?: number;
|
|
13
|
-
name?: string;
|
|
14
|
-
variant_id?: string;
|
|
15
|
-
};
|
|
16
|
-
productId?: string;
|
|
17
|
-
detailId?: string;
|
|
18
|
-
total: string | number;
|
|
19
|
-
rechargeModalOpen: boolean;
|
|
20
|
-
}
|
|
21
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
22
|
-
state: RechargeState;
|
|
23
|
-
} & {
|
|
24
|
-
dispatch: (params: {
|
|
25
|
-
type: string;
|
|
26
|
-
payload: any;
|
|
27
|
-
}) => void;
|
|
28
|
-
}>;
|
|
29
|
-
export {};
|
|
1
|
+
export declare const Provider: any, Context: any;
|
|
@@ -1,13 +1 @@
|
|
|
1
|
-
|
|
2
|
-
interface RechargeState {
|
|
3
|
-
total: 0;
|
|
4
|
-
}
|
|
5
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
6
|
-
state: RechargeState;
|
|
7
|
-
} & {
|
|
8
|
-
dispatch: (params: {
|
|
9
|
-
type: string;
|
|
10
|
-
payload: any;
|
|
11
|
-
}) => void;
|
|
12
|
-
}>;
|
|
13
|
-
export {};
|
|
1
|
+
export declare const Provider: any, Context: any;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { IWalletListItemProps } from './serve';
|
|
3
2
|
export interface WalletCardItemProps {
|
|
4
3
|
id: string;
|
|
@@ -27,11 +26,4 @@ export interface WalletListProps {
|
|
|
27
26
|
currentSearchListItemCode?: string;
|
|
28
27
|
[key: string]: any;
|
|
29
28
|
}
|
|
30
|
-
export declare const Provider:
|
|
31
|
-
global_wallet: WalletListProps;
|
|
32
|
-
} & {
|
|
33
|
-
dispatch: (params: {
|
|
34
|
-
type: string;
|
|
35
|
-
payload: any;
|
|
36
|
-
}) => void;
|
|
37
|
-
}>;
|
|
29
|
+
export declare const Provider: any, Context: any;
|
|
@@ -1,10 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { FormState } from "../model";
|
|
3
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
4
|
-
state: FormState;
|
|
5
|
-
} & {
|
|
6
|
-
dispatch: (params: {
|
|
7
|
-
type: string;
|
|
8
|
-
payload: any;
|
|
9
|
-
}) => void;
|
|
10
|
-
}>;
|
|
1
|
+
export declare const Provider: any, Context: any;
|