@pisell/private-materials 3.3.55 → 3.3.56
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.css +1 -1
- package/build/lowcode/render/default/view.js +6 -6
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +6 -6
- package/es/components/appointmentBooking/assets/resource.svg +1 -0
- package/es/components/appointmentBooking/components/Content/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Header/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Resource/index.js +44 -5
- package/es/components/appointmentBooking/hooks.js +218 -177
- package/es/components/appointmentBooking/locales.d.ts +3 -0
- package/es/components/appointmentBooking/locales.js +9 -0
- package/es/components/booking/components/TabProduct/productItem/index.js +14 -2
- package/es/components/booking/components/drawer/index.js +4 -2
- package/es/components/booking/components/footer/index.d.ts +1 -0
- package/es/components/booking/components/voucher/index.js +25 -17
- package/es/components/booking/info/client/index.js +2 -1
- package/es/components/booking/info/index.d.ts +1 -0
- package/es/components/booking/info/pet/index.js +3 -0
- package/es/components/booking/info/service/addTimeModal/index.d.ts +1 -0
- package/es/components/booking/info/service2/utils.js +27 -27
- package/es/components/booking/info2/index.js +3 -3
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info2/service/addService/utils.js +5 -2
- package/es/components/booking/info2/service/addTimeModal/index.d.ts +1 -0
- package/es/components/booking/info2/service/editService/index.js +1 -0
- package/es/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.js +23 -4
- package/es/components/eventBooking/components/progressBar/index.js +16 -0
- package/es/components/eventBooking/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentList/index.js +10 -4
- package/es/components/pay/toC/PaymentList/serve.d.ts +1 -1
- package/es/components/pay/toC/PaymentList/serve.js +7 -1
- package/es/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.js +30 -13
- package/es/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.js +30 -13
- package/es/components/pay/toC/PaymentMethods/index.js +29 -2
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
- package/es/components/pay/toC/WalletPassBlock/index.less +4 -0
- package/es/components/pay/toC/index.js +38 -30
- package/es/components/pay/toC/utils.d.ts +6 -0
- package/es/components/pay/toC/utils.js +21 -0
- package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -1
- package/es/components/productExtension/fields/SelectProducts/ProductItem/index.js +18 -6
- package/es/components/productSelect/components/TabProduct/index.js +28 -10
- package/es/components/productSelect/components/TabProduct/tabs/index.d.ts +21 -0
- package/es/components/productSelect/components/TabProduct/tabs/index.js +243 -0
- package/es/components/productSelect/components/TabProduct/tabs/index.less +126 -0
- package/es/components/productSelect/components/pisellPriceText/index.d.ts +11 -0
- package/es/components/productSelect/components/pisellPriceText/index.js +43 -0
- package/es/components/productSelect/components/productGroup/index.js +20 -7
- package/es/components/productSelect/components/productGroup/index.less +14 -1
- package/es/components/productSelect/index.less +1 -2
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +16 -10
- package/es/components/ticketBooking/components/addServiceVariant/index.less +10 -0
- package/es/components/ticketBooking/components/ticketBooking/index.js +3 -1
- package/es/components/ticketBooking/index.js +2 -1
- package/es/components/ticketBooking/locales.d.ts +3 -0
- package/es/components/ticketBooking/locales.js +12 -3
- package/es/components/ticketBooking/utils/index.d.ts +5 -1
- package/es/components/ticketBooking/utils/index.js +35 -3
- package/es/components/wallet/index.js +51 -5
- package/lib/components/appointmentBooking/assets/resource.svg +1 -0
- package/lib/components/appointmentBooking/components/Content/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Header/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Resource/index.js +44 -5
- package/lib/components/appointmentBooking/hooks.js +12 -3
- package/lib/components/appointmentBooking/locales.d.ts +3 -0
- package/lib/components/appointmentBooking/locales.js +3 -0
- package/lib/components/booking/components/TabProduct/productItem/index.js +8 -1
- package/lib/components/booking/components/drawer/index.js +2 -2
- package/lib/components/booking/components/footer/index.d.ts +1 -0
- package/lib/components/booking/components/voucher/index.js +31 -27
- package/lib/components/booking/info/client/index.js +2 -1
- package/lib/components/booking/info/index.d.ts +1 -0
- package/lib/components/booking/info/pet/index.js +3 -0
- package/lib/components/booking/info/service/addTimeModal/index.d.ts +1 -0
- package/lib/components/booking/info/service2/utils.js +2 -2
- package/lib/components/booking/info2/index.js +7 -4
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/addService/utils.js +4 -2
- package/lib/components/booking/info2/service/addTimeModal/index.d.ts +1 -0
- package/lib/components/booking/info2/service/editService/index.js +1 -0
- package/lib/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.js +18 -8
- package/lib/components/eventBooking/components/progressBar/index.js +15 -0
- package/lib/components/eventBooking/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentList/index.js +11 -6
- package/lib/components/pay/toC/PaymentList/serve.d.ts +1 -1
- package/lib/components/pay/toC/PaymentList/serve.js +5 -2
- package/lib/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.js +10 -1
- package/lib/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.js +10 -1
- package/lib/components/pay/toC/PaymentMethods/index.js +28 -4
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
- package/lib/components/pay/toC/WalletPassBlock/index.less +4 -0
- package/lib/components/pay/toC/index.js +20 -13
- package/lib/components/pay/toC/utils.d.ts +6 -0
- package/lib/components/pay/toC/utils.js +15 -0
- package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -1
- package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.js +8 -1
- package/lib/components/productSelect/components/TabProduct/index.js +19 -6
- package/lib/components/productSelect/components/TabProduct/tabs/index.d.ts +21 -0
- package/lib/components/productSelect/components/TabProduct/tabs/index.js +202 -0
- package/lib/components/productSelect/components/TabProduct/tabs/index.less +126 -0
- package/lib/components/productSelect/components/pisellPriceText/index.d.ts +11 -0
- package/lib/components/productSelect/components/pisellPriceText/index.js +72 -0
- package/lib/components/productSelect/components/productGroup/index.js +24 -4
- package/lib/components/productSelect/components/productGroup/index.less +14 -1
- package/lib/components/productSelect/index.less +1 -2
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +25 -14
- package/lib/components/ticketBooking/components/addServiceVariant/index.less +10 -0
- package/lib/components/ticketBooking/components/ticketBooking/index.js +3 -1
- package/lib/components/ticketBooking/index.js +2 -1
- package/lib/components/ticketBooking/locales.d.ts +3 -0
- package/lib/components/ticketBooking/locales.js +6 -3
- package/lib/components/ticketBooking/utils/index.d.ts +5 -1
- package/lib/components/ticketBooking/utils/index.js +35 -3
- package/lib/components/wallet/index.js +26 -1
- package/package.json +2 -2
- package/es/components/booking/info2/service/editService/Resources/index.d.ts +0 -4
- package/lib/components/booking/info2/service/editService/Resources/index.d.ts +0 -4
|
@@ -454,7 +454,7 @@ var isAllNormalProductByState = (state) => {
|
|
|
454
454
|
return isAllNormalProduct(state.service.value);
|
|
455
455
|
};
|
|
456
456
|
var getGeneralParams = (item, state, isParallelResource) => {
|
|
457
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
457
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
458
458
|
const { pet, service } = state;
|
|
459
459
|
const { holders = [], formData } = pet || {};
|
|
460
460
|
const parallelResourceOtherParams = {};
|
|
@@ -519,6 +519,7 @@ var getGeneralParams = (item, state, isParallelResource) => {
|
|
|
519
519
|
holder_id: (_d = item == null ? void 0 : item._extend) == null ? void 0 : _d.holder_id,
|
|
520
520
|
start_date: !isNormalProduct ? (_e = item == null ? void 0 : item._extend) == null ? void 0 : _e.startDate : "",
|
|
521
521
|
end_date: !isNormalProduct ? ((_f = item == null ? void 0 : item._extend) == null ? void 0 : _f.endDate) || ((_g = item == null ? void 0 : item._extend) == null ? void 0 : _g.end_date) : "",
|
|
522
|
+
rowKey: `rowKey-${(_i = (_h = item == null ? void 0 : item._extend) == null ? void 0 : _h.other) == null ? void 0 : _i.rowKey}`,
|
|
522
523
|
...parallelResourceOtherParams
|
|
523
524
|
};
|
|
524
525
|
};
|
|
@@ -543,7 +544,6 @@ var formatProducts = (lists, state, isRenderGroup = true, isGeneral, isParallelR
|
|
|
543
544
|
errorMessage = getErrorMessage(item, resourceItem, isDayBooking(state));
|
|
544
545
|
}
|
|
545
546
|
const generalParams = isGeneral ? getGeneralParams(item, state, !!isParallelResource) : {};
|
|
546
|
-
console.log(isNormalProduct, "isNormalProduct");
|
|
547
547
|
return {
|
|
548
548
|
id: item == null ? void 0 : item.id,
|
|
549
549
|
_id: item == null ? void 0 : item._id,
|
|
@@ -92,7 +92,7 @@ var Info = (0, import_model.Provider)((props) => {
|
|
|
92
92
|
});
|
|
93
93
|
}
|
|
94
94
|
}, []);
|
|
95
|
-
(0, import_react.
|
|
95
|
+
(0, import_react.useMemo)(() => {
|
|
96
96
|
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m;
|
|
97
97
|
const isFranchisee = (_d2 = (_c2 = (_b2 = (_a2 = context == null ? void 0 : context.appHelper) == null ? void 0 : _a2.utils) == null ? void 0 : _b2.businessUtils) == null ? void 0 : _c2.getAppByModal) == null ? void 0 : _d2.call(_c2, "franchisee");
|
|
98
98
|
modal.dispatch({
|
|
@@ -165,9 +165,12 @@ var Info = (0, import_model.Provider)((props) => {
|
|
|
165
165
|
try {
|
|
166
166
|
setTimeout(async () => {
|
|
167
167
|
var _a2;
|
|
168
|
-
let data = await (0, import_serve.getResourceList)(
|
|
169
|
-
|
|
170
|
-
|
|
168
|
+
let data = await (0, import_serve.getResourceList)(
|
|
169
|
+
{
|
|
170
|
+
date: currentDate
|
|
171
|
+
},
|
|
172
|
+
(_a2 = stateRef == null ? void 0 : stateRef.current) == null ? void 0 : _a2.bookingId
|
|
173
|
+
);
|
|
171
174
|
data.date = currentDate;
|
|
172
175
|
localStorage.setItem("bookingResourceList", JSON.stringify(data));
|
|
173
176
|
modal.dispatch({
|
|
@@ -77,7 +77,7 @@ export declare const setDefaultCapacitys: ({ capacitys, cacheItem }: any) => any
|
|
|
77
77
|
* @Author: zhiwei.Wang
|
|
78
78
|
* @Date: 2024-06-01 13:25
|
|
79
79
|
*/
|
|
80
|
-
export declare const getProductExtend: ({ cacheItem, state }: any) => any;
|
|
80
|
+
export declare const getProductExtend: ({ cacheItem, state, isDisabledTime }: any) => any;
|
|
81
81
|
/**
|
|
82
82
|
* @title: 格式化服务列表
|
|
83
83
|
* @description: 后端列表返回的product_resource.resources 的optional_resource等不是最新数据
|
|
@@ -355,7 +355,7 @@ var getIsAutoClose = (cacheItem) => {
|
|
|
355
355
|
}
|
|
356
356
|
);
|
|
357
357
|
};
|
|
358
|
-
var getProductExtend = ({ cacheItem, state }) => {
|
|
358
|
+
var getProductExtend = ({ cacheItem, state, isDisabledTime }) => {
|
|
359
359
|
const isNew = cacheItem.new || !cacheItem._extend.endDate;
|
|
360
360
|
let _cacheItem = { ...cacheItem };
|
|
361
361
|
const resourcesOriginMap = state.service.resourcesOriginMap || {};
|
|
@@ -409,7 +409,9 @@ var getProductExtend = ({ cacheItem, state }) => {
|
|
|
409
409
|
if (_cacheItem._extend.bundle_edit !== void 0) {
|
|
410
410
|
_cacheItem._extend.bundle_edit = 1;
|
|
411
411
|
}
|
|
412
|
-
|
|
412
|
+
if (!isDisabledTime) {
|
|
413
|
+
_cacheItem._time = (/* @__PURE__ */ new Date()).getTime();
|
|
414
|
+
}
|
|
413
415
|
} else {
|
|
414
416
|
if (!_cacheItem._data.capacitys) {
|
|
415
417
|
_cacheItem._data.capacitys = cacheItem.capacity;
|
|
@@ -428,6 +428,7 @@ var Info = (_, ref) => {
|
|
|
428
428
|
titleNoWrap: true,
|
|
429
429
|
zIndex: state.service.changeService ? 999 : 1e3,
|
|
430
430
|
forceRender: true,
|
|
431
|
+
mask: state.drawerMask,
|
|
431
432
|
open: state.service.editModal && !((_p = state.service.cacheItem) == null ? void 0 : _p.autoClose),
|
|
432
433
|
title: import_utils.locales.getText("pisell2.text.edit-service"),
|
|
433
434
|
onClose: () => {
|
package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.js
CHANGED
|
@@ -37,6 +37,8 @@ var import_OpenCard = __toESM(require("../../OpenCard"));
|
|
|
37
37
|
var import_materials = require("@pisell/materials");
|
|
38
38
|
var import_utils = require("@pisell/utils");
|
|
39
39
|
var import_Sales = require("../../../../Sales");
|
|
40
|
+
var import_decimal = __toESM(require("decimal.js"));
|
|
41
|
+
var import_pisellPriceText = __toESM(require("../../../../productSelect/components/pisellPriceText"));
|
|
40
42
|
var BookingOptions = (props) => {
|
|
41
43
|
var _a, _b;
|
|
42
44
|
const { detail, currentBookingOption, selectEventDetailBookingOptions } = (0, import_Sales.useEventDetail)();
|
|
@@ -63,14 +65,22 @@ var BookingOptions = (props) => {
|
|
|
63
65
|
optionClassName: `option-item ${((_b = detail == null ? void 0 : detail.bookingOptions) == null ? void 0 : _b.length) > 1 ? "option-item-pointer" : ""}`,
|
|
64
66
|
value: currentBookingOption,
|
|
65
67
|
renderOption: (option) => {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
{
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
68
|
+
const { price, is_bundle, minimum_markup_price } = option._originData || {};
|
|
69
|
+
if (!option._originData || !is_bundle) {
|
|
70
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: "item" }, /* @__PURE__ */ import_react.default.createElement("span", null, option.label), /* @__PURE__ */ import_react.default.createElement(
|
|
71
|
+
import_materials.PisellText.Amount,
|
|
72
|
+
{
|
|
73
|
+
value: option.price,
|
|
74
|
+
showCurrencySymbol: true,
|
|
75
|
+
className: "price"
|
|
76
|
+
}
|
|
77
|
+
));
|
|
78
|
+
}
|
|
79
|
+
let _price = price;
|
|
80
|
+
if (is_bundle) {
|
|
81
|
+
_price = new import_decimal.default(price).plus(new import_decimal.default(minimum_markup_price)).toFixed(2);
|
|
82
|
+
}
|
|
83
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: "item" }, /* @__PURE__ */ import_react.default.createElement("span", null, option.label), /* @__PURE__ */ import_react.default.createElement(import_pisellPriceText.default, { className: "price", value: _price, isMini: true }));
|
|
74
84
|
},
|
|
75
85
|
onChange
|
|
76
86
|
}
|
|
@@ -37,6 +37,7 @@ var import_materials = require("@pisell/materials");
|
|
|
37
37
|
var import_Sales = require("../../../Sales");
|
|
38
38
|
var import_utils = require("@pisell/utils");
|
|
39
39
|
var import_index = require("./index.less");
|
|
40
|
+
var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContext"));
|
|
40
41
|
var ProgressBar = ({
|
|
41
42
|
title,
|
|
42
43
|
description,
|
|
@@ -48,8 +49,11 @@ var ProgressBar = ({
|
|
|
48
49
|
onBack,
|
|
49
50
|
onClose
|
|
50
51
|
}) => {
|
|
52
|
+
var _a;
|
|
51
53
|
const [open, setOpen] = (0, import_react.useState)(false);
|
|
52
54
|
const { removeSessionStorage } = (0, import_Sales.useSales)();
|
|
55
|
+
const context = (0, import_useEngineContext.default)();
|
|
56
|
+
const { interaction } = ((_a = context.appHelper) == null ? void 0 : _a.utils) || {};
|
|
53
57
|
const handleClose = () => {
|
|
54
58
|
if (isConfirmClose) {
|
|
55
59
|
setOpen(true);
|
|
@@ -58,6 +62,17 @@ var ProgressBar = ({
|
|
|
58
62
|
}
|
|
59
63
|
};
|
|
60
64
|
const handleOk = () => {
|
|
65
|
+
var _a2, _b;
|
|
66
|
+
if ((_b = (_a2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a2.isAppEnv) == null ? void 0 : _b.call(_a2)) {
|
|
67
|
+
interaction.utils.postMessageToApp({
|
|
68
|
+
module: "global",
|
|
69
|
+
key: "paymentResultAction",
|
|
70
|
+
data: {
|
|
71
|
+
actionType: "backHome"
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
61
76
|
onClose == null ? void 0 : onClose();
|
|
62
77
|
setOpen(false);
|
|
63
78
|
removeSessionStorage == null ? void 0 : removeSessionStorage();
|
|
@@ -46,19 +46,20 @@ var offline = [
|
|
|
46
46
|
"pisell.custom_payment"
|
|
47
47
|
];
|
|
48
48
|
var PaymentList = (props, ref) => {
|
|
49
|
-
var _a, _b;
|
|
49
|
+
var _a, _b, _c;
|
|
50
50
|
const [paymentList, setPaymentList] = (0, import_react.useState)([]);
|
|
51
51
|
const [paymentType, setPaymentType] = (0, import_react.useState)("");
|
|
52
52
|
const [loading, setLoading] = (0, import_react.useState)(true);
|
|
53
53
|
const context = (0, import_useEngineContext.default)();
|
|
54
|
+
const { interaction } = (_a = context.appHelper) == null ? void 0 : _a.utils;
|
|
54
55
|
const _paymentList = (0, import_react.useMemo)(() => {
|
|
55
56
|
var _a2;
|
|
56
57
|
return ((_a2 = props == null ? void 0 : props.store) == null ? void 0 : _a2.paymentList) || paymentList;
|
|
57
|
-
}, [paymentList, (
|
|
58
|
+
}, [paymentList, (_b = props == null ? void 0 : props.store) == null ? void 0 : _b.paymentList]);
|
|
58
59
|
const _paymentType = (0, import_react.useMemo)(() => {
|
|
59
60
|
var _a2;
|
|
60
61
|
return ((_a2 = props == null ? void 0 : props.store) == null ? void 0 : _a2.paymentType) || paymentType;
|
|
61
|
-
}, [paymentType, (
|
|
62
|
+
}, [paymentType, (_c = props == null ? void 0 : props.store) == null ? void 0 : _c.paymentType]);
|
|
62
63
|
const _getPaymentList = async (initProps) => {
|
|
63
64
|
var _a2;
|
|
64
65
|
setLoading(true);
|
|
@@ -85,11 +86,15 @@ var PaymentList = (props, ref) => {
|
|
|
85
86
|
setPaymentList(list);
|
|
86
87
|
return list;
|
|
87
88
|
};
|
|
89
|
+
const isApp = (0, import_react.useMemo)(() => {
|
|
90
|
+
var _a2, _b2;
|
|
91
|
+
return (_b2 = (_a2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a2.isAppEnv) == null ? void 0 : _b2.call(_a2);
|
|
92
|
+
}, []);
|
|
88
93
|
const init = (list) => {
|
|
89
94
|
var _a2, _b2;
|
|
90
95
|
setLoading(true);
|
|
91
96
|
const platform = ((_b2 = (_a2 = context.appHelper) == null ? void 0 : _a2.constants) == null ? void 0 : _b2.platform) || "h5";
|
|
92
|
-
const { paymentList: paymentList2, walletPass } = (0, import_serve.filterPaymentList)(list, platform);
|
|
97
|
+
const { paymentList: paymentList2, walletPass } = (0, import_serve.filterPaymentList)(list, platform, isApp);
|
|
93
98
|
if (paymentList2.length > 0) {
|
|
94
99
|
let first = paymentList2[0];
|
|
95
100
|
setPaymentList(paymentList2);
|
|
@@ -131,13 +136,13 @@ var PaymentList = (props, ref) => {
|
|
|
131
136
|
})
|
|
132
137
|
);
|
|
133
138
|
const renderToast = (_item) => {
|
|
134
|
-
var _a2, _b2,
|
|
139
|
+
var _a2, _b2, _c2;
|
|
135
140
|
return /* @__PURE__ */ import_react.default.createElement("div", { className: "surcharge-modal-wrap" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "surcharge-modal-title" }, _item.title + " " + (((_a2 = _item == null ? void 0 : _item.params) == null ? void 0 : _a2.description) ? import_utils2.locales.getText("tocPay.text.paymentInstructions") : import_utils2.locales.getText("tocPay.text.serviceCharge"))), /* @__PURE__ */ import_react.default.createElement(
|
|
136
141
|
"div",
|
|
137
142
|
{
|
|
138
143
|
className: "surcharge-info",
|
|
139
144
|
dangerouslySetInnerHTML: {
|
|
140
|
-
__html: ((_b2 = _item == null ? void 0 : _item.params) == null ? void 0 : _b2.description) ? (
|
|
145
|
+
__html: ((_b2 = _item == null ? void 0 : _item.params) == null ? void 0 : _b2.description) ? (_c2 = _item == null ? void 0 : _item.params) == null ? void 0 : _c2.description : _item.surcharge_fee
|
|
141
146
|
}
|
|
142
147
|
}
|
|
143
148
|
));
|
|
@@ -20,7 +20,7 @@ export declare const getPaymentList: (values: any) => Promise<{
|
|
|
20
20
|
* @Author: zhiwei.Wang
|
|
21
21
|
* @Date: 2024-08-16 10:57
|
|
22
22
|
*/
|
|
23
|
-
export declare const filterPaymentList: (list: any[], platform
|
|
23
|
+
export declare const filterPaymentList: (list: any[], platform: string | undefined, isApp: boolean) => {
|
|
24
24
|
message: string;
|
|
25
25
|
status: string;
|
|
26
26
|
paymentList: any[];
|
|
@@ -31,12 +31,12 @@ var getPaymentList = async (values) => {
|
|
|
31
31
|
let { data = [] } = await import_utils.request.getRequest().get("/h5/pay/order/payments", values);
|
|
32
32
|
return filterPaymentList(data);
|
|
33
33
|
};
|
|
34
|
-
var filterPaymentList = (list, platform = "h5") => {
|
|
34
|
+
var filterPaymentList = (list, platform = "h5", isApp) => {
|
|
35
35
|
let paymentList = [...list];
|
|
36
36
|
let _paymentKeys = [...import_status.paymentKeys];
|
|
37
37
|
const walletPass = paymentList.find((d) => d.service === "pisell.wallet_pass");
|
|
38
38
|
let arr = [];
|
|
39
|
-
if (!(0, import_utils2.isWx)()) {
|
|
39
|
+
if (!(0, import_utils2.isWx)() && !isApp) {
|
|
40
40
|
arr = arr.concat(["globepay.wechat.jsapi", "superpay.wechat.h5"]);
|
|
41
41
|
}
|
|
42
42
|
if (platform === "h5") {
|
|
@@ -45,6 +45,9 @@ var filterPaymentList = (list, platform = "h5") => {
|
|
|
45
45
|
if (!(0, import_utils2.isIOS)()) {
|
|
46
46
|
arr = arr.concat(["mw.apple"]);
|
|
47
47
|
}
|
|
48
|
+
if ((0, import_utils2.isIOS)() && isApp) {
|
|
49
|
+
arr = arr.concat(["mw.google"]);
|
|
50
|
+
}
|
|
48
51
|
_paymentKeys = _paymentKeys.filter((d) => !arr.includes(d));
|
|
49
52
|
paymentList = paymentList.filter(
|
|
50
53
|
(d) => _paymentKeys.includes(d.service)
|
|
@@ -39,12 +39,21 @@ var import_ThreedsLoading = __toESM(require("../MWCreditCard/TDSPay/ThreedsLoadi
|
|
|
39
39
|
var import_serve = require("./serve");
|
|
40
40
|
var import_payGroup = require("../../payGroup");
|
|
41
41
|
var import_index = require("./index.less");
|
|
42
|
+
var import_useEngineContext = __toESM(require("../../../../../hooks/useEngineContext"));
|
|
43
|
+
var import_utils2 = require("../../utils");
|
|
42
44
|
var SuperPayAliPayH5 = (props, ref) => {
|
|
45
|
+
var _a;
|
|
43
46
|
const { onChange } = props;
|
|
44
47
|
const [open, setOpen] = (0, import_react.useState)(false);
|
|
48
|
+
const context = (0, import_useEngineContext.default)();
|
|
49
|
+
const { interaction } = (_a = context.appHelper) == null ? void 0 : _a.utils;
|
|
45
50
|
const init = async ({ payGroup }) => {
|
|
46
|
-
|
|
51
|
+
var _a2, _b;
|
|
47
52
|
const values = (0, import_payGroup.getPayGroupParamsFromStorage)(payGroup.order_id);
|
|
53
|
+
if ((_b = (_a2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a2.isAppEnv) == null ? void 0 : _b.call(_a2)) {
|
|
54
|
+
return (0, import_utils2.clientPayment)({ order_id: payGroup.order_id, type: "aliPay", values, interaction });
|
|
55
|
+
}
|
|
56
|
+
setOpen(true);
|
|
48
57
|
if (!values) {
|
|
49
58
|
setOpen(false);
|
|
50
59
|
return;
|
|
@@ -39,11 +39,20 @@ var import_serve = require("./serve");
|
|
|
39
39
|
var import_payGroup = require("../../payGroup");
|
|
40
40
|
var import_index = require("./index.less");
|
|
41
41
|
var import_utils = require("@pisell/utils");
|
|
42
|
+
var import_utils2 = require("../../utils");
|
|
43
|
+
var import_useEngineContext = __toESM(require("../../../../../hooks/useEngineContext"));
|
|
42
44
|
var SuperPayWxPayH5 = (props, ref) => {
|
|
45
|
+
var _a;
|
|
43
46
|
const [open, setOpen] = (0, import_react.useState)(false);
|
|
47
|
+
const context = (0, import_useEngineContext.default)();
|
|
48
|
+
const { interaction } = (_a = context.appHelper) == null ? void 0 : _a.utils;
|
|
44
49
|
const init = async ({ payGroup }) => {
|
|
45
|
-
|
|
50
|
+
var _a2, _b;
|
|
46
51
|
const values = (0, import_payGroup.getPayGroupParamsFromStorage)(payGroup.order_id);
|
|
52
|
+
if ((_b = (_a2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a2.isAppEnv) == null ? void 0 : _b.call(_a2)) {
|
|
53
|
+
return (0, import_utils2.clientPayment)({ order_id: payGroup.order_id, type: "wxPay", values, interaction });
|
|
54
|
+
}
|
|
55
|
+
setOpen(true);
|
|
47
56
|
if (!values) {
|
|
48
57
|
setOpen(false);
|
|
49
58
|
return;
|
|
@@ -51,6 +51,9 @@ var import_GlobePayWxH5 = __toESM(require("./GlobePayWxH5"));
|
|
|
51
51
|
var import_GlobePayQrcode = __toESM(require("./GlobePayQrcode"));
|
|
52
52
|
var import_serve = require("./WalletPass/serve");
|
|
53
53
|
var import_utils = require("../utils");
|
|
54
|
+
var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContext"));
|
|
55
|
+
var import_utils2 = require("@pisell/utils");
|
|
56
|
+
var import_serve2 = require("./GlobePayQrcode/serve");
|
|
54
57
|
var isOfflinePayment = (type) => {
|
|
55
58
|
if ((0, import_status.isCustomPayment)(type)) {
|
|
56
59
|
return true;
|
|
@@ -63,6 +66,7 @@ var isOfflinePayment = (type) => {
|
|
|
63
66
|
].includes(type);
|
|
64
67
|
};
|
|
65
68
|
var PaymentMethods = (props, ref) => {
|
|
69
|
+
var _a;
|
|
66
70
|
const MWCreditCardRef2 = (0, import_react.useRef)(null);
|
|
67
71
|
const SuperPayAliPayH5Ref2 = (0, import_react.useRef)(null);
|
|
68
72
|
const StripePayRef2 = (0, import_react.useRef)(null);
|
|
@@ -77,10 +81,12 @@ var PaymentMethods = (props, ref) => {
|
|
|
77
81
|
const GlobePayPaypalH5Ref2 = (0, import_react.useRef)(null);
|
|
78
82
|
const GlobePayWxH5Ref2 = (0, import_react.useRef)(null);
|
|
79
83
|
const GlobePayQrcodeRef2 = (0, import_react.useRef)(null);
|
|
84
|
+
const context = (0, import_useEngineContext.default)();
|
|
85
|
+
const { interaction } = (_a = context.appHelper) == null ? void 0 : _a.utils;
|
|
80
86
|
const init = async ({ type, payGroup }) => {
|
|
81
|
-
var
|
|
87
|
+
var _a2, _b;
|
|
82
88
|
const waitAmount = (payGroup == null ? void 0 : payGroup.wait_amount) || 0;
|
|
83
|
-
const cards = (_b = (
|
|
89
|
+
const cards = (_b = (_a2 = payGroup == null ? void 0 : payGroup.walletPass) == null ? void 0 : _a2.cards) == null ? void 0 : _b.length;
|
|
84
90
|
if (cards && (waitAmount <= 0 || isOfflinePayment(type))) {
|
|
85
91
|
try {
|
|
86
92
|
await (0, import_serve.walletPassPay)((0, import_utils.formatWalletPassParams)(payGroup));
|
|
@@ -110,11 +116,29 @@ var PaymentMethods = (props, ref) => {
|
|
|
110
116
|
}
|
|
111
117
|
await onPayByType({ type, payGroup });
|
|
112
118
|
};
|
|
119
|
+
(0, import_react.useEffect)(() => {
|
|
120
|
+
var _a2, _b, _c, _d;
|
|
121
|
+
console.log("paymentResult isAppEnv", (_b = (_a2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a2.isAppEnv) == null ? void 0 : _b.call(_a2));
|
|
122
|
+
if ((_d = (_c = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _c.isAppEnv) == null ? void 0 : _d.call(_c)) {
|
|
123
|
+
interaction.utils.mountFunction("global", "paymentResult", (strResult) => {
|
|
124
|
+
console.log("paymentResult", strResult);
|
|
125
|
+
if (!(0, import_utils2.isJson)(strResult)) return;
|
|
126
|
+
const result = JSON.parse(strResult);
|
|
127
|
+
const { type, pay_number, order_id } = result;
|
|
128
|
+
if (type && order_id && pay_number) {
|
|
129
|
+
(0, import_payGroup.setPayNumber)(order_id, pay_number);
|
|
130
|
+
}
|
|
131
|
+
const url = `${(0, import_serve2.getReturnUrl)()}?order_id=${order_id}&status=success`;
|
|
132
|
+
console.log(url, "paymentResult");
|
|
133
|
+
window.location.href = url;
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
}, []);
|
|
113
137
|
const onPayByType = async ({ type, payGroup }) => {
|
|
114
|
-
var
|
|
138
|
+
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
|
115
139
|
console.log(type, payGroup);
|
|
116
140
|
if (type === "mw.apple") {
|
|
117
|
-
await ((
|
|
141
|
+
await ((_a2 = ApplePayRef2.current) == null ? void 0 : _a2.init({ payGroup }));
|
|
118
142
|
return;
|
|
119
143
|
}
|
|
120
144
|
if (type === "mw.google") {
|
|
@@ -70,7 +70,7 @@ var ToCPay = (props, ref) => {
|
|
|
70
70
|
import_utils.locales.init(import_locales.default, ((_m = dvaStore.core) == null ? void 0 : _m.translateLocale) || "en");
|
|
71
71
|
import_utils2.request.setRequest(utils == null ? void 0 : utils.request);
|
|
72
72
|
const _initStore = (initProps) => {
|
|
73
|
-
var _a2
|
|
73
|
+
var _a2;
|
|
74
74
|
dispatch({
|
|
75
75
|
type: "init",
|
|
76
76
|
payload: {
|
|
@@ -78,15 +78,15 @@ var ToCPay = (props, ref) => {
|
|
|
78
78
|
status: "init",
|
|
79
79
|
// 将支付回调储存在store, 方便其他模块调用
|
|
80
80
|
payCallback: props.callback,
|
|
81
|
-
history: (_a2 = context.appHelper.utils) == null ? void 0 : _a2.history
|
|
81
|
+
history: (_a2 = context.appHelper.utils) == null ? void 0 : _a2.history
|
|
82
82
|
// 支付组
|
|
83
|
-
payGroup: {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
}
|
|
83
|
+
// payGroup: {
|
|
84
|
+
// order_id: initProps?.order?.order_id,
|
|
85
|
+
// total_amount: initProps?.order?.amount,
|
|
86
|
+
// // 原订单信息
|
|
87
|
+
// _order: initProps?.order,
|
|
88
|
+
// payment_group_id: initProps?.order?.payment_group_id,
|
|
89
|
+
// },
|
|
90
90
|
}
|
|
91
91
|
});
|
|
92
92
|
};
|
|
@@ -140,7 +140,12 @@ var ToCPay = (props, ref) => {
|
|
|
140
140
|
dispatch({
|
|
141
141
|
type: "setPayGroup",
|
|
142
142
|
payload: {
|
|
143
|
-
...state.payGroup,
|
|
143
|
+
// ...state.payGroup,
|
|
144
|
+
order_id: order == null ? void 0 : order.order_id,
|
|
145
|
+
// total_amount: order?.amount,
|
|
146
|
+
// 原订单信息
|
|
147
|
+
_order: order,
|
|
148
|
+
payment_group_id: order == null ? void 0 : order.payment_group_id,
|
|
144
149
|
// 支付方式没有walletPass时walletPass设置null
|
|
145
150
|
walletPass: walletPass ? {
|
|
146
151
|
...(_a2 = state.payGroup) == null ? void 0 : _a2.walletPass,
|
|
@@ -148,7 +153,7 @@ var ToCPay = (props, ref) => {
|
|
|
148
153
|
amount: wallet_pass_amount,
|
|
149
154
|
cards: wallet_pass_recommend_list
|
|
150
155
|
} : null,
|
|
151
|
-
total_amount: order.amount,
|
|
156
|
+
total_amount: order == null ? void 0 : order.amount,
|
|
152
157
|
wait_amount: remain_amount
|
|
153
158
|
}
|
|
154
159
|
});
|
|
@@ -277,13 +282,15 @@ var ToCPay = (props, ref) => {
|
|
|
277
282
|
(_a2 = props.callback) == null ? void 0 : _a2.call(props, res);
|
|
278
283
|
};
|
|
279
284
|
const onCancel = () => {
|
|
280
|
-
var _a2;
|
|
285
|
+
var _a2, _b2;
|
|
281
286
|
(0, import_payGroup.removePayGroupFromStorage)((_a2 = state.payGroup) == null ? void 0 : _a2.order_id);
|
|
282
287
|
setShowInformation(false);
|
|
283
288
|
setOpen(false);
|
|
284
289
|
payCallback({
|
|
285
290
|
key: "cancel",
|
|
286
|
-
data: {
|
|
291
|
+
data: {
|
|
292
|
+
order_id: (_b2 = state.payGroup) == null ? void 0 : _b2.order_id
|
|
293
|
+
}
|
|
287
294
|
});
|
|
288
295
|
};
|
|
289
296
|
(0, import_ahooks.useUpdateEffect)(() => {
|
|
@@ -49,3 +49,9 @@ export declare const isFranchiseeShop: (path?: any, history?: any) => any;
|
|
|
49
49
|
export declare const getFranchiseeShopId: (path?: any, history?: any) => number;
|
|
50
50
|
export declare const formatFranchiseeRoute: (url: string, history?: any) => string;
|
|
51
51
|
export declare const getAvailableMaxAmount: (data: WalletPassDataType) => string;
|
|
52
|
+
export declare const clientPayment: (params: {
|
|
53
|
+
order_id: number;
|
|
54
|
+
type: "aliPay" | "wxPay";
|
|
55
|
+
values: any;
|
|
56
|
+
interaction?: any;
|
|
57
|
+
}) => void;
|
|
@@ -20,6 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
var utils_exports = {};
|
|
21
21
|
__export(utils_exports, {
|
|
22
22
|
calcWalletPassListAmount: () => calcWalletPassListAmount,
|
|
23
|
+
clientPayment: () => clientPayment,
|
|
23
24
|
formatFranchiseeRoute: () => formatFranchiseeRoute,
|
|
24
25
|
formatWalletPassList2PreparePayments: () => formatWalletPassList2PreparePayments,
|
|
25
26
|
formatWalletPassParams: () => formatWalletPassParams,
|
|
@@ -85,9 +86,23 @@ var formatFranchiseeRoute = (url, history) => {
|
|
|
85
86
|
var getAvailableMaxAmount = (data) => {
|
|
86
87
|
return data.tag !== "point_card" ? data.available_max_amount : data == null ? void 0 : data.recommended_usage_amount;
|
|
87
88
|
};
|
|
89
|
+
var clientPayment = (params) => {
|
|
90
|
+
var _a, _b;
|
|
91
|
+
const { interaction, type, order_id, values } = params;
|
|
92
|
+
(_b = (_a = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a.postMessageToApp) == null ? void 0 : _b.call(_a, {
|
|
93
|
+
module: "global",
|
|
94
|
+
key: "paymentClient",
|
|
95
|
+
data: {
|
|
96
|
+
type,
|
|
97
|
+
order_id,
|
|
98
|
+
...values
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
};
|
|
88
102
|
// Annotate the CommonJS export names for ESM import in node:
|
|
89
103
|
0 && (module.exports = {
|
|
90
104
|
calcWalletPassListAmount,
|
|
105
|
+
clientPayment,
|
|
91
106
|
formatFranchiseeRoute,
|
|
92
107
|
formatWalletPassList2PreparePayments,
|
|
93
108
|
formatWalletPassParams,
|
|
@@ -35,6 +35,8 @@ module.exports = __toCommonJS(ProductItem_exports);
|
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
36
|
var import_utils = require("@pisell/utils");
|
|
37
37
|
var import_classnames = __toESM(require("classnames"));
|
|
38
|
+
var import_decimal = __toESM(require("decimal.js"));
|
|
39
|
+
var import_pisellPriceText = __toESM(require("../../../../productSelect/components/pisellPriceText"));
|
|
38
40
|
var import_index = require("./index.less");
|
|
39
41
|
var ProductItem = ({
|
|
40
42
|
item = {},
|
|
@@ -43,6 +45,11 @@ var ProductItem = ({
|
|
|
43
45
|
style,
|
|
44
46
|
className
|
|
45
47
|
}) => {
|
|
48
|
+
const { price, is_bundle, minimum_markup_price } = item;
|
|
49
|
+
let _price = price;
|
|
50
|
+
if (is_bundle) {
|
|
51
|
+
_price = new import_decimal.default(price).plus(new import_decimal.default(minimum_markup_price)).toFixed(2);
|
|
52
|
+
}
|
|
46
53
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
47
54
|
"div",
|
|
48
55
|
{
|
|
@@ -59,7 +66,7 @@ var ProductItem = ({
|
|
|
59
66
|
className: "product-item-card-cover"
|
|
60
67
|
}
|
|
61
68
|
) : null,
|
|
62
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: "product-item-card-content" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "product-item-card-title" }, item.title), /* @__PURE__ */ import_react.default.createElement("div", { className: "product-item-card-price" },
|
|
69
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "product-item-card-content" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "product-item-card-title" }, item.title), /* @__PURE__ */ import_react.default.createElement("div", { className: "product-item-card-price" }, /* @__PURE__ */ import_react.default.createElement(import_pisellPriceText.default, { value: _price, isMini: is_bundle })))
|
|
63
70
|
);
|
|
64
71
|
};
|
|
65
72
|
var ProductItem_default = ProductItem;
|
|
@@ -37,7 +37,7 @@ var import_antd = require("antd");
|
|
|
37
37
|
var import_materials = require("@pisell/materials");
|
|
38
38
|
var import_ahooks = require("ahooks");
|
|
39
39
|
var import_utils = require("@pisell/utils");
|
|
40
|
-
var import_tabs = __toESM(require("
|
|
40
|
+
var import_tabs = __toESM(require("./tabs"));
|
|
41
41
|
var import_productGroup = __toESM(require("../productGroup"));
|
|
42
42
|
var io = null;
|
|
43
43
|
var TabProduct = (props) => {
|
|
@@ -63,17 +63,30 @@ var TabProduct = (props) => {
|
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
65
|
}, [list]);
|
|
66
|
+
const debouncedScroll = (0, import_ahooks.useDebounceFn)(
|
|
67
|
+
(id) => {
|
|
68
|
+
var _a;
|
|
69
|
+
(_a = tabsRef == null ? void 0 : tabsRef.current) == null ? void 0 : _a.scroll(id);
|
|
70
|
+
},
|
|
71
|
+
{ wait: 100 }
|
|
72
|
+
// 100ms防抖
|
|
73
|
+
);
|
|
66
74
|
const handleObserver = (0, import_ahooks.useMemoizedFn)(() => {
|
|
67
75
|
const _marginTop = 270;
|
|
68
76
|
const _marginBottom = window.innerHeight - 70 - 200 - 70;
|
|
69
77
|
const _rootMargin = `${_marginTop * -1}px 0px ${_marginBottom * -1}px 0px`;
|
|
70
78
|
io = new IntersectionObserver(
|
|
71
79
|
(entries) => {
|
|
72
|
-
var _a, _b
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
80
|
+
var _a, _b;
|
|
81
|
+
const enteringEntries = entries.filter((entry) => entry.isIntersecting);
|
|
82
|
+
if (enteringEntries.length > 0) {
|
|
83
|
+
const topMostEntry = enteringEntries.reduce((top, current) => {
|
|
84
|
+
return current.boundingClientRect.top < top.boundingClientRect.top ? current : top;
|
|
85
|
+
});
|
|
86
|
+
const [name, id] = (_b = (_a = topMostEntry == null ? void 0 : topMostEntry.target) == null ? void 0 : _a.id) == null ? void 0 : _b.split("-");
|
|
87
|
+
const newGroupId = Number(id);
|
|
88
|
+
setCurrentGroupId(newGroupId);
|
|
89
|
+
debouncedScroll.run(id);
|
|
77
90
|
}
|
|
78
91
|
},
|
|
79
92
|
{
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
export interface Com<T> extends React.FC<T> {
|
|
4
|
+
}
|
|
5
|
+
export declare type RowKey = string | number;
|
|
6
|
+
export interface Option {
|
|
7
|
+
id: number | string;
|
|
8
|
+
name: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export interface TabsProps extends Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, 'onChange'> {
|
|
11
|
+
renderTab: (item: any) => React.ReactNode;
|
|
12
|
+
rowKey: RowKey;
|
|
13
|
+
name: RowKey;
|
|
14
|
+
onChange: (key: RowKey, _item: any) => void;
|
|
15
|
+
tab: RowKey;
|
|
16
|
+
className: string;
|
|
17
|
+
tabsRef: any;
|
|
18
|
+
options: Option[];
|
|
19
|
+
}
|
|
20
|
+
declare const _default: React.ForwardRefExoticComponent<Omit<Partial<TabsProps>, "ref"> & React.RefAttributes<unknown>>;
|
|
21
|
+
export default _default;
|