@pisell/private-materials 3.2.1 → 3.2.3
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 +3 -3
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +10 -10
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +9 -9
- package/es/components/booking/addons/model.d.ts +10 -1
- package/es/components/booking/addons/model.js +5 -5
- 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/TabProduct/selectProductItem/index.js +4 -4
- package/es/components/booking/components/TabProduct/tabs/index.js +5 -1
- package/es/components/booking/components/browserSelect/index.js +1 -1
- 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/deposit/index.d.ts +1 -0
- package/es/components/booking/forms/model.d.ts +10 -1
- package/es/components/booking/forms/model.js +5 -5
- package/es/components/booking/forms/single/index.d.ts +1 -0
- package/es/components/booking/hooks/useClearCart.d.ts +1 -0
- 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/header/index.d.ts +1 -0
- package/es/components/booking/info/model.d.ts +10 -1
- 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/service/like/index.js +1 -1
- package/es/components/booking/info/service/serviceItem/index.d.ts +1 -0
- package/es/components/booking/info/service/serviceList/index.d.ts +1 -0
- package/es/components/booking/info2/service/actions/index.d.ts +1 -0
- package/es/components/booking/info2/service/addService/index.d.ts +1 -0
- package/es/components/booking/info2/service/addTimeModal/index.d.ts +1 -0
- package/es/components/booking/info2/service/serviceItem/index.d.ts +1 -0
- package/es/components/booking/info2/service/serviceList/index.d.ts +1 -0
- package/es/components/booking/materiels/contacts/index.d.ts +1 -0
- package/es/components/booking/materiels/contacts/index.js +5 -5
- package/es/components/booking/materiels/duration/index.d.ts +1 -0
- package/es/components/booking/materiels/startTime/index.d.ts +1 -0
- package/es/components/booking/materiels/startTime/index.js +1 -1
- package/es/components/booking/model.d.ts +9 -1
- package/es/components/booking/notes/NoteBlock/NoteItem/index.d.ts +1 -0
- package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
- package/es/components/booking/notes/NoteBlock/index.d.ts +1 -0
- package/es/components/booking/notes/NoteBlock/index.js +11 -11
- package/es/components/booking/notes/addNote/index.d.ts +1 -0
- package/es/components/booking/notes/addNote/index.js +1 -1
- package/es/components/booking/notes/model.d.ts +10 -1
- package/es/components/booking/notes/model.js +5 -5
- package/es/components/booking/payments/model.d.ts +10 -1
- package/es/components/booking/payments/model.js +5 -5
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/eftpos/index.d.ts +1 -0
- package/es/components/eftpos/pos.d.ts +1 -0
- package/es/components/eftposPay/amount.d.ts +2 -1
- package/es/components/eftposPay/app.d.ts +1 -0
- package/es/components/eftposPay/component/fail/network.d.ts +1 -0
- package/es/components/eftposPay/component/manual/index.d.ts +1 -0
- package/es/components/eftposPay/component/signature/index.d.ts +1 -0
- package/es/components/eftposPay/device.d.ts +2 -1
- 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 +4 -4
- 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/listComponent/index.js +5 -5
- package/es/components/login/index.js +1 -1
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +1 -0
- package/es/components/pay/toC/model.d.ts +9 -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/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/index.d.ts +1 -0
- package/es/components/productExtension/card/index.js +3 -3
- package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
- package/es/components/productExtension/fields/Forms/index.js +12 -12
- package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
- package/es/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
- package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
- package/es/components/productExtension/index.d.ts +1 -0
- package/es/components/productExtension/index.js +7 -7
- package/es/components/productExtension/server.js +2 -2
- package/es/components/ruleSetting/ruleBorder/index.d.ts +1 -0
- package/es/components/ruleSetting/ruleBorder/index.js +1 -1
- package/es/components/schedules/calendar/index.d.ts +1 -0
- package/es/components/schedules/calendar/index.js +4 -4
- package/es/components/schedules/calendar/serve.js +2 -2
- package/es/components/schedules/components/CurrentDay/index.js +5 -5
- package/es/components/schedules/components/CurrentDay/serve.js +2 -2
- package/es/components/schedules/components/DropdownSort/index.js +1 -1
- package/es/components/schedules/components/ResourceList/index.js +1 -1
- package/es/components/schedules/components/ScheduleDetailList/index.d.ts +1 -0
- package/es/components/schedules/components/ScheduleList/index.d.ts +1 -0
- package/es/components/schedules/components/Search/index.js +5 -5
- package/es/components/schedules/index.js +10 -10
- package/es/components/schedules/model.d.ts +9 -1
- package/es/components/schedules/model.js +5 -5
- package/es/components/schedules/openHours/index.js +1 -1
- package/es/components/schedules/openHours/serve.js +2 -2
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
- package/es/components/schedules/products/ProductDetailDrawer/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
- 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/products/serve.js +2 -2
- package/es/components/schedules/products/utils.js +5 -5
- package/es/components/schedules/resources/detail/detailContent.js +2 -2
- package/es/components/schedules/resources/detail/index.js +10 -10
- package/es/components/schedules/resources/index.d.ts +1 -0
- package/es/components/schedules/resources/list/index.d.ts +1 -0
- package/es/components/schedules/resources/list/index.js +2 -2
- package/es/components/schedules/resources/relationProduct/index.js +1 -1
- package/es/components/schedules/resources/serve.js +2 -2
- package/es/components/schedules/schedules/AllSchedules/index.d.ts +1 -0
- package/es/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -0
- package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
- package/es/components/schedules/schedules/index.d.ts +1 -0
- package/es/components/schedules/utils.js +4 -4
- package/es/components/selectModal/index.js +2 -2
- package/es/components/taxSelect/index.d.ts +1 -0
- package/es/components/wallet/Detail/index.js +69 -63
- package/es/components/wallet/Detail/index.less +1 -1
- package/es/components/wallet/Detail/locales.d.ts +6 -0
- package/es/components/wallet/Detail/locales.js +6 -0
- package/es/components/wallet/Detail/model.d.ts +13 -1
- package/es/components/wallet/DiscountCard/index.js +0 -7
- package/es/components/wallet/DiscountCard/model.d.ts +14 -1
- package/es/components/wallet/PointCard/index.js +1 -3
- package/es/components/wallet/PointCard/model.d.ts +13 -1
- package/es/components/wallet/RechargeableCard/index.js +0 -1
- package/es/components/wallet/RechargeableCard/model.d.ts +29 -1
- package/es/components/wallet/Voucher/index.js +36 -3
- package/es/components/wallet/Voucher/model.d.ts +13 -1
- package/es/components/wallet/components/FooterButtons/index.js +1 -1
- package/es/components/wallet/components/WalletCard.js +0 -1
- package/es/components/wallet/hooks/useWalletCard.d.ts +1 -0
- package/es/components/wallet/index.js +2 -3
- package/es/components/wallet/locales.js +1 -1
- package/es/components/wallet/model.d.ts +9 -1
- package/es/components/walletList/index.js +2 -4
- package/es/components/walletList/index.less +1 -2
- package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
- package/es/hooks/useComponents.js +1 -1
- package/lib/components/booking/addons/model.d.ts +10 -1
- 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/deposit/index.d.ts +1 -0
- package/lib/components/booking/forms/model.d.ts +10 -1
- package/lib/components/booking/forms/single/index.d.ts +1 -0
- package/lib/components/booking/hooks/useClearCart.d.ts +1 -0
- 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/header/index.d.ts +1 -0
- package/lib/components/booking/info/model.d.ts +10 -1
- 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/service/serviceItem/index.d.ts +1 -0
- package/lib/components/booking/info/service/serviceList/index.d.ts +1 -0
- package/lib/components/booking/info2/service/actions/index.d.ts +1 -0
- package/lib/components/booking/info2/service/addService/index.d.ts +1 -0
- package/lib/components/booking/info2/service/addTimeModal/index.d.ts +1 -0
- package/lib/components/booking/info2/service/serviceItem/index.d.ts +1 -0
- package/lib/components/booking/info2/service/serviceList/index.d.ts +1 -0
- package/lib/components/booking/materiels/contacts/index.d.ts +1 -0
- package/lib/components/booking/materiels/duration/index.d.ts +1 -0
- package/lib/components/booking/materiels/startTime/index.d.ts +1 -0
- package/lib/components/booking/model.d.ts +9 -1
- 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/notes/addNote/index.d.ts +1 -0
- package/lib/components/booking/notes/model.d.ts +10 -1
- package/lib/components/booking/payments/model.d.ts +10 -1
- package/lib/components/booking/utils.d.ts +2 -2
- package/lib/components/eftpos/index.d.ts +1 -0
- package/lib/components/eftpos/pos.d.ts +1 -0
- package/lib/components/eftposPay/amount.d.ts +2 -1
- package/lib/components/eftposPay/app.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/network.d.ts +1 -0
- package/lib/components/eftposPay/component/manual/index.d.ts +1 -0
- package/lib/components/eftposPay/component/signature/index.d.ts +1 -0
- package/lib/components/eftposPay/device.d.ts +2 -1
- 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 +4 -4
- 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/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +1 -0
- package/lib/components/pay/toC/model.d.ts +9 -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/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/index.d.ts +1 -0
- 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/productExtension/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/components/ScheduleList/index.d.ts +1 -0
- package/lib/components/schedules/index.js +1 -2
- package/lib/components/schedules/model.d.ts +9 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/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/SchedulesModule/AddSchedules/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/index.d.ts +1 -0
- 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/index.d.ts +1 -0
- package/lib/components/schedules/resources/list/index.d.ts +1 -0
- package/lib/components/schedules/schedules/AllSchedules/index.d.ts +1 -0
- package/lib/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -0
- package/lib/components/schedules/schedules/index.d.ts +1 -0
- package/lib/components/schedules/utils.js +1 -1
- package/lib/components/taxSelect/index.d.ts +1 -0
- package/lib/components/wallet/Detail/index.js +54 -52
- package/lib/components/wallet/Detail/index.less +1 -1
- package/lib/components/wallet/Detail/locales.d.ts +6 -0
- package/lib/components/wallet/Detail/locales.js +6 -0
- package/lib/components/wallet/Detail/model.d.ts +13 -1
- package/lib/components/wallet/DiscountCard/index.js +0 -5
- package/lib/components/wallet/DiscountCard/model.d.ts +14 -1
- package/lib/components/wallet/PointCard/index.js +0 -2
- package/lib/components/wallet/PointCard/model.d.ts +13 -1
- package/lib/components/wallet/RechargeableCard/model.d.ts +29 -1
- package/lib/components/wallet/Voucher/index.js +26 -1
- package/lib/components/wallet/Voucher/model.d.ts +13 -1
- package/lib/components/wallet/components/FooterButtons/index.js +2 -1
- package/lib/components/wallet/components/WalletCard.js +0 -1
- package/lib/components/wallet/hooks/useWalletCard.d.ts +1 -0
- package/lib/components/wallet/index.js +2 -3
- package/lib/components/wallet/locales.js +1 -1
- package/lib/components/wallet/model.d.ts +9 -1
- package/lib/components/walletList/index.js +2 -3
- package/lib/components/walletList/index.less +1 -2
- package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
- package/package.json +4 -4
|
@@ -33,44 +33,39 @@ __export(Detail_exports, {
|
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(Detail_exports);
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_materials = require("@pisell/materials");
|
|
36
37
|
var import_dayjs = __toESM(require("dayjs"));
|
|
37
38
|
var import_XClose = __toESM(require("@pisell/icon/es/XClose"));
|
|
38
39
|
var import_timezone = __toESM(require("dayjs/plugin/timezone"));
|
|
39
40
|
var import_utils = require("@pisell/utils");
|
|
40
41
|
var import_utc = __toESM(require("dayjs/plugin/utc"));
|
|
41
|
-
var
|
|
42
|
+
var import_materials2 = require("@pisell/materials");
|
|
42
43
|
var import_useEngineContext = __toESM(require("./../../../hooks/useEngineContext"));
|
|
43
44
|
var import_locales = __toESM(require("./locales"));
|
|
44
45
|
var import_serve = require("./serve");
|
|
45
46
|
var import_utils2 = require("./../../../utils");
|
|
46
47
|
var import_components = require("../components");
|
|
47
48
|
var import_index = require("./index.less");
|
|
48
|
-
var
|
|
49
|
-
var { Title, Text } = import_materials.Typography;
|
|
49
|
+
var { Text } = import_materials2.Typography;
|
|
50
50
|
import_dayjs.default.extend(import_timezone.default);
|
|
51
51
|
import_dayjs.default.extend(import_utc.default);
|
|
52
52
|
var Detail = (0, import_react.forwardRef)((props, ref) => {
|
|
53
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j
|
|
53
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
54
54
|
const {
|
|
55
55
|
detail = {},
|
|
56
56
|
buttonGroupList = [[]],
|
|
57
|
-
addWalletCallback,
|
|
58
|
-
style = {},
|
|
59
|
-
isDiscoundCard = false,
|
|
60
57
|
className,
|
|
61
58
|
showWalletBar = false,
|
|
62
59
|
onBack
|
|
63
60
|
} = props;
|
|
64
61
|
const {
|
|
65
|
-
id = "",
|
|
66
62
|
code = "",
|
|
67
63
|
tag = "",
|
|
68
64
|
product_title = "",
|
|
69
65
|
encoded = "",
|
|
70
66
|
balance,
|
|
71
67
|
expire_date = "",
|
|
72
|
-
product = {}
|
|
73
|
-
machinecode_config = {}
|
|
68
|
+
product = {}
|
|
74
69
|
} = detail;
|
|
75
70
|
const { description = "" } = product;
|
|
76
71
|
const context = (0, import_useEngineContext.default)();
|
|
@@ -82,6 +77,7 @@ var Detail = (0, import_react.forwardRef)((props, ref) => {
|
|
|
82
77
|
const [timeLineDetail, setTimeLineDetail] = (0, import_react.useState)({});
|
|
83
78
|
const [wechatModalOpen, setWechatModalOpen] = (0, import_react.useState)(false);
|
|
84
79
|
const [copyUrl, setCopyUrl] = (0, import_react.useState)("");
|
|
80
|
+
const [isLoading, setIsLoading] = (0, import_react.useState)(false);
|
|
85
81
|
const [apple_wallet_url, setAppleWalletUrl] = (0, import_react.useState)("");
|
|
86
82
|
const [google_wallet_url, setGoogleWalletUrl] = (0, import_react.useState)("");
|
|
87
83
|
const stateTimeUnix = 1723255863;
|
|
@@ -142,20 +138,25 @@ var Detail = (0, import_react.forwardRef)((props, ref) => {
|
|
|
142
138
|
label: import_utils.locales.getText("page.wallet.discount"),
|
|
143
139
|
value: balance ? `${Number(balance)}%` : ""
|
|
144
140
|
});
|
|
141
|
+
} else if (tag === "point_card") {
|
|
142
|
+
data.splice(2, 0, {
|
|
143
|
+
label: import_utils.locales.getText("page.wallet.points"),
|
|
144
|
+
value: balance ? `${Number(balance)}` : ""
|
|
145
|
+
});
|
|
145
146
|
} else {
|
|
146
147
|
data.splice(2, 0, {
|
|
147
148
|
label: import_utils.locales.getText("page.wallet.balance"),
|
|
148
|
-
value: balance ? `${symbol}${balance}` : ""
|
|
149
|
+
value: balance ? `${symbol}${Number(balance)}` : ""
|
|
149
150
|
});
|
|
150
151
|
}
|
|
151
152
|
setListData(data);
|
|
152
153
|
}, [detail]);
|
|
154
|
+
const { symbol = "$" } = (0, import_materials.usePisellConfig)();
|
|
153
155
|
import_utils.locales.init(import_locales.default, ((_d = dvaStore == null ? void 0 : dvaStore.core) == null ? void 0 : _d.translateLocale) || "en");
|
|
154
156
|
import_utils2.request.setRequest(utils == null ? void 0 : utils.request);
|
|
155
157
|
const { store } = ((_e = context.appHelper) == null ? void 0 : _e.utils) || { store: {} };
|
|
156
158
|
const platform = (0, import_utils.isMobile)() ? "h5" : "pc";
|
|
157
|
-
const
|
|
158
|
-
const timezone2 = ((_l = (_k = (_j = (_i = store == null ? void 0 : store.getState) == null ? void 0 : _i.call(store)) == null ? void 0 : _j.global) == null ? void 0 : _k.symbol) == null ? void 0 : _l.shop.timezone) || "Asia/Shanghai";
|
|
159
|
+
const timezone2 = ((_i = (_h = (_g = (_f = store == null ? void 0 : store.getState) == null ? void 0 : _f.call(store)) == null ? void 0 : _g.global) == null ? void 0 : _h.symbol) == null ? void 0 : _i.shop.timezone) || "Asia/Shanghai";
|
|
159
160
|
const formatTimeLineDta = (data) => {
|
|
160
161
|
if (data.length < 0) return [];
|
|
161
162
|
const filteredData = data.filter(
|
|
@@ -212,38 +213,39 @@ var Detail = (0, import_react.forwardRef)((props, ref) => {
|
|
|
212
213
|
};
|
|
213
214
|
const getTimeTreeList = async () => {
|
|
214
215
|
var _a2, _b2, _c2, _d2;
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
216
|
+
setIsLoading(true);
|
|
217
|
+
try {
|
|
218
|
+
const { list = [] } = await (0, import_serve.getAssetList)({
|
|
219
|
+
num: "99",
|
|
220
|
+
skip: "1",
|
|
221
|
+
card_id: code,
|
|
222
|
+
sourceType: tag,
|
|
223
|
+
tag,
|
|
224
|
+
business_object: "customer"
|
|
225
|
+
});
|
|
226
|
+
let filterList = list.filter(
|
|
227
|
+
(item) => !!assetActionEnum[item.action || ""]
|
|
228
|
+
);
|
|
229
|
+
for (let i = filterList.length - 1; i >= 0; i--) {
|
|
230
|
+
if (((_a2 = filterList[i]) == null ? void 0 : _a2.action) === "order_expend" && import_dayjs.default.tz((_b2 = filterList[i]) == null ? void 0 : _b2.created_at, timezone2).unix() < stateTimeUnix) {
|
|
231
|
+
filterList.splice(i, 1);
|
|
232
|
+
}
|
|
233
|
+
if (((_c2 = filterList[i]) == null ? void 0 : _c2.tag) === "point_card" && import_dayjs.default.tz((_d2 = filterList[i]) == null ? void 0 : _d2.created_at, timezone2).unix() < stateTimeUnix) {
|
|
234
|
+
filterList.splice(i, 1);
|
|
235
|
+
}
|
|
232
236
|
}
|
|
237
|
+
setTimeLineData(formatTimeLineDta(filterList));
|
|
238
|
+
} catch (error) {
|
|
239
|
+
console.error("Failed to fetch asset list:", error);
|
|
240
|
+
} finally {
|
|
241
|
+
setIsLoading(false);
|
|
233
242
|
}
|
|
234
|
-
setTimeLineData(formatTimeLineDta(filterList));
|
|
235
243
|
};
|
|
236
244
|
(0, import_react.useEffect)(() => {
|
|
237
245
|
if (code) {
|
|
238
246
|
getTimeTreeList();
|
|
239
247
|
}
|
|
240
248
|
}, [code]);
|
|
241
|
-
const cardProps = {
|
|
242
|
-
className: (0, import_classnames.default)("pisell-wallet-card", props.className),
|
|
243
|
-
style: {
|
|
244
|
-
border: platform === "pc" ? "1px solid #EAECF0" : "none"
|
|
245
|
-
}
|
|
246
|
-
};
|
|
247
249
|
const onAppleClick = () => {
|
|
248
250
|
if (isWechat()) {
|
|
249
251
|
setWechatModalOpen(true);
|
|
@@ -286,7 +288,7 @@ var Detail = (0, import_react.forwardRef)((props, ref) => {
|
|
|
286
288
|
};
|
|
287
289
|
const onCopyClick = () => {
|
|
288
290
|
copyToClipboard(copyUrl);
|
|
289
|
-
(0,
|
|
291
|
+
(0, import_materials2.PisellToast)({
|
|
290
292
|
content: import_utils.locales.getText("page.wallet.copySuccess"),
|
|
291
293
|
duration: 2
|
|
292
294
|
});
|
|
@@ -490,8 +492,8 @@ var Detail = (0, import_react.forwardRef)((props, ref) => {
|
|
|
490
492
|
const assetActionEnum = {
|
|
491
493
|
recharge: tag === "point_card" ? import_utils.locales.getText("page.wallet.pointsEarned") : import_utils.locales.getText("page.wallet.recharge"),
|
|
492
494
|
order_expend: tag === "point_card" ? import_utils.locales.getText("page.wallet.pointsRedeemed") : import_utils.locales.getText("page.wallet.spending"),
|
|
493
|
-
order_refund: "
|
|
494
|
-
expire: "
|
|
495
|
+
order_refund: import_utils.locales.getText("page.wallet.refund"),
|
|
496
|
+
expire: import_utils.locales.getText("page.wallet.expire")
|
|
495
497
|
};
|
|
496
498
|
const handleRecharge = () => {
|
|
497
499
|
if (props.buttonGroupList && props.buttonGroupList[0] && props.buttonGroupList[0][0]) {
|
|
@@ -526,7 +528,7 @@ var Detail = (0, import_react.forwardRef)((props, ref) => {
|
|
|
526
528
|
ref: anchorWrapperRef
|
|
527
529
|
},
|
|
528
530
|
/* @__PURE__ */ import_react.default.createElement("div", { className: "wallet-detail-card-header-anchor" }, /* @__PURE__ */ import_react.default.createElement(
|
|
529
|
-
|
|
531
|
+
import_materials2.PisellAnchor,
|
|
530
532
|
{
|
|
531
533
|
ref: tabsRef,
|
|
532
534
|
options: anchorOptions,
|
|
@@ -555,9 +557,9 @@ var Detail = (0, import_react.forwardRef)((props, ref) => {
|
|
|
555
557
|
"data-section": "detail"
|
|
556
558
|
},
|
|
557
559
|
/* @__PURE__ */ import_react.default.createElement(Text, { className: "wallet-detail-card-content-section-title" }, import_utils.locales.getText("page.wallet.details")),
|
|
558
|
-
platform === "pc" && /* @__PURE__ */ import_react.default.createElement(
|
|
560
|
+
platform === "pc" && /* @__PURE__ */ import_react.default.createElement(import_materials2.ButtonGroupPreview, { buttonGroupList }),
|
|
559
561
|
/* @__PURE__ */ import_react.default.createElement(
|
|
560
|
-
|
|
562
|
+
import_materials2.PisellStatisticList,
|
|
561
563
|
{
|
|
562
564
|
data: listData,
|
|
563
565
|
labelColor: "#667085",
|
|
@@ -577,13 +579,13 @@ var Detail = (0, import_react.forwardRef)((props, ref) => {
|
|
|
577
579
|
className: "wallet-detail-card-content-section wallet-detail-card-content-section-timeline",
|
|
578
580
|
"data-section": "activityLog"
|
|
579
581
|
},
|
|
580
|
-
tag !== "product_discount_card" && /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "wallet-detail-card-content-section-subtitle" }, import_utils.locales.getText("page.wallet.activelog")), TimeLineData.length > 0 ? /* @__PURE__ */ import_react.default.createElement(
|
|
581
|
-
|
|
582
|
+
tag !== "product_discount_card" && /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "wallet-detail-card-content-section-subtitle" }, import_utils.locales.getText("page.wallet.activelog")), isLoading ? /* @__PURE__ */ import_react.default.createElement("div", { className: "wallet-detail-timeline-loading" }, /* @__PURE__ */ import_react.default.createElement(import_materials2.Skeleton, { active: true, paragraph: { rows: 6 }, round: true })) : TimeLineData.length > 0 ? /* @__PURE__ */ import_react.default.createElement(
|
|
583
|
+
import_materials2.Timeline,
|
|
582
584
|
{
|
|
583
585
|
items: TimeLineData,
|
|
584
586
|
className: "wallet-detail-timeline-list"
|
|
585
587
|
}
|
|
586
|
-
) : /* @__PURE__ */ import_react.default.createElement("div", { className: "wallet-detail-card-content-section-empty" }, /* @__PURE__ */ import_react.default.createElement(
|
|
588
|
+
) : /* @__PURE__ */ import_react.default.createElement("div", { className: "wallet-detail-card-content-section-empty" }, /* @__PURE__ */ import_react.default.createElement(import_materials2.PisellEmpty, null)))
|
|
587
589
|
)
|
|
588
590
|
)
|
|
589
591
|
)
|
|
@@ -593,13 +595,13 @@ var Detail = (0, import_react.forwardRef)((props, ref) => {
|
|
|
593
595
|
{
|
|
594
596
|
step: "detail",
|
|
595
597
|
onAppleWalletClick: tag === "gift_card" ? addWalletCard : void 0,
|
|
596
|
-
onRechargeClick: tag === "gift_card" && ((
|
|
598
|
+
onRechargeClick: tag === "gift_card" && ((_j = detail == null ? void 0 : detail.machinecode_config) == null ? void 0 : _j.hide_recharge) === 0 ? handleRecharge : void 0,
|
|
597
599
|
platform,
|
|
598
600
|
isIOS: (0, import_utils.isIos)()
|
|
599
601
|
}
|
|
600
602
|
),
|
|
601
603
|
/* @__PURE__ */ import_react.default.createElement(
|
|
602
|
-
|
|
604
|
+
import_materials2.PisellModal,
|
|
603
605
|
{
|
|
604
606
|
platform: platform === "pc" ? "pc" : "h5",
|
|
605
607
|
mobileModalHeight: "auto",
|
|
@@ -610,7 +612,7 @@ var Detail = (0, import_react.forwardRef)((props, ref) => {
|
|
|
610
612
|
open: isShowtimeLineDetail,
|
|
611
613
|
footer: [
|
|
612
614
|
/* @__PURE__ */ import_react.default.createElement(
|
|
613
|
-
|
|
615
|
+
import_materials2.Button,
|
|
614
616
|
{
|
|
615
617
|
type: "primary",
|
|
616
618
|
block: true,
|
|
@@ -622,7 +624,7 @@ var Detail = (0, import_react.forwardRef)((props, ref) => {
|
|
|
622
624
|
]
|
|
623
625
|
},
|
|
624
626
|
/* @__PURE__ */ import_react.default.createElement(
|
|
625
|
-
|
|
627
|
+
import_materials2.PisellStatisticList,
|
|
626
628
|
{
|
|
627
629
|
data: [
|
|
628
630
|
{
|
|
@@ -651,7 +653,7 @@ var Detail = (0, import_react.forwardRef)((props, ref) => {
|
|
|
651
653
|
)
|
|
652
654
|
),
|
|
653
655
|
/* @__PURE__ */ import_react.default.createElement(
|
|
654
|
-
|
|
656
|
+
import_materials2.PisellModal,
|
|
655
657
|
{
|
|
656
658
|
platform: platform === "pc" ? "pc" : "h5",
|
|
657
659
|
mobileModalHeight: "auto",
|
|
@@ -664,7 +666,7 @@ var Detail = (0, import_react.forwardRef)((props, ref) => {
|
|
|
664
666
|
closeIcon: /* @__PURE__ */ import_react.default.createElement(import_XClose.default, { size: 20, style: { fontSize: "24px" } }),
|
|
665
667
|
open: wechatModalOpen,
|
|
666
668
|
footer: [
|
|
667
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
669
|
+
/* @__PURE__ */ import_react.default.createElement(import_materials2.Button, { onClick: onCopyClick, block: true, type: "primary", size: "large" }, import_utils.locales.getText("page.wallet.copyButton"))
|
|
668
670
|
]
|
|
669
671
|
},
|
|
670
672
|
/* @__PURE__ */ import_react.default.createElement("div", { className: "wallet-detail-copyTitle" }, import_utils.locales.getText("page.wallet.copyTitle")),
|
|
@@ -13,6 +13,8 @@ declare const _default: {
|
|
|
13
13
|
'page.wallet.recharge': string;
|
|
14
14
|
'page.wallet.pointsEarned': string;
|
|
15
15
|
'page.wallet.pointsRedeemed': string;
|
|
16
|
+
'page.wallet.refund': string;
|
|
17
|
+
'page.wallet.expire': string;
|
|
16
18
|
'page.wallet.viewOrder': string;
|
|
17
19
|
'page.wallet.done': string;
|
|
18
20
|
'page.wallet.addIos': string;
|
|
@@ -34,6 +36,8 @@ declare const _default: {
|
|
|
34
36
|
'page.wallet.recharge': string;
|
|
35
37
|
'page.wallet.pointsEarned': string;
|
|
36
38
|
'page.wallet.pointsRedeemed': string;
|
|
39
|
+
'page.wallet.refund': string;
|
|
40
|
+
'page.wallet.expire': string;
|
|
37
41
|
'page.wallet.viewOrder': string;
|
|
38
42
|
'page.wallet.done': string;
|
|
39
43
|
'page.wallet.addIos': string;
|
|
@@ -55,6 +59,8 @@ declare const _default: {
|
|
|
55
59
|
'page.wallet.recharge': string;
|
|
56
60
|
'page.wallet.pointsEarned': string;
|
|
57
61
|
'page.wallet.pointsRedeemed': string;
|
|
62
|
+
'page.wallet.refund': string;
|
|
63
|
+
'page.wallet.expire': string;
|
|
58
64
|
'page.wallet.viewOrder': string;
|
|
59
65
|
'page.wallet.done': string;
|
|
60
66
|
'page.wallet.addIos': string;
|
|
@@ -40,6 +40,8 @@ var locales_default = {
|
|
|
40
40
|
"page.wallet.recharge": "Recharge",
|
|
41
41
|
"page.wallet.pointsEarned": "Points Earned",
|
|
42
42
|
"page.wallet.pointsRedeemed": "Points Redeemed",
|
|
43
|
+
"page.wallet.refund": "Refund",
|
|
44
|
+
"page.wallet.expire": "Expire",
|
|
43
45
|
"page.wallet.viewOrder": "View order",
|
|
44
46
|
"page.wallet.done": "Done",
|
|
45
47
|
"page.wallet.addIos": "Add to Apple Wallet",
|
|
@@ -64,6 +66,8 @@ var locales_default = {
|
|
|
64
66
|
"page.wallet.recharge": "充值",
|
|
65
67
|
"page.wallet.pointsEarned": "获得积分",
|
|
66
68
|
"page.wallet.pointsRedeemed": "使用积分",
|
|
69
|
+
"page.wallet.refund": "退款",
|
|
70
|
+
"page.wallet.expire": "过期",
|
|
67
71
|
"page.wallet.viewOrder": "浏览订单",
|
|
68
72
|
"page.wallet.done": "完成",
|
|
69
73
|
"page.wallet.addIos": "添加到苹果钱包",
|
|
@@ -88,6 +92,8 @@ var locales_default = {
|
|
|
88
92
|
"page.wallet.recharge": "充值",
|
|
89
93
|
"page.wallet.pointsEarned": "獲得積分",
|
|
90
94
|
"page.wallet.pointsRedeemed": "使用積分",
|
|
95
|
+
"page.wallet.refund": "退款",
|
|
96
|
+
"page.wallet.expire": "過期",
|
|
91
97
|
"page.wallet.viewOrder": "瀏覽訂單",
|
|
92
98
|
"page.wallet.done": "完成",
|
|
93
99
|
"page.wallet.addIos": "添加到蘋果錢包",
|
|
@@ -1 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface RechargeState {
|
|
3
|
+
addWalletCard: any;
|
|
4
|
+
}
|
|
5
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
6
|
+
walletDetailState: RechargeState;
|
|
7
|
+
} & {
|
|
8
|
+
dispatch: (params: {
|
|
9
|
+
type: string;
|
|
10
|
+
payload: any;
|
|
11
|
+
}) => void;
|
|
12
|
+
}>;
|
|
13
|
+
export {};
|
|
@@ -51,7 +51,6 @@ var RechargeableCard = (0, import_model.Provider)((props) => {
|
|
|
51
51
|
const context = (0, import_useEngineContext.default)();
|
|
52
52
|
const utils = context.appHelper.utils || {};
|
|
53
53
|
const dvaStore = (_b = (_a = utils == null ? void 0 : utils.getStore) == null ? void 0 : _a.call(utils)) == null ? void 0 : _b.getState();
|
|
54
|
-
const { action, storage } = utils || {};
|
|
55
54
|
const platform = (0, import_react.useMemo)(() => (0, import_utils.isMobile)() ? "h5" : "pc", []);
|
|
56
55
|
const { openDetail, renderDetail, closeDetail } = (0, import_DetailContext.useDetail)();
|
|
57
56
|
const recordViewRef = (0, import_react.useRef)(null);
|
|
@@ -66,7 +65,6 @@ var RechargeableCard = (0, import_model.Provider)((props) => {
|
|
|
66
65
|
type: "setState",
|
|
67
66
|
payload: { setup: globalState.setup }
|
|
68
67
|
});
|
|
69
|
-
console.log("%c [ DiscountCard global setup sync ]-46", "font-size:13px; color:#bf2c9f;", globalState.setup);
|
|
70
68
|
}
|
|
71
69
|
}, [globalState.setup]);
|
|
72
70
|
const handleBack = () => {
|
|
@@ -81,7 +79,6 @@ var RechargeableCard = (0, import_model.Provider)((props) => {
|
|
|
81
79
|
setGlobalState({
|
|
82
80
|
setup: "list"
|
|
83
81
|
});
|
|
84
|
-
console.log("%c [ DiscountCard setup back ]-51", "font-size:13px; color:#bf2c9f;", "list");
|
|
85
82
|
};
|
|
86
83
|
const renderItem = (item) => {
|
|
87
84
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
@@ -148,7 +145,6 @@ var RechargeableCard = (0, import_model.Provider)((props) => {
|
|
|
148
145
|
};
|
|
149
146
|
const detail = () => {
|
|
150
147
|
if (!(currentDetail == null ? void 0 : currentDetail.id)) return null;
|
|
151
|
-
console.log("%c [ DiscountCard detail ]-132", "font-size:13px; color:#bf2c9f;", globalState.setup);
|
|
152
148
|
const detailWithBar = {
|
|
153
149
|
...currentDetail,
|
|
154
150
|
isDiscoundCard: true,
|
|
@@ -177,7 +173,6 @@ var RechargeableCard = (0, import_model.Provider)((props) => {
|
|
|
177
173
|
type: "setState",
|
|
178
174
|
payload: { setup: "detail" }
|
|
179
175
|
});
|
|
180
|
-
console.log("%c [ DiscountCard setup click ]-178", "font-size:13px; color:#bf2c9f;", "detail");
|
|
181
176
|
openDetail({
|
|
182
177
|
...currentDetail2,
|
|
183
178
|
isDiscoundCard: true,
|
|
@@ -1 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface RechargeState {
|
|
3
|
+
total: number;
|
|
4
|
+
setup?: 'menu' | 'list' | 'detail' | string;
|
|
5
|
+
}
|
|
6
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
7
|
+
state: RechargeState;
|
|
8
|
+
} & {
|
|
9
|
+
dispatch: (params: {
|
|
10
|
+
type: string;
|
|
11
|
+
payload: any;
|
|
12
|
+
}) => void;
|
|
13
|
+
}>;
|
|
14
|
+
export {};
|
|
@@ -42,7 +42,6 @@ var import_index = require("./index.less");
|
|
|
42
42
|
var import_DetailContext = require("../DetailContext");
|
|
43
43
|
var import_WalletCard = __toESM(require("../components/WalletCard"));
|
|
44
44
|
var { Title } = import_materials.Typography;
|
|
45
|
-
var Amount = import_materials.PisellText.Amount;
|
|
46
45
|
var RechargeableCard = (0, import_model.Provider)((props) => {
|
|
47
46
|
var _a, _b, _c;
|
|
48
47
|
const { globalState, setGlobalState } = props;
|
|
@@ -134,7 +133,6 @@ var RechargeableCard = (0, import_model.Provider)((props) => {
|
|
|
134
133
|
(_a2 = recordViewRef.current) == null ? void 0 : _a2.closeDetailModal();
|
|
135
134
|
}
|
|
136
135
|
}, [globalState.setup]);
|
|
137
|
-
console.log("%c [ state.total ]-132", "font-size:13px; color:#bf2c9f;", state.total);
|
|
138
136
|
return isEmpty ? /* @__PURE__ */ import_react.default.createElement(import_materials.PisellEmpty, null) : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, platform !== "pc" && /* @__PURE__ */ import_react.default.createElement(Title, { className: "wallet-pointCard-title" }, import_utils.locales.getText("page.wallet.pointCard")), /* @__PURE__ */ import_react.default.createElement(
|
|
139
137
|
import_materials.CardMetricItem,
|
|
140
138
|
{
|
|
@@ -1 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
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 +1,29 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
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 {};
|
|
@@ -38,12 +38,14 @@ var import_model = require("./model");
|
|
|
38
38
|
var import_WalletCard = __toESM(require("../components/WalletCard"));
|
|
39
39
|
var import_useWalletCard = require("../hooks/useWalletCard");
|
|
40
40
|
var import_utils = require("@pisell/utils");
|
|
41
|
+
var import_DetailContext = require("../DetailContext");
|
|
41
42
|
var import_index = require("./index.less");
|
|
42
43
|
var { Title } = import_materials.Typography;
|
|
43
44
|
var Voucher = (0, import_model.Provider)((props) => {
|
|
44
45
|
const { globalState, setGlobalState } = props;
|
|
45
46
|
const { product_voucher = [] } = globalState;
|
|
46
47
|
const recordViewRef = (0, import_react.useRef)(null);
|
|
48
|
+
const { openDetail, renderDetail } = (0, import_DetailContext.useDetail)();
|
|
47
49
|
const {
|
|
48
50
|
platform,
|
|
49
51
|
isEmpty,
|
|
@@ -79,6 +81,14 @@ var Voucher = (0, import_model.Provider)((props) => {
|
|
|
79
81
|
if (isEmpty) {
|
|
80
82
|
return /* @__PURE__ */ import_react.default.createElement(import_materials.PisellEmpty, null);
|
|
81
83
|
}
|
|
84
|
+
const handleBack = (0, import_react.useCallback)(() => {
|
|
85
|
+
if (recordViewRef.current) {
|
|
86
|
+
recordViewRef.current.closeDetailModal();
|
|
87
|
+
}
|
|
88
|
+
setGlobalState({
|
|
89
|
+
setup: "list"
|
|
90
|
+
});
|
|
91
|
+
}, [recordViewRef, setGlobalState]);
|
|
82
92
|
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, platform !== "pc" && /* @__PURE__ */ import_react.default.createElement(Title, { className: "wallet-voucher-title" }, import_utils.locales.getText("page.wallet.voucher")), /* @__PURE__ */ import_react.default.createElement(
|
|
83
93
|
import_materials.CardMetricItem,
|
|
84
94
|
{
|
|
@@ -96,7 +106,22 @@ var Voucher = (0, import_model.Provider)((props) => {
|
|
|
96
106
|
leftSpan: 9,
|
|
97
107
|
rightSpan: 15,
|
|
98
108
|
gutter: 20,
|
|
99
|
-
onRowClick:
|
|
109
|
+
onRowClick: (currentDetail) => {
|
|
110
|
+
setGlobalState({
|
|
111
|
+
currentId: currentDetail.id || "",
|
|
112
|
+
currentDetail,
|
|
113
|
+
setup: "detail"
|
|
114
|
+
// 设置状态为detail
|
|
115
|
+
});
|
|
116
|
+
const detailWithProps = {
|
|
117
|
+
...currentDetail,
|
|
118
|
+
showWalletBar: platform === "h5",
|
|
119
|
+
// 添加显示WalletBar的标志
|
|
120
|
+
onBack: handleBack
|
|
121
|
+
// 添加返回处理函数
|
|
122
|
+
};
|
|
123
|
+
openDetail(detailWithProps);
|
|
124
|
+
},
|
|
100
125
|
modalWrapStyle: {
|
|
101
126
|
overflowY: "auto",
|
|
102
127
|
top: 68,
|
|
@@ -1 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
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 {};
|
|
@@ -60,7 +60,6 @@ var WalletCard = ({
|
|
|
60
60
|
const { title: disabledReason = "" } = unified_messages;
|
|
61
61
|
const { name: storeName = "" } = shop;
|
|
62
62
|
const isActive = id === currentId && platform === "pc";
|
|
63
|
-
console.log("%c [ tag ]-49", "font-size:13px; color:#bf2c9f;", tag);
|
|
64
63
|
const isDisabled = limit_status !== "enable";
|
|
65
64
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
66
65
|
import_materials.PisellWalletPassCard,
|
|
@@ -281,7 +281,6 @@ var Wallet = (0, import_model.Provider)(() => {
|
|
|
281
281
|
]
|
|
282
282
|
};
|
|
283
283
|
const onBack = () => {
|
|
284
|
-
console.log("%c [ setup ]-339", "font-size:13px; color:#bf2c9f;", setup);
|
|
285
284
|
if (setup === "menu") {
|
|
286
285
|
history.back();
|
|
287
286
|
} else {
|
|
@@ -404,7 +403,6 @@ var Wallet = (0, import_model.Provider)(() => {
|
|
|
404
403
|
if (setup === "menu") {
|
|
405
404
|
return null;
|
|
406
405
|
}
|
|
407
|
-
console.log("%c [ setup ]-538", "font-size:13px; background:pink; color:#bf2c9f;", setup);
|
|
408
406
|
if (setup === "list") {
|
|
409
407
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
410
408
|
import_materials.Button,
|
|
@@ -451,6 +449,7 @@ var Wallet = (0, import_model.Provider)(() => {
|
|
|
451
449
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
452
450
|
import_materials.PisellWalletPassCard,
|
|
453
451
|
{
|
|
452
|
+
balanceTitle: global_wallet.currentTag === "point_card" ? import_utils.locales.getText("page.wallet.points") : void 0,
|
|
454
453
|
showDetail: false,
|
|
455
454
|
showRedeem: false,
|
|
456
455
|
showQrCode: false,
|
|
@@ -459,7 +458,7 @@ var Wallet = (0, import_model.Provider)(() => {
|
|
|
459
458
|
showDisabledReason: !isEnabled,
|
|
460
459
|
disabledReason: title,
|
|
461
460
|
propStyle: { marginBottom: 10 },
|
|
462
|
-
showBalanceSymbol:
|
|
461
|
+
showBalanceSymbol: global_wallet.currentTag !== "point_card",
|
|
463
462
|
showBalance: global_wallet.currentTag !== "product_discount_card",
|
|
464
463
|
active: isActive,
|
|
465
464
|
name: product_name,
|
|
@@ -27,7 +27,7 @@ var locales_default = {
|
|
|
27
27
|
// English translations
|
|
28
28
|
"page.wallet.rechargeableCard": "Rechargeable card",
|
|
29
29
|
"page.wallet.voucher": "Voucher",
|
|
30
|
-
"page.wallet.pointCard": "Points
|
|
30
|
+
"page.wallet.pointCard": "Points",
|
|
31
31
|
"page.wallet.discountCard": "Discount card",
|
|
32
32
|
"page.wallet.unavailable": "Unavailable",
|
|
33
33
|
"page.wallet.available": "Available",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { IWalletListItemProps } from './serve';
|
|
2
3
|
export interface WalletCardItemProps {
|
|
3
4
|
id: string;
|
|
@@ -26,4 +27,11 @@ export interface WalletListProps {
|
|
|
26
27
|
currentSearchListItemCode?: string;
|
|
27
28
|
[key: string]: any;
|
|
28
29
|
}
|
|
29
|
-
export declare const Provider: any, Context:
|
|
30
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
31
|
+
global_wallet: WalletListProps;
|
|
32
|
+
} & {
|
|
33
|
+
dispatch: (params: {
|
|
34
|
+
type: string;
|
|
35
|
+
payload: any;
|
|
36
|
+
}) => void;
|
|
37
|
+
}>;
|
|
@@ -312,7 +312,6 @@ var WalletList = (0, import_model.Provider)((props) => {
|
|
|
312
312
|
return {
|
|
313
313
|
key,
|
|
314
314
|
label: key,
|
|
315
|
-
// 不做多语言处理,保持原样
|
|
316
315
|
hidden: false,
|
|
317
316
|
value: balanceKey ? balance[balanceKey] || 0 : 0
|
|
318
317
|
};
|
|
@@ -397,7 +396,7 @@ var WalletList = (0, import_model.Provider)((props) => {
|
|
|
397
396
|
}, []);
|
|
398
397
|
const renderContent = () => {
|
|
399
398
|
if (loading) {
|
|
400
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-wallet-container pisell-wallet-skeleton" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "wallet-content" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "wallet-card-skeleton" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Skeleton, { active: true, paragraph: { rows: 6 } }), /* @__PURE__ */ import_react.default.createElement("div", { className: "wallet-card-code-skeleton" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Skeleton.Button, { active: true, style: { width: "80%", height: 50 } })))), /* @__PURE__ */ import_react.default.createElement("div", { className: "wallet-navigation-skeleton" }, /* @__PURE__ */ import_react.default.createElement(
|
|
399
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-wallet-list-container pisell-wallet-skeleton" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "wallet-content" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "wallet-card-skeleton" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Skeleton, { active: true, paragraph: { rows: 6 } }), /* @__PURE__ */ import_react.default.createElement("div", { className: "wallet-card-code-skeleton" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Skeleton.Button, { active: true, style: { width: "80%", height: 50 } })))), /* @__PURE__ */ import_react.default.createElement("div", { className: "wallet-navigation-skeleton" }, /* @__PURE__ */ import_react.default.createElement(
|
|
401
400
|
import_antd.Skeleton.Button,
|
|
402
401
|
{
|
|
403
402
|
active: true,
|
|
@@ -414,7 +413,7 @@ var WalletList = (0, import_model.Provider)((props) => {
|
|
|
414
413
|
if (list.length === 0) {
|
|
415
414
|
return null;
|
|
416
415
|
}
|
|
417
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-wallet-container" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "wallet-content" }, /* @__PURE__ */ import_react.default.createElement(import_materials.Carousel, { ref: carouselRef, ...carouselProps }, list.map((item) => renderWalletCard(item)))), list && list.length > 1 && isUserLoggedIn && /* @__PURE__ */ import_react.default.createElement("div", { className: "wallet-navigation" }, /* @__PURE__ */ import_react.default.createElement(
|
|
416
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-wallet-list-container" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "wallet-content" }, /* @__PURE__ */ import_react.default.createElement(import_materials.Carousel, { ref: carouselRef, ...carouselProps }, list.map((item) => renderWalletCard(item)))), list && list.length > 1 && isUserLoggedIn && /* @__PURE__ */ import_react.default.createElement("div", { className: "wallet-navigation" }, /* @__PURE__ */ import_react.default.createElement(
|
|
418
417
|
"div",
|
|
419
418
|
{
|
|
420
419
|
className: `wallet-nav-button wallet-prev ${currentIndex === 0 ? "disabled" : ""}`,
|