@pisell/private-materials 6.4.81 → 6.4.83
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +2 -2
- package/build/lowcode/preview.js +164 -150
- 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/components/appointmentBooking/components/Footer/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
- package/es/components/booking/addons/model.d.ts +1 -10
- package/es/components/booking/components/TabProduct/index.d.ts +0 -1
- package/es/components/booking/components/footer/index.js +15 -3
- package/es/components/booking/components/footer/utils.js +55 -37
- package/es/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
- package/es/components/booking/forms/model.d.ts +1 -10
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
- package/es/components/booking/forms/table/index.d.ts +0 -1
- package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/es/components/booking/info/dateRange/index.d.ts +0 -1
- package/es/components/booking/info/hooks/useInfoHolder.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/materiels/holder/index.d.ts +0 -1
- 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/checkout/PaymentModal.d.ts +13 -5
- package/es/components/checkout/PaymentModal.js +93 -149
- package/es/components/checkout/components/PaymentDetailModal/index.js +2 -2
- package/es/components/checkout/components/SearchAndClientModule/index.js +39 -40
- package/es/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/es/components/checkout/plugin.d.ts +2 -0
- package/es/components/checkout/plugin.js +303 -0
- package/es/components/checkout/utils/PaymentResultToastUtils.d.ts +0 -1
- 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/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/index.d.ts +0 -1
- package/es/components/eftposPay/component/step/step.d.ts +0 -1
- package/es/components/eftposPay/store/index.d.ts +2 -2
- package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- 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/bookingAvailabilityCalendar/components/CalendarDate/Status/index.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/SetupForm/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
- package/es/components/pay/toC/model.d.ts +1 -9
- package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
- package/es/components/productExtension/fields/Forms/index.d.ts +0 -1
- package/es/components/schedules/calendar/calendarItem.d.ts +0 -1
- package/es/components/schedules/components/CurrentDay/index.d.ts +0 -1
- package/es/components/schedules/model.d.ts +1 -9
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
- package/es/components/schedules/products/index.d.ts +0 -1
- package/es/components/schedules/resources/relationProduct/index.d.ts +0 -1
- package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
- package/es/components/shoppingCart/components/Render/index.d.ts +0 -1
- 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/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/es/index.d.ts +1 -0
- package/es/index.js +2 -1
- package/es/plus/clientName/index.d.ts +0 -1
- package/es/pro/pisellPaymentList/example.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Footer/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
- package/lib/components/booking/addons/model.d.ts +1 -10
- package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
- package/lib/components/booking/components/footer/index.js +15 -3
- package/lib/components/booking/components/footer/utils.js +18 -1
- package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
- package/lib/components/booking/forms/model.d.ts +1 -10
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
- package/lib/components/booking/forms/table/index.d.ts +0 -1
- package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/lib/components/booking/info/dateRange/index.d.ts +0 -1
- package/lib/components/booking/info/hooks/useInfoHolder.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/materiels/holder/index.d.ts +0 -1
- 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/checkout/PaymentModal.d.ts +13 -5
- package/lib/components/checkout/PaymentModal.js +92 -139
- package/lib/components/checkout/components/PaymentDetailModal/index.js +2 -2
- package/lib/components/checkout/components/SearchAndClientModule/index.js +29 -3
- package/lib/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/lib/components/checkout/plugin.d.ts +2 -0
- package/lib/components/checkout/plugin.js +263 -0
- package/lib/components/checkout/utils/PaymentResultToastUtils.d.ts +0 -1
- 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/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/index.d.ts +0 -1
- package/lib/components/eftposPay/component/step/step.d.ts +0 -1
- package/lib/components/eftposPay/store/index.d.ts +2 -2
- package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- 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/bookingAvailabilityCalendar/components/CalendarDate/Status/index.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/SetupForm/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
- package/lib/components/pay/toC/model.d.ts +1 -9
- package/lib/components/productExtension/fields/Actor/index.d.ts +0 -1
- package/lib/components/productExtension/fields/Forms/index.d.ts +0 -1
- package/lib/components/schedules/calendar/calendarItem.d.ts +0 -1
- package/lib/components/schedules/components/CurrentDay/index.d.ts +0 -1
- package/lib/components/schedules/model.d.ts +1 -9
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
- package/lib/components/schedules/products/index.d.ts +0 -1
- package/lib/components/schedules/resources/relationProduct/index.d.ts +0 -1
- package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
- package/lib/components/shoppingCart/components/Render/index.d.ts +0 -1
- 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/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -0
- package/lib/plus/clientName/index.d.ts +0 -1
- package/lib/pro/pisellPaymentList/example.d.ts +0 -1
- package/lowcode/payment-modal/meta.ts +135 -0
- package/package.json +3 -3
- package/es/components/checkout/PaymentPlugin.d.ts +0 -2
- package/es/components/checkout/PaymentPlugin.js +0 -199
- package/lib/components/checkout/PaymentPlugin.d.ts +0 -2
- package/lib/components/checkout/PaymentPlugin.js +0 -181
|
@@ -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;
|
package/lib/index.d.ts
CHANGED
|
@@ -72,3 +72,4 @@ export { default as WalletEditor } from './plus/walletEditor';
|
|
|
72
72
|
export { default as WalletPassGallery } from './plus/walletPassGallery';
|
|
73
73
|
export { default as WalletPassDetail } from './plus/walletPassGallery/components/passDetail';
|
|
74
74
|
export { default as SettingsRegistry } from './components/systemSettings/registry';
|
|
75
|
+
export { default as PaymentModal } from './components/checkout/plugin';
|
package/lib/index.js
CHANGED
|
@@ -74,6 +74,7 @@ __export(src_exports, {
|
|
|
74
74
|
OnlineShopAuth: () => import_admin.OnlineShopAuth,
|
|
75
75
|
OrgAdminAuth: () => import_admin.OrgAdminAuth,
|
|
76
76
|
POSOperatorAuth: () => import_admin.POSOperatorAuth,
|
|
77
|
+
PaymentModal: () => import_plugin.default,
|
|
77
78
|
PinModal: () => import_pinModal.default,
|
|
78
79
|
PinVerifyModal: () => import_pinVerifyModal.default,
|
|
79
80
|
PisellSelectCustomerModal: () => import_pisellSelectCustomerModal.default,
|
|
@@ -188,6 +189,7 @@ var import_walletEditor = __toESM(require("./plus/walletEditor"));
|
|
|
188
189
|
var import_walletPassGallery = __toESM(require("./plus/walletPassGallery"));
|
|
189
190
|
var import_passDetail = __toESM(require("./plus/walletPassGallery/components/passDetail"));
|
|
190
191
|
var import_registry = __toESM(require("./components/systemSettings/registry"));
|
|
192
|
+
var import_plugin = __toESM(require("./components/checkout/plugin"));
|
|
191
193
|
import_dayjs.default.extend(import_weekday.default);
|
|
192
194
|
import_dayjs.default.extend(import_localeData.default);
|
|
193
195
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -237,6 +239,7 @@ import_dayjs.default.extend(import_localeData.default);
|
|
|
237
239
|
OnlineShopAuth,
|
|
238
240
|
OrgAdminAuth,
|
|
239
241
|
POSOperatorAuth,
|
|
242
|
+
PaymentModal,
|
|
240
243
|
PinModal,
|
|
241
244
|
PinVerifyModal,
|
|
242
245
|
PisellSelectCustomerModal,
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
* 这个文件演示了如何使用 PisellPaymentList 和 PisellPaymentListItem 组件
|
|
5
5
|
* 包括如何通过 Context 访问父组件配置
|
|
6
6
|
*/
|
|
7
|
-
/// <reference types="react" />
|
|
8
7
|
export declare const BasicExample: () => JSX.Element;
|
|
9
8
|
export declare const ChildrenExample: () => JSX.Element;
|
|
10
9
|
export declare const CustomItemExample: () => JSX.Element;
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
|
|
2
|
+
import { ComponentMetadata, Snippet } from '@alilc/lowcode-types';
|
|
3
|
+
|
|
4
|
+
const PaymentModalMeta: ComponentMetadata = {
|
|
5
|
+
"componentName": "PaymentModal",
|
|
6
|
+
"title": "PaymentModal",
|
|
7
|
+
"docUrl": "",
|
|
8
|
+
"screenshot": "",
|
|
9
|
+
"devMode": "proCode",
|
|
10
|
+
"npm": {
|
|
11
|
+
"package": "@pisell/private-materials",
|
|
12
|
+
"version": "1.0.4",
|
|
13
|
+
"exportName": "PaymentModal",
|
|
14
|
+
"main": "src/index.ts",
|
|
15
|
+
"destructuring": true,
|
|
16
|
+
"subName": ""
|
|
17
|
+
},
|
|
18
|
+
"configure": {
|
|
19
|
+
"props": [
|
|
20
|
+
{
|
|
21
|
+
"title": {
|
|
22
|
+
"label": {
|
|
23
|
+
"type": "i18n",
|
|
24
|
+
"en-US": "style",
|
|
25
|
+
"zh-CN": "style"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"name": "style",
|
|
29
|
+
"setter": {
|
|
30
|
+
"componentName": "MixedSetter",
|
|
31
|
+
"isRequired": true,
|
|
32
|
+
"props": {}
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"title": {
|
|
37
|
+
"label": {
|
|
38
|
+
"type": "i18n",
|
|
39
|
+
"en-US": "globalState",
|
|
40
|
+
"zh-CN": "globalState"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"name": "globalState",
|
|
44
|
+
"setter": ["JsonSetter", "VariableSetter"],
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"title": {
|
|
48
|
+
"label": {
|
|
49
|
+
"type": "i18n",
|
|
50
|
+
"en-US": "setModalState",
|
|
51
|
+
"zh-CN": "setModalState"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"name": "setGlobalState",
|
|
55
|
+
"setter": {
|
|
56
|
+
"componentName": "FunctionSetter",
|
|
57
|
+
"isRequired": true
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"title": {
|
|
62
|
+
"label": {
|
|
63
|
+
"type": "i18n",
|
|
64
|
+
"en-US": "setState",
|
|
65
|
+
"zh-CN": "setState"
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"name": "setState",
|
|
69
|
+
"setter": {
|
|
70
|
+
"componentName": "FunctionSetter",
|
|
71
|
+
"isRequired": true
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"title": {
|
|
76
|
+
"label": {
|
|
77
|
+
"type": "i18n",
|
|
78
|
+
"en-US": "callback",
|
|
79
|
+
"zh-CN": "callback"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"name": "callback",
|
|
83
|
+
"setter": {
|
|
84
|
+
"componentName": "FunctionSetter",
|
|
85
|
+
"isRequired": true
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"title": {
|
|
90
|
+
"label": {
|
|
91
|
+
"type": "i18n",
|
|
92
|
+
"en-US": "模块",
|
|
93
|
+
"zh-CN": "模块"
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"name": "modules",
|
|
97
|
+
"setter": ["JsonSetter", "VariableSetter"],
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"title": {
|
|
101
|
+
"label": {
|
|
102
|
+
"type": "i18n",
|
|
103
|
+
"en-US": "插槽",
|
|
104
|
+
"zh-CN": "插槽"
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"name": "slot",
|
|
108
|
+
"propType": "node",
|
|
109
|
+
"setter": {
|
|
110
|
+
"componentName": "SlotSetter",
|
|
111
|
+
"initialValue": {
|
|
112
|
+
"type": "JSSlot",
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
],
|
|
117
|
+
"supports": {},
|
|
118
|
+
"component": {}
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
const snippets: Snippet[] = [
|
|
122
|
+
{
|
|
123
|
+
"title": "PaymentModal",
|
|
124
|
+
"screenshot": "",
|
|
125
|
+
"schema": {
|
|
126
|
+
"componentName": "PaymentModal",
|
|
127
|
+
"props": {}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
];
|
|
131
|
+
|
|
132
|
+
export default {
|
|
133
|
+
...PaymentModalMeta,
|
|
134
|
+
snippets
|
|
135
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/private-materials",
|
|
3
|
-
"version": "6.4.
|
|
3
|
+
"version": "6.4.83",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -62,9 +62,9 @@
|
|
|
62
62
|
"@react-spring/web": "^9.6.1",
|
|
63
63
|
"@use-gesture/react": "^10.3.1",
|
|
64
64
|
"@pisell/utils": "3.0.2",
|
|
65
|
-
"@pisell/
|
|
65
|
+
"@pisell/date-picker": "3.0.7",
|
|
66
66
|
"@pisell/icon": "0.0.11",
|
|
67
|
-
"@pisell/
|
|
67
|
+
"@pisell/materials": "6.4.21"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
70
|
"react": "^18.0.0",
|
|
@@ -1,199 +0,0 @@
|
|
|
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 _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
3
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
4
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
5
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
6
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
7
|
-
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); }
|
|
8
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
9
|
-
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
10
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11
|
-
import { useRef, useEffect, useState } from "react";
|
|
12
|
-
import { Button } from "antd";
|
|
13
|
-
import { CloseOutlined } from "@ant-design/icons";
|
|
14
|
-
import useModal from "../../hooks/useModal";
|
|
15
|
-
import Checkout from "./content";
|
|
16
|
-
import { locales } from "@pisell/utils";
|
|
17
|
-
import checkoutLocales from "./locales";
|
|
18
|
-
import useEngineContext from "../../hooks/useEngineContext";
|
|
19
|
-
import React from "react";
|
|
20
|
-
|
|
21
|
-
// 添加样式来覆盖Modal的默认padding
|
|
22
|
-
var modalStyle = document.createElement('style');
|
|
23
|
-
modalStyle.textContent = "\n :where(.payment-modal-wrapper) .ant-modal .ant-modal-content,\n .payment-modal-wrapper .ant-modal .ant-modal-content,\n .payment-modal-wrapper .ant-modal-content {\n padding: 12px 36px 36px 36px !important;\n }\n";
|
|
24
|
-
if (!document.querySelector('.payment-modal-style')) {
|
|
25
|
-
modalStyle.className = 'payment-modal-style';
|
|
26
|
-
document.head.appendChild(modalStyle);
|
|
27
|
-
}
|
|
28
|
-
var PaymentPlugin = function PaymentPlugin() {
|
|
29
|
-
var _context$appHelper;
|
|
30
|
-
var context = useEngineContext();
|
|
31
|
-
var _context$appHelper$ut = (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils,
|
|
32
|
-
pisellos = _context$appHelper$ut.pisellos;
|
|
33
|
-
var paymentRef = useRef();
|
|
34
|
-
var callback = useRef();
|
|
35
|
-
var _useState = useState(0),
|
|
36
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
37
|
-
totalAmount = _useState2[0],
|
|
38
|
-
setTotalAmount = _useState2[1];
|
|
39
|
-
// 创建本地翻译函数,优先使用 checkout 语言包
|
|
40
|
-
var translation = function translation(key, fallback) {
|
|
41
|
-
var _checkoutLocales;
|
|
42
|
-
var currentLang = locales.locale || 'en';
|
|
43
|
-
var checkoutText = (_checkoutLocales = checkoutLocales[currentLang]) === null || _checkoutLocales === void 0 ? void 0 : _checkoutLocales[key];
|
|
44
|
-
if (checkoutText) {
|
|
45
|
-
return checkoutText;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
// 回退到全局语言包
|
|
49
|
-
return locales.getText(key) || fallback;
|
|
50
|
-
};
|
|
51
|
-
var handlePaymentComplete = function handlePaymentComplete(result) {
|
|
52
|
-
var _callback$current;
|
|
53
|
-
console.log("Payment completed:", result);
|
|
54
|
-
(_callback$current = callback.current) === null || _callback$current === void 0 || _callback$current.call(callback, result);
|
|
55
|
-
hideModal(); // 支付完成后关闭弹窗
|
|
56
|
-
};
|
|
57
|
-
var handlePaymentCancel = function handlePaymentCancel() {
|
|
58
|
-
var _callback$current2;
|
|
59
|
-
console.log("Payment cancelled");
|
|
60
|
-
hideModal();
|
|
61
|
-
(_callback$current2 = callback.current) === null || _callback$current2 === void 0 || _callback$current2.call(callback, {
|
|
62
|
-
status: "cancelled"
|
|
63
|
-
});
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
// 自定义头部组件
|
|
67
|
-
var CustomHeader = function CustomHeader() {
|
|
68
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
69
|
-
style: {
|
|
70
|
-
display: "flex",
|
|
71
|
-
alignItems: "center",
|
|
72
|
-
justifyContent: "space-between",
|
|
73
|
-
padding: "16px 0",
|
|
74
|
-
marginBottom: "16px",
|
|
75
|
-
borderBottom: "1px solid #f0f0f0",
|
|
76
|
-
backgroundColor: "#fafafa",
|
|
77
|
-
margin: "-12px -36px 16px -36px",
|
|
78
|
-
// 扩展到modal边缘
|
|
79
|
-
paddingLeft: "36px",
|
|
80
|
-
paddingRight: "36px"
|
|
81
|
-
}
|
|
82
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
83
|
-
style: {
|
|
84
|
-
display: "flex",
|
|
85
|
-
alignItems: "center",
|
|
86
|
-
gap: "12px"
|
|
87
|
-
}
|
|
88
|
-
}, "\u786C\u4EF6\u72B6\u6001"), /*#__PURE__*/React.createElement("div", null, translation("order.total"), "\uFF1A", totalAmount), /*#__PURE__*/React.createElement("div", {
|
|
89
|
-
style: {
|
|
90
|
-
display: "flex",
|
|
91
|
-
alignItems: "center",
|
|
92
|
-
gap: "8px"
|
|
93
|
-
}
|
|
94
|
-
}, /*#__PURE__*/React.createElement(Button, {
|
|
95
|
-
type: "text",
|
|
96
|
-
size: "small",
|
|
97
|
-
icon: /*#__PURE__*/React.createElement(CloseOutlined, null),
|
|
98
|
-
onClick: handlePaymentCancel,
|
|
99
|
-
style: {
|
|
100
|
-
color: "#8c8c8c",
|
|
101
|
-
border: "none",
|
|
102
|
-
boxShadow: "none"
|
|
103
|
-
}
|
|
104
|
-
})));
|
|
105
|
-
};
|
|
106
|
-
var _useModal = useModal({
|
|
107
|
-
title: null,
|
|
108
|
-
// 移除默认标题,使用自定义头部
|
|
109
|
-
children: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CustomHeader, null), /*#__PURE__*/React.createElement(Checkout, {
|
|
110
|
-
paymentData: paymentRef.current,
|
|
111
|
-
moduleConfig: {
|
|
112
|
-
showWalletPass: true,
|
|
113
|
-
showCashPayment: true,
|
|
114
|
-
showAdditionalModule: true,
|
|
115
|
-
showPaymentOptions: true
|
|
116
|
-
},
|
|
117
|
-
onPaymentComplete: handlePaymentComplete,
|
|
118
|
-
onPaymentCancel: handlePaymentCancel,
|
|
119
|
-
onStatusChange: function onStatusChange(status) {
|
|
120
|
-
return console.log("Status changed:", status);
|
|
121
|
-
},
|
|
122
|
-
open_deposit: true // 开启押金选择功能
|
|
123
|
-
})),
|
|
124
|
-
width: 880,
|
|
125
|
-
// 808px 内容宽度 + 36px 左右内边距
|
|
126
|
-
destroyOnClose: true,
|
|
127
|
-
maskClosable: false,
|
|
128
|
-
footer: null,
|
|
129
|
-
// 移除默认的确定/取消按钮,让组件内部处理
|
|
130
|
-
closeIcon: null,
|
|
131
|
-
// 移除默认关闭图标,使用自定义的
|
|
132
|
-
onCancel: handlePaymentCancel,
|
|
133
|
-
wrapClassName: "payment-modal-wrapper"
|
|
134
|
-
}),
|
|
135
|
-
showModal = _useModal.showModal,
|
|
136
|
-
hideModal = _useModal.hideModal,
|
|
137
|
-
content = _useModal.content;
|
|
138
|
-
var onOpen = /*#__PURE__*/function () {
|
|
139
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(props) {
|
|
140
|
-
var checkout, _props$data, _props$data2, orderInfo;
|
|
141
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
142
|
-
while (1) switch (_context.prev = _context.next) {
|
|
143
|
-
case 0:
|
|
144
|
-
// 获取 checkout 模块并处理订单数据
|
|
145
|
-
checkout = pisellos.getModule("checkout");
|
|
146
|
-
if (!checkout) {
|
|
147
|
-
_context.next = 6;
|
|
148
|
-
break;
|
|
149
|
-
}
|
|
150
|
-
_context.next = 4;
|
|
151
|
-
return checkout.createLocalOrderAsync({
|
|
152
|
-
orderData: (_props$data = props.data) === null || _props$data === void 0 ? void 0 : _props$data.order_info,
|
|
153
|
-
cartSummary: (_props$data2 = props.data) === null || _props$data2 === void 0 || (_props$data2 = _props$data2.subtotal_info) === null || _props$data2 === void 0 ? void 0 : _props$data2.subTotalList,
|
|
154
|
-
autoPayment: true
|
|
155
|
-
});
|
|
156
|
-
case 4:
|
|
157
|
-
// 获取订单总金额
|
|
158
|
-
orderInfo = checkout.getCurrentOrderInfo();
|
|
159
|
-
if (orderInfo && orderInfo.totalAmount) {
|
|
160
|
-
setTotalAmount(orderInfo.totalAmount);
|
|
161
|
-
}
|
|
162
|
-
case 6:
|
|
163
|
-
paymentRef.current = props === null || props === void 0 ? void 0 : props.data;
|
|
164
|
-
callback.current = props === null || props === void 0 ? void 0 : props.callback;
|
|
165
|
-
showModal(); // 打开弹窗
|
|
166
|
-
case 9:
|
|
167
|
-
case "end":
|
|
168
|
-
return _context.stop();
|
|
169
|
-
}
|
|
170
|
-
}, _callee);
|
|
171
|
-
}));
|
|
172
|
-
return function onOpen(_x) {
|
|
173
|
-
return _ref.apply(this, arguments);
|
|
174
|
-
};
|
|
175
|
-
}();
|
|
176
|
-
var onClose = function onClose() {
|
|
177
|
-
hideModal();
|
|
178
|
-
};
|
|
179
|
-
|
|
180
|
-
/**
|
|
181
|
-
* @title: 初始化, 注入插件
|
|
182
|
-
* @description:
|
|
183
|
-
* @return {*}
|
|
184
|
-
* @Author: zhiwei.Wang
|
|
185
|
-
* @Date: 2023-09-13 09:41
|
|
186
|
-
*/
|
|
187
|
-
var init = function init() {
|
|
188
|
-
var state = {
|
|
189
|
-
open: onOpen,
|
|
190
|
-
close: onClose
|
|
191
|
-
};
|
|
192
|
-
console.log("PaymentPlugin", state);
|
|
193
|
-
};
|
|
194
|
-
useEffect(function () {
|
|
195
|
-
init();
|
|
196
|
-
}, []);
|
|
197
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, content);
|
|
198
|
-
};
|
|
199
|
-
export default PaymentPlugin;
|