@pisell/private-materials 3.3.64 → 3.3.65
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 +7 -7
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +6 -6
- package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
- package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Cart/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Content/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Footer/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Voucher/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Voucher/index.less +2 -0
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +1 -0
- package/es/components/appointmentBooking/deposit/index.d.ts +1 -0
- package/es/components/appointmentBooking/index.d.ts +1 -0
- package/es/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -0
- package/es/components/booking/components/footer/index.js +15 -30
- package/es/components/booking/components/voucher/index.d.ts +1 -0
- package/es/components/booking/components/voucher/index.less +1 -0
- package/es/components/booking/forms/footer.d.ts +1 -0
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
- package/es/components/booking/hooks/useClearCart.d.ts +1 -0
- package/es/components/booking/info/dateRange/index.d.ts +1 -0
- package/es/components/booking/info/service/addService/index.d.ts +1 -0
- package/es/components/booking/info/service/addTimeModal/index.d.ts +1 -0
- package/es/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
- package/es/components/booking/info/service/serviceItem/index.d.ts +1 -0
- package/es/components/booking/info/service2/utils.d.ts +1 -1
- package/es/components/booking/info2/service/editService/index.js +9 -13
- package/es/components/booking/info2/service/serviceItem/index.d.ts +1 -0
- package/es/components/booking/info2/utilsByBooking.js +10 -17
- package/es/components/booking/utils.js +4 -10
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/component/fail/failCustom.d.ts +1 -0
- package/es/components/eftposPay/component/fail/index.d.ts +1 -0
- package/es/components/eftposPay/component/fail/unknow.d.ts +1 -0
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/index.d.ts +1 -0
- package/es/components/eftposPay/pay.d.ts +1 -0
- package/es/components/eftposPay/store/index.d.ts +2 -2
- package/es/components/eftposPay/windcave/windcave.d.ts +1 -0
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.less +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.less +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
- package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
- package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/timeResourceSelector/index.less +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/index.js +4 -5
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/index.d.ts +1 -0
- package/es/components/productSelect/components/TabProduct/index.d.ts +1 -0
- package/es/components/productSelect/components/productGroup/index.d.ts +1 -0
- package/es/components/ruleSetting/index.d.ts +1 -0
- package/es/components/schedules/calendar/index.less +152 -158
- package/es/components/shoppingCart/components/Cart/Product.d.ts +1 -0
- package/es/components/shoppingCart/components/Cart/index.d.ts +1 -0
- package/es/components/shoppingCart/hooks/useAddService.d.ts +1 -0
- package/es/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +10 -12
- package/es/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
- package/es/components/ticketBooking/components/ticketBooking/index.js +9 -135
- package/es/components/ticketBooking/components/timeBar/index.d.ts +1 -0
- package/es/components/ticketBooking/locales.d.ts +146 -164
- package/es/components/ticketBooking/locales.js +147 -195
- package/es/components/ticketBooking/serve.d.ts +0 -5
- package/es/components/ticketBooking/serve.js +0 -27
- package/es/components/wallet/DiscountCard/index.less +1 -0
- package/es/components/wallet/PointCard/index.less +1 -0
- package/es/components/wallet/RechargeableCard/index.less +9 -5
- package/es/components/wallet/Voucher/index.less +1 -0
- package/es/components/wallet/index.less +4 -0
- package/es/components/walletList/index.js +7 -55
- package/es/components/walletList/index.less +15 -17
- package/es/components/walletList/serve.d.ts +0 -8
- package/es/components/walletList/serve.js +0 -38
- package/es/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Cart/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Content/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Footer/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Voucher/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Voucher/index.less +2 -0
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +1 -0
- package/lib/components/appointmentBooking/deposit/index.d.ts +1 -0
- package/lib/components/appointmentBooking/index.d.ts +1 -0
- package/lib/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -0
- package/lib/components/booking/components/footer/index.js +2 -14
- package/lib/components/booking/components/voucher/index.d.ts +1 -0
- package/lib/components/booking/components/voucher/index.less +1 -0
- package/lib/components/booking/forms/footer.d.ts +1 -0
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
- package/lib/components/booking/hooks/useClearCart.d.ts +1 -0
- package/lib/components/booking/info/dateRange/index.d.ts +1 -0
- package/lib/components/booking/info/service/addService/index.d.ts +1 -0
- package/lib/components/booking/info/service/addTimeModal/index.d.ts +1 -0
- package/lib/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
- package/lib/components/booking/info/service/serviceItem/index.d.ts +1 -0
- package/lib/components/booking/info/service2/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/editService/index.js +3 -7
- package/lib/components/booking/info2/service/serviceItem/index.d.ts +1 -0
- package/lib/components/booking/info2/utilsByBooking.js +9 -7
- package/lib/components/booking/utils.js +3 -7
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/index.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/unknow.d.ts +1 -0
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/index.d.ts +1 -0
- package/lib/components/eftposPay/pay.d.ts +1 -0
- package/lib/components/eftposPay/store/index.d.ts +2 -2
- package/lib/components/eftposPay/windcave/windcave.d.ts +1 -0
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.less +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.less +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
- package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
- package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/timeResourceSelector/index.less +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/index.js +9 -10
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/index.d.ts +1 -0
- package/lib/components/productSelect/components/TabProduct/index.d.ts +1 -0
- package/lib/components/productSelect/components/productGroup/index.d.ts +1 -0
- package/lib/components/ruleSetting/index.d.ts +1 -0
- package/lib/components/schedules/calendar/index.less +152 -158
- package/lib/components/shoppingCart/components/Cart/Product.d.ts +1 -0
- package/lib/components/shoppingCart/components/Cart/index.d.ts +1 -0
- package/lib/components/shoppingCart/hooks/useAddService.d.ts +1 -0
- package/lib/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +3 -5
- package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
- package/lib/components/ticketBooking/components/ticketBooking/index.js +8 -134
- package/lib/components/ticketBooking/components/timeBar/index.d.ts +1 -0
- package/lib/components/ticketBooking/locales.d.ts +146 -164
- package/lib/components/ticketBooking/locales.js +4 -22
- package/lib/components/ticketBooking/serve.d.ts +0 -5
- package/lib/components/ticketBooking/serve.js +2 -8
- package/lib/components/wallet/DiscountCard/index.less +1 -0
- package/lib/components/wallet/PointCard/index.less +1 -0
- package/lib/components/wallet/RechargeableCard/index.less +9 -5
- package/lib/components/wallet/Voucher/index.less +1 -0
- package/lib/components/wallet/index.less +4 -0
- package/lib/components/walletList/index.js +14 -42
- package/lib/components/walletList/index.less +15 -17
- package/lib/components/walletList/serve.d.ts +0 -8
- package/lib/components/walletList/serve.js +2 -15
- package/lib/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
- package/package.json +3 -3
- package/es/components/ticketBooking/utils/formatProductMessage.d.ts +0 -2
- package/es/components/ticketBooking/utils/formatProductMessage.js +0 -53
- package/es/components/ticketBooking/utils/formatTime.d.ts +0 -31
- package/es/components/ticketBooking/utils/formatTime.js +0 -144
- package/es/components/walletList/locales.d.ts +0 -18
- package/es/components/walletList/locales.js +0 -17
- package/es/components/walletList/status.d.ts +0 -38
- package/es/components/walletList/status.js +0 -47
- package/lib/components/ticketBooking/utils/formatProductMessage.d.ts +0 -2
- package/lib/components/ticketBooking/utils/formatProductMessage.js +0 -76
- package/lib/components/ticketBooking/utils/formatTime.d.ts +0 -31
- package/lib/components/ticketBooking/utils/formatTime.js +0 -139
- package/lib/components/walletList/locales.d.ts +0 -18
- package/lib/components/walletList/locales.js +0 -41
- package/lib/components/walletList/status.d.ts +0 -38
- package/lib/components/walletList/status.js +0 -66
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
color: var(--Gray-900, #101828);
|
|
21
21
|
|
|
22
22
|
/* Paragraph/Semi Bold */
|
|
23
|
+
font-family: Inter;
|
|
23
24
|
font-size: 14px;
|
|
24
25
|
font-style: normal;
|
|
25
26
|
font-weight: 600;
|
|
@@ -35,6 +36,7 @@
|
|
|
35
36
|
text-overflow: ellipsis;
|
|
36
37
|
|
|
37
38
|
/* Small/Regular */
|
|
39
|
+
font-family: Inter;
|
|
38
40
|
font-size: 12px;
|
|
39
41
|
font-style: normal;
|
|
40
42
|
font-weight: 400;
|
|
@@ -53,6 +55,7 @@
|
|
|
53
55
|
text-overflow: ellipsis;
|
|
54
56
|
|
|
55
57
|
/* Text md/Semibold */
|
|
58
|
+
font-family: Inter;
|
|
56
59
|
font-size: 16px;
|
|
57
60
|
font-style: normal;
|
|
58
61
|
font-weight: 600;
|
|
@@ -63,8 +66,8 @@
|
|
|
63
66
|
}
|
|
64
67
|
|
|
65
68
|
.pisell-card-selected {
|
|
66
|
-
border: 1px solid var(--theme-color, #
|
|
67
|
-
background: var(--Primary-50, #
|
|
69
|
+
border: 1px solid var(--theme-color, #7F56D9);
|
|
70
|
+
background: var(--Primary-50, #F9F5FF);
|
|
68
71
|
}
|
|
69
72
|
|
|
70
73
|
.pisell-card-item:last-child {
|
|
@@ -75,6 +78,7 @@
|
|
|
75
78
|
// 充值卡标题
|
|
76
79
|
&-title {
|
|
77
80
|
color: var(--Gray-900, #101828);
|
|
81
|
+
font-family: Inter;
|
|
78
82
|
font-size: 20px;
|
|
79
83
|
font-style: normal;
|
|
80
84
|
font-weight: 600;
|
|
@@ -100,9 +104,9 @@
|
|
|
100
104
|
margin-bottom: 16px;
|
|
101
105
|
cursor: pointer;
|
|
102
106
|
}
|
|
103
|
-
|
|
107
|
+
|
|
104
108
|
.pisell-card-selected {
|
|
105
|
-
border: 1px solid var(--theme-color, #
|
|
106
|
-
background: var(--Primary-50, #
|
|
109
|
+
border: 1px solid var(--theme-color, #7F56D9);
|
|
110
|
+
background: var(--Primary-50, #F9F5FF);
|
|
107
111
|
}
|
|
108
112
|
}
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
color: var(--Gray-900, #101828);
|
|
19
19
|
|
|
20
20
|
/* Display sm/Semibold */
|
|
21
|
+
font-family: Inter;
|
|
21
22
|
font-size: 30px;
|
|
22
23
|
font-style: normal;
|
|
23
24
|
font-weight: 600;
|
|
@@ -52,6 +53,7 @@
|
|
|
52
53
|
text-align: center;
|
|
53
54
|
|
|
54
55
|
/* Text sm/Semibold */
|
|
56
|
+
font-family: Inter;
|
|
55
57
|
font-size: 14px;
|
|
56
58
|
font-style: normal;
|
|
57
59
|
font-weight: 600;
|
|
@@ -87,6 +89,7 @@
|
|
|
87
89
|
}
|
|
88
90
|
.pisell-lowcode-wallet-title {
|
|
89
91
|
color: var(--Gray-900, #101828);
|
|
92
|
+
font-family: Inter;
|
|
90
93
|
font-size: 30px;
|
|
91
94
|
font-style: normal;
|
|
92
95
|
font-weight: 600;
|
|
@@ -114,6 +117,7 @@
|
|
|
114
117
|
color: var(--Gray-900, #101828);
|
|
115
118
|
|
|
116
119
|
/* Text md/Medium */
|
|
120
|
+
font-family: Inter;
|
|
117
121
|
font-size: 16px;
|
|
118
122
|
font-style: normal;
|
|
119
123
|
font-weight: 500;
|
|
@@ -40,8 +40,6 @@ var import_useEngineContext = __toESM(require("./../../hooks/useEngineContext"))
|
|
|
40
40
|
var import_serve = require("./serve");
|
|
41
41
|
var import_utils = require("@pisell/utils");
|
|
42
42
|
var import_utils2 = require("./../../utils");
|
|
43
|
-
var import_status = require("./status");
|
|
44
|
-
var import_locales = __toESM(require("./locales"));
|
|
45
43
|
var import_index = require("./index.less");
|
|
46
44
|
var import_classnames = __toESM(require("classnames"));
|
|
47
45
|
var import_types = require("./types");
|
|
@@ -100,7 +98,7 @@ var DEFAULT_WALLET_CARD = {
|
|
|
100
98
|
original: "Level",
|
|
101
99
|
"zh-CN": "Level",
|
|
102
100
|
"zh-HK": "Level",
|
|
103
|
-
en: "Level"
|
|
101
|
+
"en": "Level"
|
|
104
102
|
},
|
|
105
103
|
metadata: {
|
|
106
104
|
barcodetype: "barCode",
|
|
@@ -123,7 +121,7 @@ var WalletList = (0, import_model.Provider)((props) => {
|
|
|
123
121
|
const context = (0, import_useEngineContext.default)();
|
|
124
122
|
const { constants, utils } = context.appHelper || {};
|
|
125
123
|
const dvaStore = (_b = (_a = utils == null ? void 0 : utils.getStore) == null ? void 0 : _a.call(utils)) == null ? void 0 : _b.getState();
|
|
126
|
-
import_utils.locales.init(
|
|
124
|
+
import_utils.locales.init({}, ((_c = dvaStore == null ? void 0 : dvaStore.core) == null ? void 0 : _c.translateLocale) || "en");
|
|
127
125
|
const isMountedRef = (0, import_react.useRef)(true);
|
|
128
126
|
const carouselRef = (0, import_react.useRef)(null);
|
|
129
127
|
const { store } = utils;
|
|
@@ -131,32 +129,23 @@ var WalletList = (0, import_model.Provider)((props) => {
|
|
|
131
129
|
const prevButtonRef = (0, import_react.useRef)(null);
|
|
132
130
|
const nextButtonRef = (0, import_react.useRef)(null);
|
|
133
131
|
const [currentIndex, setCurrentIndex] = (0, import_react.useState)(0);
|
|
134
|
-
const [walletShopList, setWalletShopList] = (0, import_react.useState)([]);
|
|
135
132
|
const requestIdRef = (0, import_react.useRef)("");
|
|
136
|
-
const pubsub = utils == null ? void 0 : utils.pubsub;
|
|
137
133
|
const isUserLoggedIn = (0, import_react.useMemo)(() => {
|
|
138
134
|
var _a2, _b2;
|
|
139
135
|
return !!((_b2 = (_a2 = utils == null ? void 0 : utils.token) == null ? void 0 : _a2.get) == null ? void 0 : _b2.call(_a2)) || false;
|
|
140
136
|
}, [store]);
|
|
141
|
-
const {
|
|
137
|
+
const {
|
|
138
|
+
list = [],
|
|
139
|
+
error,
|
|
140
|
+
authError,
|
|
141
|
+
hasAttempted,
|
|
142
|
+
isLoggedIn
|
|
143
|
+
} = state;
|
|
142
144
|
(0, import_react.useEffect)(() => {
|
|
143
145
|
if (utils == null ? void 0 : utils.request) {
|
|
144
146
|
import_utils2.request.setRequest(utils.request);
|
|
145
147
|
}
|
|
146
148
|
}, [utils == null ? void 0 : utils.request]);
|
|
147
|
-
(0, import_react.useEffect)(() => {
|
|
148
|
-
if (isUserLoggedIn) {
|
|
149
|
-
(0, import_serve.getWalletShopList)({ skip: 1, num: 50 }).then((res) => {
|
|
150
|
-
pubsub.publish("wallet:shopList", res);
|
|
151
|
-
});
|
|
152
|
-
const subscription = pubsub.subscribe("wallet:shopList", (res) => {
|
|
153
|
-
setWalletShopList((res == null ? void 0 : res.list) || []);
|
|
154
|
-
});
|
|
155
|
-
return () => {
|
|
156
|
-
subscription.unsubscribe();
|
|
157
|
-
};
|
|
158
|
-
}
|
|
159
|
-
}, [isUserLoggedIn]);
|
|
160
149
|
(0, import_react.useEffect)(() => {
|
|
161
150
|
return () => {
|
|
162
151
|
isMountedRef.current = false;
|
|
@@ -296,7 +285,7 @@ var WalletList = (0, import_model.Provider)((props) => {
|
|
|
296
285
|
(0, import_serve.getWalletBalance)()
|
|
297
286
|
]);
|
|
298
287
|
if (!isMountedRef.current || requestIdRef.current !== requestId) return;
|
|
299
|
-
if (walletListData) {
|
|
288
|
+
if (walletListData && walletListData.length > 0) {
|
|
300
289
|
try {
|
|
301
290
|
saveToLocalStorage(STORAGE_KEY, walletListData);
|
|
302
291
|
} catch (e) {
|
|
@@ -312,8 +301,7 @@ var WalletList = (0, import_model.Provider)((props) => {
|
|
|
312
301
|
}
|
|
313
302
|
if (!walletBalanceData || Array.isArray(walletListData) && walletListData.length === 0) {
|
|
314
303
|
setTimeout(async () => {
|
|
315
|
-
if (!isMountedRef.current || requestIdRef.current !== requestId)
|
|
316
|
-
return;
|
|
304
|
+
if (!isMountedRef.current || requestIdRef.current !== requestId) return;
|
|
317
305
|
try {
|
|
318
306
|
let retryBalanceData = walletBalanceData;
|
|
319
307
|
let retryListData = walletListData;
|
|
@@ -323,10 +311,7 @@ var WalletList = (0, import_model.Provider)((props) => {
|
|
|
323
311
|
try {
|
|
324
312
|
saveToLocalStorage(STORAGE_KEY_BALANCE, retryBalanceData);
|
|
325
313
|
} catch (e) {
|
|
326
|
-
console.error(
|
|
327
|
-
"Error saving retry balance to localStorage:",
|
|
328
|
-
e
|
|
329
|
-
);
|
|
314
|
+
console.error("Error saving retry balance to localStorage:", e);
|
|
330
315
|
}
|
|
331
316
|
}
|
|
332
317
|
}
|
|
@@ -484,24 +469,11 @@ var WalletList = (0, import_model.Provider)((props) => {
|
|
|
484
469
|
const renderBalanceCard = (0, import_react.useCallback)((balance) => {
|
|
485
470
|
return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-balance-card", key: balance.id }, /* @__PURE__ */ import_react.default.createElement("div", { className: "balance-card-header" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "balance-card-title" }, balance.name), /* @__PURE__ */ import_react.default.createElement("div", { className: "balance-card-value" }, balance.value)), /* @__PURE__ */ import_react.default.createElement("div", { className: "balance-card-content" }, balance.items && balance.items.map((item) => /* @__PURE__ */ import_react.default.createElement("div", { className: "balance-item", key: item.key }, /* @__PURE__ */ import_react.default.createElement("div", { className: "balance-item-label" }, item.label), /* @__PURE__ */ import_react.default.createElement("div", { className: "balance-item-value" }, item.value)))));
|
|
486
471
|
}, []);
|
|
487
|
-
const isShowGuide = (0, import_react.useMemo)(() => {
|
|
488
|
-
var _a2;
|
|
489
|
-
if (((_a2 = globalState == null ? void 0 : globalState.walletGuideConfig) == null ? void 0 : _a2.show) === 0) return false;
|
|
490
|
-
return (walletShopList == null ? void 0 : walletShopList.length) > 0 && !(list == null ? void 0 : list.length);
|
|
491
|
-
}, [walletShopList, list, globalState == null ? void 0 : globalState.walletGuideConfig]);
|
|
492
472
|
const renderContent = () => {
|
|
493
|
-
if (list.length === 0
|
|
473
|
+
if (list.length === 0) {
|
|
494
474
|
return null;
|
|
495
475
|
}
|
|
496
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-wallet-list-container" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "wallet-content" },
|
|
497
|
-
import_materials.WalletCard,
|
|
498
|
-
{
|
|
499
|
-
key: (0, import_utils.getUniqueId)(),
|
|
500
|
-
isGuide: true,
|
|
501
|
-
...globalState,
|
|
502
|
-
walletGuideConfig: (globalState == null ? void 0 : globalState.walletGuideConfig) || (0, import_status.defaultWalletGuideConfig)()
|
|
503
|
-
}
|
|
504
|
-
) : /* @__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(
|
|
476
|
+
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(
|
|
505
477
|
"div",
|
|
506
478
|
{
|
|
507
479
|
className: `wallet-nav-button wallet-prev ${currentIndex === 0 ? "disabled" : ""}`,
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
opacity: 1;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
>
|
|
34
|
+
>div {
|
|
35
35
|
height: 100%;
|
|
36
36
|
margin: 0;
|
|
37
37
|
padding: 0;
|
|
@@ -215,7 +215,7 @@
|
|
|
215
215
|
cursor: pointer;
|
|
216
216
|
width: 44px;
|
|
217
217
|
height: 44px;
|
|
218
|
-
background-color: #
|
|
218
|
+
background-color: #FFFFFF;
|
|
219
219
|
border-radius: 50%;
|
|
220
220
|
display: flex;
|
|
221
221
|
padding: 10px;
|
|
@@ -224,10 +224,9 @@
|
|
|
224
224
|
justify-content: center;
|
|
225
225
|
cursor: pointer;
|
|
226
226
|
border-radius: 22px;
|
|
227
|
-
background: rgba(255, 255, 255, 0.
|
|
227
|
+
background: rgba(255, 255, 255, 0.90);
|
|
228
228
|
backdrop-filter: blur(4px);
|
|
229
|
-
box-shadow: 0px 2px 4px rgba(16, 24, 40, 0.1),
|
|
230
|
-
0px 1px 3px rgba(16, 24, 40, 0.1);
|
|
229
|
+
box-shadow: 0px 2px 4px rgba(16, 24, 40, 0.1), 0px 1px 3px rgba(16, 24, 40, 0.1);
|
|
231
230
|
z-index: 10;
|
|
232
231
|
position: relative;
|
|
233
232
|
/* 确保相对定位 */
|
|
@@ -245,9 +244,8 @@
|
|
|
245
244
|
}
|
|
246
245
|
|
|
247
246
|
&:hover {
|
|
248
|
-
background-color: #
|
|
249
|
-
box-shadow: 0px 3px 6px rgba(16, 24, 40, 0.15),
|
|
250
|
-
0px 2px 4px rgba(16, 24, 40, 0.1);
|
|
247
|
+
background-color: #FFFFFF;
|
|
248
|
+
box-shadow: 0px 3px 6px rgba(16, 24, 40, 0.15), 0px 2px 4px rgba(16, 24, 40, 0.1);
|
|
251
249
|
}
|
|
252
250
|
|
|
253
251
|
&.disabled {
|
|
@@ -255,8 +253,7 @@
|
|
|
255
253
|
opacity: 0.7;
|
|
256
254
|
|
|
257
255
|
&:hover {
|
|
258
|
-
box-shadow: 0px 2px 4px rgba(16, 24, 40, 0.1),
|
|
259
|
-
0px 1px 3px rgba(16, 24, 40, 0.1);
|
|
256
|
+
box-shadow: 0px 2px 4px rgba(16, 24, 40, 0.1), 0px 1px 3px rgba(16, 24, 40, 0.1);
|
|
260
257
|
}
|
|
261
258
|
}
|
|
262
259
|
|
|
@@ -272,18 +269,17 @@
|
|
|
272
269
|
justify-content: center;
|
|
273
270
|
padding: 12px;
|
|
274
271
|
border-radius: 17px;
|
|
275
|
-
background: rgba(255, 255, 255, 0.
|
|
272
|
+
background: rgba(255, 255, 255, 0.90);
|
|
276
273
|
backdrop-filter: blur(4px);
|
|
277
274
|
height: 34px;
|
|
278
275
|
z-index: 100;
|
|
279
|
-
box-shadow: 0px 2px 4px rgba(16, 24, 40, 0.1),
|
|
280
|
-
0px 1px 3px rgba(16, 24, 40, 0.1);
|
|
276
|
+
box-shadow: 0px 2px 4px rgba(16, 24, 40, 0.1), 0px 1px 3px rgba(16, 24, 40, 0.1);
|
|
281
277
|
|
|
282
278
|
.wallet-dot {
|
|
283
279
|
width: 10px;
|
|
284
280
|
height: 10px;
|
|
285
281
|
border-radius: 50%;
|
|
286
|
-
background-color: #
|
|
282
|
+
background-color: #F2F4F7;
|
|
287
283
|
margin: 0 8px;
|
|
288
284
|
transition: all 0.3s ease;
|
|
289
285
|
|
|
@@ -291,7 +287,7 @@
|
|
|
291
287
|
width: 8px;
|
|
292
288
|
height: 8px;
|
|
293
289
|
border-radius: 4px;
|
|
294
|
-
background-color: #
|
|
290
|
+
background-color: #6941C6;
|
|
295
291
|
}
|
|
296
292
|
}
|
|
297
293
|
}
|
|
@@ -301,13 +297,14 @@
|
|
|
301
297
|
display: flex;
|
|
302
298
|
align-items: center;
|
|
303
299
|
justify-content: center;
|
|
304
|
-
color: #
|
|
300
|
+
color: #FFFFFF;
|
|
305
301
|
min-width: 70px;
|
|
306
302
|
text-align: center;
|
|
307
303
|
|
|
308
304
|
color: var(--Gray-500, #667085);
|
|
309
305
|
|
|
310
306
|
/* Text xl/Semibold */
|
|
307
|
+
font-family: Inter;
|
|
311
308
|
font-size: 20px;
|
|
312
309
|
font-style: normal;
|
|
313
310
|
font-weight: 600;
|
|
@@ -348,6 +345,7 @@
|
|
|
348
345
|
}
|
|
349
346
|
}
|
|
350
347
|
|
|
348
|
+
|
|
351
349
|
.pisell-lowcode__error {
|
|
352
350
|
text-align: center;
|
|
353
351
|
padding: 20px;
|
|
@@ -366,4 +364,4 @@
|
|
|
366
364
|
.pisell-wallet-skeleton {
|
|
367
365
|
padding: 16px;
|
|
368
366
|
}
|
|
369
|
-
}
|
|
367
|
+
}
|
|
@@ -10,11 +10,3 @@ export declare const getWalletList: () => Promise<WalletPass[]>;
|
|
|
10
10
|
* @returns
|
|
11
11
|
*/
|
|
12
12
|
export declare const getWalletBalance: () => Promise<WalletBalance | null>;
|
|
13
|
-
/**
|
|
14
|
-
* @title: 获取钱包店铺列表
|
|
15
|
-
* @description:
|
|
16
|
-
* @return {*}
|
|
17
|
-
* @Author: WangHan
|
|
18
|
-
* @Date: 2025-06-09 11:12
|
|
19
|
-
*/
|
|
20
|
-
export declare const getWalletShopList: (params: any) => Promise<any>;
|
|
@@ -20,8 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
var serve_exports = {};
|
|
21
21
|
__export(serve_exports, {
|
|
22
22
|
getWalletBalance: () => getWalletBalance,
|
|
23
|
-
getWalletList: () => getWalletList
|
|
24
|
-
getWalletShopList: () => getWalletShopList
|
|
23
|
+
getWalletList: () => getWalletList
|
|
25
24
|
});
|
|
26
25
|
module.exports = __toCommonJS(serve_exports);
|
|
27
26
|
var import_utils = require("./../../utils");
|
|
@@ -41,20 +40,8 @@ var getWalletBalance = async () => {
|
|
|
41
40
|
return null;
|
|
42
41
|
}
|
|
43
42
|
};
|
|
44
|
-
var getWalletShopList = async (params) => {
|
|
45
|
-
try {
|
|
46
|
-
const { data } = await import_utils.request.getRequest().get("/h5/wallet/shop/list", params || {}, {
|
|
47
|
-
abort: true,
|
|
48
|
-
useCache: true
|
|
49
|
-
});
|
|
50
|
-
return data || null;
|
|
51
|
-
} catch (error) {
|
|
52
|
-
return null;
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
43
|
// Annotate the CommonJS export names for ESM import in node:
|
|
56
44
|
0 && (module.exports = {
|
|
57
45
|
getWalletBalance,
|
|
58
|
-
getWalletList
|
|
59
|
-
getWalletShopList
|
|
46
|
+
getWalletList
|
|
60
47
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/private-materials",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.65",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -59,9 +59,9 @@
|
|
|
59
59
|
"react-infinite-scroll-component": "^6.1.0",
|
|
60
60
|
"rc-virtual-list": "^3.11.3",
|
|
61
61
|
"decimal.js": "^10.4.3",
|
|
62
|
-
"@pisell/icon": "0.0.11",
|
|
63
62
|
"@pisell/utils": "1.0.42",
|
|
64
|
-
"@pisell/materials": "3.3.
|
|
63
|
+
"@pisell/materials": "3.3.24",
|
|
64
|
+
"@pisell/icon": "0.0.11",
|
|
65
65
|
"@pisell/date-picker": "3.0.2"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { formatAmount } from '@pisell/utils';
|
|
2
|
-
import { getServiceTime } from "./formatTime";
|
|
3
|
-
var formatProductMessage = function formatProductMessage(product, utils) {
|
|
4
|
-
var product_option_string = product.product_option_string,
|
|
5
|
-
options = product.options,
|
|
6
|
-
bundle = product.bundle,
|
|
7
|
-
currency_symbol = product.currency_symbol,
|
|
8
|
-
start_date = product.start_date,
|
|
9
|
-
end_date = product.end_date,
|
|
10
|
-
holder_id = product.holder_id,
|
|
11
|
-
holders = product.holders,
|
|
12
|
-
multiResources = product.multiResources;
|
|
13
|
-
var str = '';
|
|
14
|
-
if (start_date && end_date) {
|
|
15
|
-
str += "".concat(getServiceTime(product, start_date, utils), " \n");
|
|
16
|
-
}
|
|
17
|
-
if (holder_id && Array.isArray(holders)) {
|
|
18
|
-
var targetHolder = holders.find(function (holder) {
|
|
19
|
-
return holder.id === holder_id;
|
|
20
|
-
});
|
|
21
|
-
if (targetHolder !== null && targetHolder !== void 0 && targetHolder.label) {
|
|
22
|
-
str += "".concat(targetHolder.label, " \n");
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
if (Array.isArray(multiResources) && multiResources.length > 0) {
|
|
26
|
-
multiResources.forEach(function (resource) {
|
|
27
|
-
var id = resource.id,
|
|
28
|
-
list = resource.list;
|
|
29
|
-
var targetRes = list.find(function (l) {
|
|
30
|
-
return l.id === id;
|
|
31
|
-
});
|
|
32
|
-
if (targetRes !== null && targetRes !== void 0 && targetRes.label) str += "".concat(targetRes === null || targetRes === void 0 ? void 0 : targetRes.label, " \n");
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
// 组合规格 单规格
|
|
37
|
-
if (product_option_string) str += "".concat(product_option_string, "\n");
|
|
38
|
-
if (Array.isArray(options) && options.length) {
|
|
39
|
-
options.forEach(function (opt) {
|
|
40
|
-
str += "".concat(opt.name, " ").concat(formatAmount(opt === null || opt === void 0 ? void 0 : opt.price, 2, currency_symbol), " x ").concat(opt.num, "\n");
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
// 套餐
|
|
45
|
-
if (Array.isArray(bundle) && bundle.length) {
|
|
46
|
-
bundle.forEach(function (item) {
|
|
47
|
-
str += "".concat(item.title, " \n");
|
|
48
|
-
str += "".concat(formatAmount(item.price, 2, currency_symbol), " x ").concat(item.num);
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
return str;
|
|
52
|
-
};
|
|
53
|
-
export default formatProductMessage;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import 'dayjs/locale/zh-cn';
|
|
2
|
-
import 'dayjs/locale/en';
|
|
3
|
-
import 'dayjs/locale/zh-tw';
|
|
4
|
-
/**
|
|
5
|
-
* @title: 是否英文
|
|
6
|
-
* @description:
|
|
7
|
-
* @param {any} item
|
|
8
|
-
* @return {*}
|
|
9
|
-
* @Author: WangHan
|
|
10
|
-
* @Date: 2024-12-28 22:49
|
|
11
|
-
*/
|
|
12
|
-
export declare const isEn: (item: any) => boolean;
|
|
13
|
-
/**
|
|
14
|
-
* @title: 跨日预约时间
|
|
15
|
-
* @description:
|
|
16
|
-
* @param {any} item
|
|
17
|
-
* @return {*}
|
|
18
|
-
* @Author: WangHan
|
|
19
|
-
* @Date: 2024-12-28 22:50
|
|
20
|
-
*/
|
|
21
|
-
export declare const formatMultiDayDate: (item: any) => string;
|
|
22
|
-
/**
|
|
23
|
-
* @title: 格式化服务的 开始时间-结束时间-时长, 用于展示
|
|
24
|
-
* @description:
|
|
25
|
-
* @param {any} item
|
|
26
|
-
* @param {any} currentDate
|
|
27
|
-
* @return {*}
|
|
28
|
-
* @Author: zhiwei.Wang
|
|
29
|
-
* @Date: 2024-04-26 14:04
|
|
30
|
-
*/
|
|
31
|
-
export declare const getServiceTime: (item: any, currentDate: any, utils: any) => string;
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
import dayjs from 'dayjs';
|
|
2
|
-
import { locales } from '@pisell/utils';
|
|
3
|
-
import 'dayjs/locale/zh-cn';
|
|
4
|
-
import 'dayjs/locale/en';
|
|
5
|
-
import 'dayjs/locale/zh-tw';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @title: 是否英文
|
|
9
|
-
* @description:
|
|
10
|
-
* @param {any} item
|
|
11
|
-
* @return {*}
|
|
12
|
-
* @Author: WangHan
|
|
13
|
-
* @Date: 2024-12-28 22:49
|
|
14
|
-
*/
|
|
15
|
-
export var isEn = function isEn(item) {
|
|
16
|
-
var locale = (item === null || item === void 0 ? void 0 : item.locale) || 'en-US';
|
|
17
|
-
var _isEn = locale === 'en-US' || locale === 'en';
|
|
18
|
-
var localeTypes = {
|
|
19
|
-
'en-US': 'en',
|
|
20
|
-
'zh-CN': 'zh-cn',
|
|
21
|
-
'zh-HK': 'zh-tw'
|
|
22
|
-
};
|
|
23
|
-
dayjs.locale(localeTypes[locale]);
|
|
24
|
-
return _isEn;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* @title: 跨日预约时间
|
|
29
|
-
* @description:
|
|
30
|
-
* @param {any} item
|
|
31
|
-
* @return {*}
|
|
32
|
-
* @Author: WangHan
|
|
33
|
-
* @Date: 2024-12-28 22:50
|
|
34
|
-
*/
|
|
35
|
-
export var formatMultiDayDate = function formatMultiDayDate(item) {
|
|
36
|
-
var _isEn = isEn(item);
|
|
37
|
-
|
|
38
|
-
// 跨日
|
|
39
|
-
var startDate = dayjs(item === null || item === void 0 ? void 0 : item.start_date);
|
|
40
|
-
var endDate = dayjs(item === null || item === void 0 ? void 0 : item.end_date);
|
|
41
|
-
var _format = _isEn ? 'ddd, DD/MM/YYYY' : 'YYYY-MM-DD,ddd';
|
|
42
|
-
var date = "".concat(startDate.format(_format), " ~ ").concat(endDate.format(_format));
|
|
43
|
-
return date;
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* @title: 格式化服务的 开始时间-结束时间-时长, 用于展示
|
|
48
|
-
* @description:
|
|
49
|
-
* @param {any} item
|
|
50
|
-
* @param {any} currentDate
|
|
51
|
-
* @return {*}
|
|
52
|
-
* @Author: zhiwei.Wang
|
|
53
|
-
* @Date: 2024-04-26 14:04
|
|
54
|
-
*/
|
|
55
|
-
export var getServiceTime = function getServiceTime(item, currentDate, utils) {
|
|
56
|
-
var _utils$storage, _item$format;
|
|
57
|
-
if (!dayjs(currentDate).isValid()) return '';
|
|
58
|
-
var locale = (item === null || item === void 0 ? void 0 : item.locale) || (utils === null || utils === void 0 || (_utils$storage = utils.storage) === null || _utils$storage === void 0 ? void 0 : _utils$storage.get('umi_locale')) || 'en-US';
|
|
59
|
-
var isEn = locale === 'en-US' || locale === 'en';
|
|
60
|
-
var localeTypes = {
|
|
61
|
-
'en-US': 'en',
|
|
62
|
-
'zh-CN': 'zh-cn',
|
|
63
|
-
'zh-HK': 'zh-tw'
|
|
64
|
-
};
|
|
65
|
-
dayjs.locale(localeTypes[locale]);
|
|
66
|
-
var startDate = dayjs(item === null || item === void 0 ? void 0 : item.start_date);
|
|
67
|
-
var endDate = dayjs(item === null || item === void 0 ? void 0 : item.end_date);
|
|
68
|
-
var diffInDays = (item === null || item === void 0 ? void 0 : item.custom_day_count) || endDate.diff(startDate, 'day');
|
|
69
|
-
|
|
70
|
-
// 1.2时间格式, 同天显示 年月日 开始 - 结束, 不同天 年月日 开始 - 年月日 结束
|
|
71
|
-
if (item !== null && item !== void 0 && item.duration_type) {
|
|
72
|
-
var sameDay = startDate.isSame(endDate, 'day');
|
|
73
|
-
var dateFormat = isEn ? 'DD/MM/YYYY' : 'YYYY-MM-DD';
|
|
74
|
-
var timeFormat = 'HH:mm';
|
|
75
|
-
var startTime = (item === null || item === void 0 ? void 0 : item.start_time) || startDate.format(timeFormat);
|
|
76
|
-
var endTime = (item === null || item === void 0 ? void 0 : item.end_time) || endDate.format(timeFormat);
|
|
77
|
-
var dateTime = '';
|
|
78
|
-
if (sameDay) {
|
|
79
|
-
if (isEn) {
|
|
80
|
-
// 英文:开始时间 - 结束时间 年月日
|
|
81
|
-
dateTime = "".concat(startTime, " ~ ").concat(endTime, " ").concat(startDate.format(dateFormat));
|
|
82
|
-
} else {
|
|
83
|
-
// 中文:年月日 开始时间 - 结束时间
|
|
84
|
-
dateTime = "".concat(startDate.format(dateFormat), " ").concat(startTime, " ~ ").concat(endTime);
|
|
85
|
-
}
|
|
86
|
-
} else {
|
|
87
|
-
// 不同天
|
|
88
|
-
if (isEn) {
|
|
89
|
-
// 英文:开始时间 年月日 - 结束时间 年月日
|
|
90
|
-
dateTime = "".concat(startTime, " ").concat(startDate.format(dateFormat), " ~ ").concat(endTime, " ").concat(endDate.format(dateFormat));
|
|
91
|
-
} else {
|
|
92
|
-
// 中文:年月日 开始时间 - 年月日 结束时间
|
|
93
|
-
dateTime = "".concat(startDate.format(dateFormat), " ").concat(startTime, " ~ ").concat(endDate.format(dateFormat), " ").concat(endTime);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
var startDateTime = "".concat(startDate.format('YYYY-MM-DD'), " ").concat(startTime);
|
|
97
|
-
var endDateTime = "".concat(endDate.format('YYYY-MM-DD'), " ").concat(endTime);
|
|
98
|
-
var _duration = dayjs(endDateTime).diff(dayjs(startDateTime), item === null || item === void 0 ? void 0 : item.duration_type);
|
|
99
|
-
var durationText = '';
|
|
100
|
-
if ((item === null || item === void 0 ? void 0 : item.duration_type) === 'minutes') {
|
|
101
|
-
// 转为小时+分钟
|
|
102
|
-
var hours = Math.floor(_duration / 60);
|
|
103
|
-
var minutes = _duration % 60;
|
|
104
|
-
durationText = locales.getText('pisell2.product.card.hour.minute')(hours, minutes);
|
|
105
|
-
} else if ((item === null || item === void 0 ? void 0 : item.duration_type) === 'days') {
|
|
106
|
-
durationText = locales.getText('pisell2.product.card.day')(_duration);
|
|
107
|
-
} else {
|
|
108
|
-
durationText = "".concat(_duration);
|
|
109
|
-
}
|
|
110
|
-
return "".concat(dateTime, " (").concat(durationText, ")");
|
|
111
|
-
}
|
|
112
|
-
var _format = isEn ? 'ddd, DD/MM/YYYY' : 'YYYY-MM-DD,ddd';
|
|
113
|
-
|
|
114
|
-
// 是否自定义格式
|
|
115
|
-
if (item !== null && item !== void 0 && item.hasOwnProperty('format') && (item === null || item === void 0 || (_item$format = item.format) === null || _item$format === void 0 ? void 0 : _item$format.length) > 0) {
|
|
116
|
-
var _item$format2, _item$format3;
|
|
117
|
-
_format = isEn ? item === null || item === void 0 || (_item$format2 = item.format) === null || _item$format2 === void 0 ? void 0 : _item$format2[0] : item === null || item === void 0 || (_item$format3 = item.format) === null || _item$format3 === void 0 ? void 0 : _item$format3[1];
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
// 是否显示时间
|
|
121
|
-
if (item !== null && item !== void 0 && item.show_time) {
|
|
122
|
-
startDate = dayjs(item !== null && item !== void 0 && item.start_time ? "".concat(item === null || item === void 0 ? void 0 : item.start_date, " ").concat(item === null || item === void 0 ? void 0 : item.start_time) : startDate.format('YYYY-MM-DD HH:mm'));
|
|
123
|
-
endDate = dayjs(item !== null && item !== void 0 && item.end_time ? "".concat(item === null || item === void 0 ? void 0 : item.end_date, " ").concat(item === null || item === void 0 ? void 0 : item.end_time) : endDate.format('YYYY-MM-DD HH:mm'));
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
// 显示时长分钟
|
|
127
|
-
if ((item === null || item === void 0 ? void 0 : item.duration_type) === 'minutes') {
|
|
128
|
-
diffInDays = endDate.diff(startDate, 'minute');
|
|
129
|
-
}
|
|
130
|
-
var date = "".concat(startDate.format(_format), " ~ ").concat(endDate.format(_format));
|
|
131
|
-
|
|
132
|
-
// 自定义文案
|
|
133
|
-
var text = locales.getText('pisell2.product.card.day')(diffInDays);
|
|
134
|
-
if (item !== null && item !== void 0 && item.custom_day_count) {
|
|
135
|
-
text = locales.getText('pisell2.product.card.day.event')(diffInDays);
|
|
136
|
-
}
|
|
137
|
-
var textTypes = {
|
|
138
|
-
'minutes': locales.getText('pisell2.product.card.minute')(diffInDays),
|
|
139
|
-
'event': locales.getText('pisell2.product.card.day.event')(diffInDays)
|
|
140
|
-
};
|
|
141
|
-
text = (textTypes === null || textTypes === void 0 ? void 0 : textTypes[item === null || item === void 0 ? void 0 : item.duration_type]) || text;
|
|
142
|
-
var duration = "".concat(diffInDays).concat(text);
|
|
143
|
-
return "".concat(date, " (").concat(duration, ")");
|
|
144
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
en: {
|
|
3
|
-
'page.wallet.guide.title': string;
|
|
4
|
-
'page.wallet.guide.subtitle': string;
|
|
5
|
-
'page.wallet.guide.button': string;
|
|
6
|
-
};
|
|
7
|
-
'zh-CN': {
|
|
8
|
-
'page.wallet.guide.title': string;
|
|
9
|
-
'page.wallet.guide.subtitle': string;
|
|
10
|
-
'page.wallet.guide.button': string;
|
|
11
|
-
};
|
|
12
|
-
'zh-HK': {
|
|
13
|
-
'page.wallet.guide.title': string;
|
|
14
|
-
'page.wallet.guide.subtitle': string;
|
|
15
|
-
'page.wallet.guide.button': string;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
export default _default;
|