@pisell/private-materials 6.3.50 → 6.3.52
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/meta.js +1 -1
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +1 -1
- package/es/components/Sales/Summary/utils.d.ts +1 -1
- 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/appointmentBooking/components/Voucher/index.js +1 -1
- package/es/components/booking/addons/index.js +20 -17
- package/es/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
- package/es/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -0
- package/es/components/booking/components/collapsibleList/utils.d.ts +1 -0
- package/es/components/booking/components/emptyBooking/index.d.ts +1 -0
- package/es/components/booking/components/footer/FooterMenus/index.d.ts +1 -0
- package/es/components/booking/components/footer/utils.d.ts +5 -0
- package/es/components/booking/components/footer/utils.js +85 -40
- package/es/components/booking/components/reloadResourceModal/index.d.ts +1 -0
- package/es/components/booking/components/voucher/index.js +18 -5
- package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
- package/es/components/booking/info/date/index.d.ts +1 -0
- package/es/components/booking/info/notes/index.d.ts +1 -0
- package/es/components/booking/info/service/actions/index.d.ts +1 -0
- package/es/components/booking/info/service2/utils.js +1 -0
- package/es/components/booking/info2/service/actions/index.d.ts +1 -0
- package/es/components/booking/info2/service/addService/index.js +2 -3
- package/es/components/booking/info2/service/contactInfoMode/index.d.ts +1 -0
- package/es/components/booking/materiels/duration/index.d.ts +1 -0
- package/es/components/booking/notes/NoteBlock/NoteItem/index.d.ts +1 -0
- package/es/components/booking/notes/NoteBlock/index.d.ts +1 -0
- package/es/components/booking/utils.d.ts +1 -0
- package/es/components/booking/utils.js +16 -2
- package/es/components/eftpos/form/index.d.ts +0 -1
- package/es/components/eftpos/hooks.d.ts +0 -1
- package/es/components/eftposPay/amount.d.ts +1 -0
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/payo/config.d.ts +1 -0
- package/es/components/eftposPay/store/index.d.ts +1 -1
- package/es/components/eftposPay/tip.d.ts +1 -0
- package/es/components/eftposPay/windcave/receiptAction.d.ts +1 -0
- package/es/components/eftposPay/windcave/windcave.d.ts +1 -0
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
- 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/bookingDetailModal/components/Resource.d.ts +1 -0
- package/es/components/login/index.d.ts +1 -0
- 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/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
- package/es/components/productExtension/fields/Forms/index.d.ts +0 -1
- package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
- package/es/components/ruleSetting/ruleBorder/index.d.ts +1 -0
- package/es/components/schedules/calendar/index.d.ts +1 -0
- package/es/components/schedules/components/ScheduleDetailList/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
- package/es/components/schedules/products/index.d.ts +0 -1
- package/es/components/schedules/products/list/ProductItem/index.d.ts +1 -0
- package/es/components/schedules/products/list/index.d.ts +1 -0
- package/es/components/schedules/resources/list/index.d.ts +1 -0
- package/es/components/schedules/resources/relationProduct/index.d.ts +0 -1
- package/es/components/shoppingCart/index.d.ts +1 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +3 -3
- package/es/components/ticketBooking/utils/index.js +23 -8
- package/es/components/wallet/hooks/useWalletCard.d.ts +1 -0
- package/es/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/es/hooks/usePaymentLogger.d.ts +1 -0
- package/es/plus/saasCreateOrganization/components/Header.d.ts +1 -0
- package/es/plus/saasRegister/components/EntryEmail.d.ts +1 -0
- package/es/plus/saasRegister/components/EntryInfo.d.ts +1 -0
- package/es/plus/saasRegister/components/GoLogin.d.ts +1 -0
- package/es/plus/saasRegister/components/Header.d.ts +1 -0
- package/es/plus/saasRegister/components/VerifyError.d.ts +1 -0
- package/es/plus/saasRegister/components/VerifyingLink.d.ts +1 -0
- package/es/plus/walletPassGallery/components/footerButton/index.js +2 -4
- package/es/plus/walletPassGallery/components/footerButton/index.less +14 -59
- package/es/plus/walletPassGallery/components/passDetail/index.js +5 -1
- package/es/plus/walletPassGallery/components/passDetail/index.less +4 -0
- package/es/plus/walletPassGallery/components/recharge/index.js +19 -8
- package/es/plus/walletPassGallery/index.js +3 -1
- package/es/pro/Login2.0/index.less +15 -8
- package/lib/components/Sales/Summary/utils.d.ts +1 -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/appointmentBooking/components/Voucher/index.js +1 -1
- package/lib/components/booking/addons/index.js +10 -7
- package/lib/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
- package/lib/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -0
- package/lib/components/booking/components/collapsibleList/utils.d.ts +1 -0
- package/lib/components/booking/components/emptyBooking/index.d.ts +1 -0
- package/lib/components/booking/components/footer/FooterMenus/index.d.ts +1 -0
- package/lib/components/booking/components/footer/utils.d.ts +5 -0
- package/lib/components/booking/components/footer/utils.js +56 -23
- package/lib/components/booking/components/reloadResourceModal/index.d.ts +1 -0
- package/lib/components/booking/components/voucher/index.js +19 -6
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
- package/lib/components/booking/info/date/index.d.ts +1 -0
- package/lib/components/booking/info/notes/index.d.ts +1 -0
- package/lib/components/booking/info/service/actions/index.d.ts +1 -0
- package/lib/components/booking/info/service2/utils.js +1 -0
- package/lib/components/booking/info2/service/actions/index.d.ts +1 -0
- package/lib/components/booking/info2/service/addService/index.js +1 -2
- package/lib/components/booking/info2/service/contactInfoMode/index.d.ts +1 -0
- package/lib/components/booking/materiels/duration/index.d.ts +1 -0
- package/lib/components/booking/notes/NoteBlock/NoteItem/index.d.ts +1 -0
- package/lib/components/booking/notes/NoteBlock/index.d.ts +1 -0
- package/lib/components/booking/utils.d.ts +1 -0
- package/lib/components/booking/utils.js +12 -0
- package/lib/components/eftpos/form/index.d.ts +0 -1
- package/lib/components/eftpos/hooks.d.ts +0 -1
- package/lib/components/eftposPay/amount.d.ts +1 -0
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/payo/config.d.ts +1 -0
- package/lib/components/eftposPay/store/index.d.ts +1 -1
- package/lib/components/eftposPay/tip.d.ts +1 -0
- package/lib/components/eftposPay/windcave/receiptAction.d.ts +1 -0
- package/lib/components/eftposPay/windcave/windcave.d.ts +1 -0
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
- 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/bookingDetailModal/components/Resource.d.ts +1 -0
- package/lib/components/login/index.d.ts +1 -0
- 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/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
- package/lib/components/productExtension/fields/Forms/index.d.ts +0 -1
- package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
- package/lib/components/ruleSetting/ruleBorder/index.d.ts +1 -0
- package/lib/components/schedules/calendar/index.d.ts +1 -0
- package/lib/components/schedules/components/ScheduleDetailList/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
- package/lib/components/schedules/products/index.d.ts +0 -1
- package/lib/components/schedules/products/list/ProductItem/index.d.ts +1 -0
- package/lib/components/schedules/products/list/index.d.ts +1 -0
- package/lib/components/schedules/resources/list/index.d.ts +1 -0
- package/lib/components/schedules/resources/relationProduct/index.d.ts +0 -1
- package/lib/components/shoppingCart/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
- package/lib/components/ticketBooking/utils/index.js +9 -4
- package/lib/components/wallet/hooks/useWalletCard.d.ts +1 -0
- package/lib/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/lib/hooks/usePaymentLogger.d.ts +1 -0
- package/lib/plus/saasCreateOrganization/components/Header.d.ts +1 -0
- package/lib/plus/saasRegister/components/EntryEmail.d.ts +1 -0
- package/lib/plus/saasRegister/components/EntryInfo.d.ts +1 -0
- package/lib/plus/saasRegister/components/GoLogin.d.ts +1 -0
- package/lib/plus/saasRegister/components/Header.d.ts +1 -0
- package/lib/plus/saasRegister/components/VerifyError.d.ts +1 -0
- package/lib/plus/saasRegister/components/VerifyingLink.d.ts +1 -0
- package/lib/plus/walletPassGallery/components/footerButton/index.js +2 -2
- package/lib/plus/walletPassGallery/components/footerButton/index.less +14 -59
- package/lib/plus/walletPassGallery/components/passDetail/index.js +4 -1
- package/lib/plus/walletPassGallery/components/passDetail/index.less +4 -0
- package/lib/plus/walletPassGallery/components/recharge/index.js +7 -1
- package/lib/plus/walletPassGallery/index.js +3 -1
- package/lib/pro/Login2.0/index.less +15 -8
- package/package.json +3 -3
|
@@ -18,6 +18,7 @@ import { locales } from '@pisell/utils';
|
|
|
18
18
|
import { isDayBooking, formatDayDate } from "./info/service2/utils";
|
|
19
19
|
import { intersectionBy } from 'lodash';
|
|
20
20
|
import { getAppointmentTimingPreference } from "./info2/utilsByBooking";
|
|
21
|
+
import Decimal from "decimal.js";
|
|
21
22
|
var Request = /*#__PURE__*/function () {
|
|
22
23
|
function Request() {
|
|
23
24
|
_classCallCheck(this, Request);
|
|
@@ -754,11 +755,24 @@ export var getServerItemExtend = function getServerItemExtend(state, cacheItem,
|
|
|
754
755
|
return _extend;
|
|
755
756
|
};
|
|
756
757
|
|
|
758
|
+
// 获取主商品价格 包含组合规格
|
|
759
|
+
export var getMainPrice = function getMainPrice(item, price) {
|
|
760
|
+
var _item$_extend;
|
|
761
|
+
var newPrice = new Decimal(price || item._extend.price || 0);
|
|
762
|
+
var other = (_item$_extend = item._extend) === null || _item$_extend === void 0 ? void 0 : _item$_extend.other;
|
|
763
|
+
|
|
764
|
+
// 多规格
|
|
765
|
+
if (other !== null && other !== void 0 && other.product_variant_id) {
|
|
766
|
+
newPrice = new Decimal((other === null || other === void 0 ? void 0 : other.price) || 0);
|
|
767
|
+
}
|
|
768
|
+
return newPrice.toNumber();
|
|
769
|
+
};
|
|
770
|
+
|
|
757
771
|
// 商品价格: (商品价格 + (套餐价格 + 单规格价格 * 单规格数量) * 套餐数量 + 单规格价格 * 单规格数量) * 商品数量
|
|
758
772
|
export var getProductTotalPrice = function getProductTotalPrice(item) {
|
|
759
|
-
var _item$
|
|
773
|
+
var _item$_extend2;
|
|
760
774
|
var price = Number(item._extend.price);
|
|
761
|
-
var other = (_item$
|
|
775
|
+
var other = (_item$_extend2 = item._extend) === null || _item$_extend2 === void 0 ? void 0 : _item$_extend2.other;
|
|
762
776
|
|
|
763
777
|
// 多规格
|
|
764
778
|
if (other !== null && other !== void 0 && other.product_variant_id) {
|
|
@@ -19,7 +19,7 @@ export declare const useStoreRef: <T extends {
|
|
|
19
19
|
readonly netRef: React.MutableRefObject<boolean | undefined>;
|
|
20
20
|
readonly symbolRef: React.MutableRefObject<string>;
|
|
21
21
|
readonly amountRef: React.MutableRefObject<string | number>;
|
|
22
|
-
readonly eftposRef: React.MutableRefObject<"stripe" | "
|
|
22
|
+
readonly eftposRef: React.MutableRefObject<"stripe" | "tyro" | "windcave" | "payo" | "linkly">;
|
|
23
23
|
readonly clientRef: React.MutableRefObject<ClientEnum>;
|
|
24
24
|
readonly dataRef: React.MutableRefObject<import("./store").State>;
|
|
25
25
|
};
|
|
@@ -297,7 +297,7 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
|
297
297
|
amount?: string | number | undefined;
|
|
298
298
|
mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
|
|
299
299
|
order_id?: string | number | undefined;
|
|
300
|
-
eftpos?: "stripe" | "
|
|
300
|
+
eftpos?: "stripe" | "tyro" | "windcave" | "payo" | "linkly" | undefined;
|
|
301
301
|
action?: "amount" | "pay" | "deviceList" | undefined;
|
|
302
302
|
key?: number | undefined;
|
|
303
303
|
step?: number | undefined;
|
|
@@ -21,7 +21,7 @@ import { getUniqueId, locales, sendWarningLog } from '@pisell/utils';
|
|
|
21
21
|
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
|
22
22
|
import { useMemoizedFn } from 'ahooks';
|
|
23
23
|
import useEngineContext from "../../../../hooks/useEngineContext";
|
|
24
|
-
import { isSessionProduct, request, getProductTotalPrice, getIsEject, getIsOnlySession } from "../../../booking/utils";
|
|
24
|
+
import { isSessionProduct, request, getProductTotalPrice, getIsEject, getIsOnlySession, getMainPrice } from "../../../booking/utils";
|
|
25
25
|
import { getProductExtend } from "../../../booking/info2/service/addService/utils";
|
|
26
26
|
import { holderId, isDaysBooking, isNormalProductByDurationSchedule } from "../../../booking/info/service2/utils";
|
|
27
27
|
import { getIsBundleOrCombination, isBooking4Shop } from "../../../booking/info/utils";
|
|
@@ -390,12 +390,12 @@ var AddSerivce = function AddSerivce(props) {
|
|
|
390
390
|
_extend: {
|
|
391
391
|
start_date: state.date.value,
|
|
392
392
|
quantity: (e === null || e === void 0 ? void 0 : e.quantity) || 1,
|
|
393
|
-
price: _detail.price,
|
|
394
393
|
product_name: item.title,
|
|
395
394
|
other: other
|
|
396
395
|
},
|
|
397
396
|
new: 1
|
|
398
397
|
});
|
|
398
|
+
cacheItem._extend.price = getMainPrice(_detail, _detail.price);
|
|
399
399
|
_total = getProductTotalPrice(cacheItem); // 用于折扣 可修改
|
|
400
400
|
cacheItem._extend.total = _total;
|
|
401
401
|
// 用于储存原价
|
|
@@ -487,7 +487,7 @@ var AddSerivce = function AddSerivce(props) {
|
|
|
487
487
|
});
|
|
488
488
|
onEdit === null || onEdit === void 0 || onEdit(cacheItem);
|
|
489
489
|
}
|
|
490
|
-
case
|
|
490
|
+
case 25:
|
|
491
491
|
case "end":
|
|
492
492
|
return _context3.stop();
|
|
493
493
|
}
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
var _excluded = ["detail"];
|
|
2
2
|
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); }
|
|
3
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
4
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
5
|
+
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); }
|
|
6
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
7
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
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; }
|
|
3
9
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
10
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
5
11
|
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; }
|
|
@@ -126,20 +132,29 @@ export var addService = function addService(list, addItem, state) {
|
|
|
126
132
|
// 是否设置过 只追加到第一个中
|
|
127
133
|
var isSetCount = false;
|
|
128
134
|
value = list.map(function (item) {
|
|
135
|
+
var _item$_extend;
|
|
129
136
|
// 是否商品券折扣的商品
|
|
130
137
|
var isGoodPassDiscountProduct = (item.discount_list || []).some(function (item) {
|
|
131
138
|
return item.type === 'good_pass';
|
|
132
139
|
});
|
|
133
|
-
|
|
134
|
-
|
|
140
|
+
// 子商品是否有商品券折扣的商品
|
|
141
|
+
var bundleDiscountList = [];
|
|
142
|
+
((item === null || item === void 0 || (_item$_extend = item._extend) === null || _item$_extend === void 0 || (_item$_extend = _item$_extend.other) === null || _item$_extend === void 0 ? void 0 : _item$_extend.bundle) || []).forEach(function (item) {
|
|
143
|
+
bundleDiscountList.push.apply(bundleDiscountList, _toConsumableArray((item === null || item === void 0 ? void 0 : item.discount_list) || []));
|
|
144
|
+
});
|
|
145
|
+
var isGoodPassBundleProduct = bundleDiscountList.some(function (item) {
|
|
146
|
+
return item.type === 'good_pass';
|
|
147
|
+
});
|
|
148
|
+
if (isSameProduct(item, addItem) && !isSetCount && !isGoodPassDiscountProduct && !isGoodPassBundleProduct) {
|
|
149
|
+
var _item$_extend2, _addItem$_extend, _item$_extend3;
|
|
135
150
|
isNotSame = false;
|
|
136
|
-
var quantity = ((item === null || item === void 0 || (_item$
|
|
151
|
+
var quantity = ((item === null || item === void 0 || (_item$_extend2 = item._extend) === null || _item$_extend2 === void 0 ? void 0 : _item$_extend2.quantity) || 1) + ((addItem === null || addItem === void 0 || (_addItem$_extend = addItem._extend) === null || _addItem$_extend === void 0 ? void 0 : _addItem$_extend.quantity) || 1);
|
|
137
152
|
count = quantity;
|
|
138
153
|
isSetCount = true;
|
|
139
154
|
return _objectSpread(_objectSpread({}, item), {}, {
|
|
140
155
|
_extend: _objectSpread(_objectSpread({}, item._extend), {}, {
|
|
141
156
|
quantity: quantity,
|
|
142
|
-
other: _objectSpread(_objectSpread({}, ((_item$
|
|
157
|
+
other: _objectSpread(_objectSpread({}, ((_item$_extend3 = item._extend) === null || _item$_extend3 === void 0 ? void 0 : _item$_extend3.other) || {}), {}, {
|
|
143
158
|
quantity: quantity
|
|
144
159
|
})
|
|
145
160
|
})
|
|
@@ -206,11 +221,11 @@ export var getIsShowNumber = function getIsShowNumber(item, state) {
|
|
|
206
221
|
|
|
207
222
|
// 生成服务key
|
|
208
223
|
export var genServiceKey = function genServiceKey(item) {
|
|
209
|
-
var _item$
|
|
224
|
+
var _item$_extend4, _item$_extend5, _item$_extend6;
|
|
210
225
|
var product_id = item.product_id;
|
|
211
|
-
var durationKey = (_item$
|
|
212
|
-
var start_time = (_item$
|
|
213
|
-
var total = (_item$
|
|
226
|
+
var durationKey = (_item$_extend4 = item._extend) === null || _item$_extend4 === void 0 ? void 0 : _item$_extend4.duration;
|
|
227
|
+
var start_time = (_item$_extend5 = item._extend) === null || _item$_extend5 === void 0 ? void 0 : _item$_extend5.start_time;
|
|
228
|
+
var total = (_item$_extend6 = item._extend) === null || _item$_extend6 === void 0 ? void 0 : _item$_extend6.total;
|
|
214
229
|
var resourceKey = '';
|
|
215
230
|
Object.values(item._extend.resource).forEach(function (resources) {
|
|
216
231
|
resources.forEach(function (resource) {
|
|
@@ -212,10 +212,7 @@ var FooterButtons = function FooterButtons(_ref) {
|
|
|
212
212
|
className: "pisell-wallet-pass-gallery_footer-buttons-item pisell-wallet-pass-gallery_footer-buttons-item-primary"
|
|
213
213
|
}, locales.getText('wallet-pass-gallery.recharge')));
|
|
214
214
|
}
|
|
215
|
-
|
|
216
|
-
// 根据按钮数量设置不同的类名
|
|
217
|
-
var buttonCount = buttons.length;
|
|
218
|
-
var className = "pisell-wallet-pass-gallery_footer-buttons pisell-wallet-pass-gallery_footer-buttons-count-".concat(buttonCount);
|
|
215
|
+
var className = "pisell-wallet-pass-gallery_footer-buttons";
|
|
219
216
|
return buttons.length > 0 ? /*#__PURE__*/React.createElement("div", {
|
|
220
217
|
className: className
|
|
221
218
|
}, buttons) : null;
|
|
@@ -223,6 +220,7 @@ var FooterButtons = function FooterButtons(_ref) {
|
|
|
223
220
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
224
221
|
className: "pisell-wallet-pass-gallery_footer"
|
|
225
222
|
}, renderButtons()), /*#__PURE__*/React.createElement(PisellModal, {
|
|
223
|
+
destroyOnClose: true,
|
|
226
224
|
platform: platform,
|
|
227
225
|
mobileModalHeight: "auto",
|
|
228
226
|
headerDivider: false,
|
|
@@ -1,83 +1,38 @@
|
|
|
1
1
|
.pisell-wallet-pass-gallery_footer {
|
|
2
2
|
position: relative;
|
|
3
|
-
left: 0;
|
|
4
|
-
right: 0;
|
|
5
|
-
bottom: 0;
|
|
6
3
|
background-color: #fff;
|
|
7
4
|
padding: 24px;
|
|
8
5
|
z-index: 100;
|
|
9
6
|
border-top: 1px solid #d0d5de;
|
|
10
|
-
margin-left: -
|
|
11
|
-
margin-right: -
|
|
7
|
+
margin-left: -24px;
|
|
8
|
+
margin-right: -24px;
|
|
12
9
|
&-buttons {
|
|
13
10
|
display: flex;
|
|
14
11
|
gap: 12px;
|
|
15
12
|
width: 100%;
|
|
16
13
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
display: flex;
|
|
21
|
-
>span{
|
|
22
|
-
display: block;
|
|
23
|
-
// width: 100%;
|
|
24
|
-
flex:1;
|
|
14
|
+
.pisell-wallet-pass-gallery_footer-buttons-item-secondary {
|
|
15
|
+
overflow: hidden;
|
|
16
|
+
display: inline-block;
|
|
25
17
|
white-space: nowrap;
|
|
26
18
|
overflow: hidden;
|
|
27
19
|
text-overflow: ellipsis;
|
|
28
20
|
text-wrap: nowrap;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
// 按钮数量样式
|
|
34
|
-
// 单个按钮占满宽度
|
|
35
|
-
&-count-1 {
|
|
36
|
-
.pisell-wallet-pass-gallery_footer-buttons-item {
|
|
37
|
-
flex: 1;
|
|
38
|
-
width: 100%;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
// 两个按钮各占一半
|
|
43
|
-
&-count-2 {
|
|
44
|
-
.pisell-wallet-pass-gallery_footer-buttons-item {
|
|
45
|
-
flex: 1;
|
|
46
|
-
width: calc(50% - 6px);
|
|
21
|
+
> span {
|
|
22
|
+
display: inline;
|
|
47
23
|
}
|
|
48
24
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
.pisell-wallet-pass-gallery_footer-buttons-item {
|
|
53
|
-
flex: 1;
|
|
54
|
-
width: calc(33.33% - 8px);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
// 四个按钮各占四分之一
|
|
59
|
-
&-count-4 {
|
|
60
|
-
.pisell-wallet-pass-gallery_footer-buttons-item {
|
|
61
|
-
flex: 1;
|
|
62
|
-
width: calc(25% - 9px);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
// Ant Design按钮覆盖样式
|
|
67
|
-
:global(.ant-btn) {
|
|
68
|
-
height: 48px;
|
|
69
|
-
border-radius: 6px;
|
|
70
|
-
font-size: 16px;
|
|
71
|
-
font-weight: 500;
|
|
72
|
-
width: 100%;
|
|
25
|
+
|
|
26
|
+
.pisell-wallet-pass-gallery_footer-buttons-item {
|
|
27
|
+
flex-grow: 1;
|
|
73
28
|
}
|
|
74
|
-
|
|
29
|
+
|
|
75
30
|
&-item {
|
|
76
31
|
// 修饰符:主按钮
|
|
77
32
|
&-primary {
|
|
78
|
-
background-color: var(--theme-color, #
|
|
33
|
+
background-color: var(--theme-color, #7f56d9);
|
|
79
34
|
}
|
|
80
|
-
|
|
35
|
+
|
|
81
36
|
// 修饰符:次按钮
|
|
82
37
|
&-secondary {
|
|
83
38
|
background-color: #fff;
|
|
@@ -90,4 +45,4 @@
|
|
|
90
45
|
|
|
91
46
|
.pisell-wallet-pass-gallery_footer:empty {
|
|
92
47
|
display: none;
|
|
93
|
-
}
|
|
48
|
+
}
|
|
@@ -1,3 +1,7 @@
|
|
|
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 _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; }
|
|
3
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
4
|
+
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); }
|
|
1
5
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
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."); }
|
|
3
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); }
|
|
@@ -247,7 +251,7 @@ var PassDetail = function PassDetail(props) {
|
|
|
247
251
|
};
|
|
248
252
|
if (!props.dataSource) return null;
|
|
249
253
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
250
|
-
className: classNames("pisell-wallet-pass-gallery_detail", "pisell-wallet-pass-gallery_detail-".concat(platform))
|
|
254
|
+
className: classNames("pisell-wallet-pass-gallery_detail", "pisell-wallet-pass-gallery_detail-".concat(platform), _defineProperty({}, "pisell-wallet-pass-gallery_detail-with-footer", platform === 'h5' && tag === 'gift_card'))
|
|
251
255
|
}, /*#__PURE__*/React.createElement("div", {
|
|
252
256
|
className: "pisell-wallet-pass-gallery_detail-content",
|
|
253
257
|
ref: containerRef
|