@pisell/private-materials 3.3.25 → 3.3.27
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/Sales/Customer/index.js +3 -1
- package/es/components/Sales/Event/Detail.js +5 -1
- package/es/components/Sales/Event/serve.d.ts +3 -0
- package/es/components/Sales/Init/index.d.ts +1 -0
- package/es/components/Sales/Init/index.js +3 -2
- package/es/components/Sales/Step/index.d.ts +2 -0
- package/es/components/Sales/Step/index.js +13 -4
- package/es/components/appointmentBooking/components/ConfirmInformation/index.js +5 -5
- package/es/components/appointmentBooking/components/Services/index.js +2 -0
- package/es/components/appointmentBooking/deposit/index.js +2 -2
- package/es/components/booking/addons/model.d.ts +1 -10
- package/es/components/booking/addons/model.js +5 -5
- 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/footer/index.d.ts +1 -0
- package/es/components/booking/components/footer/utils.js +16 -15
- package/es/components/booking/forms/model.d.ts +1 -10
- 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/useQuotation.d.ts +4 -0
- package/es/components/booking/hooks/useQuotation.js +256 -0
- package/es/components/booking/info/model.d.ts +1 -10
- package/es/components/booking/info/service/addService/index.js +4 -4
- package/es/components/booking/info/service/editService/index.js +6 -3
- package/es/components/booking/info/service/index.js +4 -1
- package/es/components/booking/info/service/like/index.js +1 -1
- package/es/components/booking/info/service2/Group/utils.js +1 -1
- package/es/components/booking/info/service2/hooks/useSelectPet.js +6 -4
- package/es/components/booking/info/service2/index.js +4 -1
- package/es/components/booking/info/utils.js +1 -1
- package/es/components/booking/info2/service/addService/index.d.ts +1 -0
- package/es/components/booking/info2/service/addService/index.js +29 -9
- package/es/components/booking/info2/service/editService/index.js +2 -0
- package/es/components/booking/info2/service/index.js +4 -1
- package/es/components/booking/locales.d.ts +6 -0
- package/es/components/booking/locales.js +9 -3
- package/es/components/booking/materiels/startTime/index.js +1 -1
- package/es/components/booking/model.d.ts +1 -9
- package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
- package/es/components/booking/notes/NoteBlock/index.js +11 -11
- package/es/components/booking/notes/model.d.ts +1 -10
- package/es/components/booking/notes/model.js +5 -5
- package/es/components/booking/payments/model.d.ts +1 -10
- package/es/components/booking/payments/model.js +5 -5
- package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +122 -31
- package/es/components/eventBooking/components/Provider/Event/index.js +20 -4
- package/es/components/eventBooking/components/Provider/Resource/index.js +26 -5
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.d.ts +2 -2
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.js +1 -1
- package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.js +5 -2
- package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
- package/es/components/eventBooking/components/scheduleCalendar/calendarItem.js +7 -2
- package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +3 -0
- package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.js +60 -0
- package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.less +63 -0
- package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimes/index.d.ts +9 -0
- package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimes/index.js +59 -0
- package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimes/index.less +7 -0
- package/es/components/eventBooking/components/scheduleCalendar/index.d.ts +1 -0
- package/es/components/eventBooking/components/scheduleCalendar/index.js +30 -21
- package/es/components/eventBooking/components/scheduleCalendar/index.less +2 -0
- package/es/components/eventBooking/index.js +2 -2
- package/es/components/eventBooking/locales.d.ts +6 -0
- package/es/components/eventBooking/locales.js +166 -160
- package/es/components/listComponent/index.js +5 -5
- package/es/components/pay/toC/PaymentMethods/WalletPass/List/index.d.ts +3 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/List/index.js +3 -2
- package/es/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +5 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/index.js +73 -20
- package/es/components/pay/toC/PaymentMethods/WalletPass/index.less +30 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +2 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/utils.js +2 -1
- package/es/components/pay/toC/WalletPassBlock/components/WalletAvailable/index.d.ts +16 -0
- package/es/components/pay/toC/WalletPassBlock/components/WalletAvailable/index.js +60 -0
- package/es/components/pay/toC/WalletPassBlock/components/WalletAvailable/index.less +38 -0
- package/es/components/pay/toC/WalletPassBlock/components/WalletBestValueFound/index.d.ts +17 -0
- package/es/components/pay/toC/WalletPassBlock/components/WalletBestValueFound/index.js +98 -0
- package/es/components/pay/toC/WalletPassBlock/components/WalletBestValueFound/index.less +133 -0
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +7 -0
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.js +34 -0
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.less +23 -0
- package/es/components/pay/toC/WalletPassBlock/index.d.ts +9 -2
- package/es/components/pay/toC/WalletPassBlock/index.js +119 -21
- package/es/components/pay/toC/WalletPassBlock/index.less +82 -13
- package/es/components/pay/toC/index.js +138 -89
- package/es/components/pay/toC/locales.d.ts +69 -3
- package/es/components/pay/toC/locales.js +132 -6
- package/es/components/pay/toC/model.d.ts +5 -9
- package/es/components/pay/toC/model.js +9 -0
- package/es/components/pay/toC/serve.d.ts +23 -0
- package/es/components/pay/toC/serve.js +34 -2
- package/es/components/pay/toC/utils.d.ts +3 -1
- package/es/components/pay/toC/utils.js +8 -3
- 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/ProductItemPreview/index.js +1 -1
- package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
- package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
- package/es/components/productExtension/server.js +2 -2
- package/es/components/productSelect/components/productGroup/index.less +4 -12
- package/es/components/productSelect/index.less +1 -1
- package/es/components/ruleSetting/ruleBorder/index.js +1 -1
- 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/Search/index.js +5 -5
- package/es/components/schedules/model.d.ts +1 -9
- 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.js +1 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
- package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
- 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/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/ScheduleDetailDrawer/index.js +9 -9
- package/es/components/schedules/utils.js +4 -4
- package/es/components/selectModal/index.js +2 -2
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +15 -20
- package/es/components/ticketBooking/components/menuBar/index.less +0 -1
- package/es/components/ticketBooking/components/ticketBooking/index.less +2 -4
- package/es/components/wallet/Detail/model.d.ts +1 -13
- package/es/components/wallet/DiscountCard/model.d.ts +1 -14
- package/es/components/wallet/PointCard/model.d.ts +1 -13
- package/es/components/wallet/RechargeableCard/model.d.ts +1 -29
- package/es/components/wallet/Voucher/model.d.ts +1 -13
- package/es/components/wallet/model.d.ts +1 -9
- package/es/hooks/useComponents.js +1 -1
- package/es/hooks/useLocale.d.ts +2 -0
- package/es/hooks/useLocale.js +7 -0
- package/es/hooks/useLoginUser.d.ts +2 -0
- package/es/hooks/useLoginUser.js +19 -0
- package/lib/components/Sales/Customer/index.js +3 -1
- package/lib/components/Sales/Event/Detail.js +5 -1
- package/lib/components/Sales/Event/serve.d.ts +3 -0
- package/lib/components/Sales/Init/index.d.ts +1 -0
- package/lib/components/Sales/Init/index.js +3 -2
- package/lib/components/Sales/Step/index.d.ts +2 -0
- package/lib/components/Sales/Step/index.js +13 -4
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +2 -2
- package/lib/components/appointmentBooking/components/Services/index.js +2 -0
- package/lib/components/appointmentBooking/deposit/index.js +2 -2
- package/lib/components/booking/addons/model.d.ts +1 -10
- package/lib/components/booking/components/footer/index.d.ts +1 -0
- package/lib/components/booking/components/footer/utils.js +5 -4
- package/lib/components/booking/forms/model.d.ts +1 -10
- package/lib/components/booking/forms/single/index.d.ts +1 -0
- package/lib/components/booking/hooks/useQuotation.d.ts +4 -0
- package/lib/components/booking/hooks/useQuotation.js +210 -0
- package/lib/components/booking/info/model.d.ts +1 -10
- package/lib/components/booking/info/service/addService/index.js +2 -3
- package/lib/components/booking/info/service/editService/index.js +5 -2
- package/lib/components/booking/info/service/index.js +3 -1
- package/lib/components/booking/info/service2/Group/utils.js +2 -2
- package/lib/components/booking/info/service2/hooks/useSelectPet.js +5 -3
- package/lib/components/booking/info/service2/index.js +3 -1
- package/lib/components/booking/info/utils.js +1 -1
- package/lib/components/booking/info2/service/addService/index.d.ts +1 -0
- package/lib/components/booking/info2/service/addService/index.js +25 -17
- package/lib/components/booking/info2/service/editService/index.js +2 -1
- package/lib/components/booking/info2/service/index.js +3 -1
- package/lib/components/booking/locales.d.ts +6 -0
- package/lib/components/booking/locales.js +9 -3
- package/lib/components/booking/model.d.ts +1 -9
- package/lib/components/booking/notes/model.d.ts +1 -10
- package/lib/components/booking/payments/model.d.ts +1 -10
- package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +52 -4
- package/lib/components/eventBooking/components/Provider/Event/index.js +15 -3
- package/lib/components/eventBooking/components/Provider/Resource/index.js +16 -3
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.d.ts +2 -2
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.js +7 -7
- package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.js +3 -1
- package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
- package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.js +6 -5
- package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +3 -0
- package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.js +75 -0
- package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.less +63 -0
- package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimes/index.d.ts +9 -0
- package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimes/index.js +64 -0
- package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimes/index.less +7 -0
- package/lib/components/eventBooking/components/scheduleCalendar/index.d.ts +1 -0
- package/lib/components/eventBooking/components/scheduleCalendar/index.js +17 -11
- package/lib/components/eventBooking/components/scheduleCalendar/index.less +2 -0
- package/lib/components/eventBooking/index.js +2 -2
- package/lib/components/eventBooking/locales.d.ts +6 -0
- package/lib/components/eventBooking/locales.js +10 -4
- package/lib/components/pay/toC/PaymentMethods/WalletPass/List/index.d.ts +3 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/List/index.js +2 -2
- package/lib/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +5 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/index.js +52 -11
- package/lib/components/pay/toC/PaymentMethods/WalletPass/index.less +30 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +2 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.js +2 -1
- package/lib/components/pay/toC/WalletPassBlock/components/WalletAvailable/index.d.ts +16 -0
- package/lib/components/pay/toC/WalletPassBlock/components/WalletAvailable/index.js +87 -0
- package/lib/components/pay/toC/WalletPassBlock/components/WalletAvailable/index.less +38 -0
- package/lib/components/pay/toC/WalletPassBlock/components/WalletBestValueFound/index.d.ts +17 -0
- package/lib/components/pay/toC/WalletPassBlock/components/WalletBestValueFound/index.js +103 -0
- package/lib/components/pay/toC/WalletPassBlock/components/WalletBestValueFound/index.less +133 -0
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +7 -0
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.js +52 -0
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.less +23 -0
- package/lib/components/pay/toC/WalletPassBlock/index.d.ts +9 -2
- package/lib/components/pay/toC/WalletPassBlock/index.js +115 -20
- package/lib/components/pay/toC/WalletPassBlock/index.less +82 -13
- package/lib/components/pay/toC/index.js +35 -9
- package/lib/components/pay/toC/locales.d.ts +69 -3
- package/lib/components/pay/toC/locales.js +72 -6
- package/lib/components/pay/toC/model.d.ts +5 -9
- package/lib/components/pay/toC/model.js +10 -0
- package/lib/components/pay/toC/serve.d.ts +23 -0
- package/lib/components/pay/toC/serve.js +12 -6
- package/lib/components/pay/toC/utils.d.ts +3 -1
- package/lib/components/pay/toC/utils.js +8 -3
- package/lib/components/productSelect/components/productGroup/index.less +4 -12
- package/lib/components/productSelect/index.less +1 -1
- package/lib/components/schedules/model.d.ts +1 -9
- package/lib/components/schedules/utils.js +1 -1
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +13 -16
- package/lib/components/ticketBooking/components/menuBar/index.less +0 -1
- package/lib/components/ticketBooking/components/ticketBooking/index.less +2 -4
- package/lib/components/wallet/Detail/model.d.ts +1 -13
- package/lib/components/wallet/DiscountCard/model.d.ts +1 -14
- package/lib/components/wallet/PointCard/model.d.ts +1 -13
- package/lib/components/wallet/RechargeableCard/model.d.ts +1 -29
- package/lib/components/wallet/Voucher/model.d.ts +1 -13
- package/lib/components/wallet/model.d.ts +1 -9
- package/lib/hooks/useLocale.d.ts +2 -0
- package/lib/hooks/useLocale.js +41 -0
- package/lib/hooks/useLoginUser.d.ts +2 -0
- package/lib/hooks/useLoginUser.js +50 -0
- package/package.json +2 -2
|
@@ -4,11 +4,12 @@
|
|
|
4
4
|
margin-top: 8px;
|
|
5
5
|
.wallet-pass-card-icon {
|
|
6
6
|
font-size: 20px;
|
|
7
|
-
color: #
|
|
7
|
+
color: #fff;
|
|
8
8
|
}
|
|
9
9
|
& > span {
|
|
10
10
|
display: flex;
|
|
11
11
|
align-items: center;
|
|
12
|
+
justify-content: center;
|
|
12
13
|
}
|
|
13
14
|
}
|
|
14
15
|
|
|
@@ -23,27 +24,45 @@
|
|
|
23
24
|
.wallet-pass-card {
|
|
24
25
|
margin-top: 20px;
|
|
25
26
|
border-radius: 12px;
|
|
26
|
-
border: 1px solid var(--Gray-400, #
|
|
27
|
-
background: var(--Base-White, #
|
|
27
|
+
border: 1px solid var(--Gray-400, #98a2b3);
|
|
28
|
+
background: var(--Base-White, #fff);
|
|
29
|
+
.pisell-row-center {
|
|
30
|
+
width: 100%;
|
|
31
|
+
}
|
|
28
32
|
|
|
29
33
|
.wallet-pass-card-title {
|
|
34
|
+
display: flex;
|
|
35
|
+
justify-content: space-between;
|
|
30
36
|
color: var(--Gray-900, #101828);
|
|
31
37
|
font-size: 16px;
|
|
32
|
-
font-style: normal;
|
|
33
38
|
font-weight: 600;
|
|
34
39
|
line-height: 20px;
|
|
40
|
+
gap: 6px;
|
|
41
|
+
.wallet-pass-card-title-left {
|
|
42
|
+
display: flex;
|
|
43
|
+
align-items: center;
|
|
44
|
+
gap: 6px;
|
|
45
|
+
.wallet-pass-card-title-left-icon {
|
|
46
|
+
font-size: 22px;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
.wallet-pass-card-title-right {
|
|
50
|
+
display: flex;
|
|
51
|
+
align-items: center;
|
|
52
|
+
gap: 6px;
|
|
53
|
+
flex-shrink: 0;
|
|
54
|
+
.wallet-pass-card-title-right-icon {
|
|
55
|
+
font-size: 14px;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
35
58
|
}
|
|
36
59
|
|
|
37
60
|
.wallet-pass-card-desc {
|
|
38
|
-
color:
|
|
61
|
+
color: #757575;
|
|
39
62
|
font-size: 14px;
|
|
40
|
-
font-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
.price {
|
|
45
|
-
color: var(--theme-color, #7F56D9);
|
|
46
|
-
}
|
|
63
|
+
font-weight: 500;
|
|
64
|
+
line-height: 20px; /* 142.857% */
|
|
65
|
+
margin: 4px 0 0;
|
|
47
66
|
}
|
|
48
67
|
|
|
49
68
|
//.wallet-pass-card-icon {
|
|
@@ -73,4 +92,54 @@
|
|
|
73
92
|
line-height: 24px;
|
|
74
93
|
/* 150% */
|
|
75
94
|
}
|
|
76
|
-
|
|
95
|
+
|
|
96
|
+
.wallet-pass-card-desc-wrap {
|
|
97
|
+
.wallet-pass-card-total-savings {
|
|
98
|
+
.wallet-pass-card-total-savings-title {
|
|
99
|
+
display: flex;
|
|
100
|
+
align-items: center;
|
|
101
|
+
justify-content: space-between;
|
|
102
|
+
.wallet-pass-card-total-savings-title-left {
|
|
103
|
+
color: #009951;
|
|
104
|
+
font-size: 16px;
|
|
105
|
+
font-weight: 600;
|
|
106
|
+
line-height: 28px; /* 175% */
|
|
107
|
+
}
|
|
108
|
+
.wallet-pass-card-total-savings-title-right {
|
|
109
|
+
display: flex;
|
|
110
|
+
align-items: center;
|
|
111
|
+
gap: 4px;
|
|
112
|
+
color: #757575;
|
|
113
|
+
font-size: 12px;
|
|
114
|
+
font-weight: 400;
|
|
115
|
+
line-height: 20px; /* 166.667% */
|
|
116
|
+
padding: 7px 0 7px 0px;
|
|
117
|
+
.wallet-pass-card-total-savings-title-right-icon {
|
|
118
|
+
font-size: 18px;
|
|
119
|
+
color: #344054;
|
|
120
|
+
transition: transform 0.3s ease;
|
|
121
|
+
|
|
122
|
+
&.is-rotate {
|
|
123
|
+
transform: rotate(180deg);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.wallet-pass-card-total-savings-desc {
|
|
130
|
+
overflow: hidden;
|
|
131
|
+
opacity: 0;
|
|
132
|
+
transition: all 0.3s ease-in-out;
|
|
133
|
+
will-change: height, opacity;
|
|
134
|
+
|
|
135
|
+
&[style*="height: 0"] {
|
|
136
|
+
opacity: 0;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
&:not([style*="height: 0"]) {
|
|
140
|
+
opacity: 1;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
@@ -51,7 +51,7 @@ var import_locales = __toESM(require("./locales"));
|
|
|
51
51
|
var import_utils3 = require("./utils");
|
|
52
52
|
var import_index = require("./index.less");
|
|
53
53
|
var ToCPay = (props, ref) => {
|
|
54
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
|
|
54
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t;
|
|
55
55
|
const { state, dispatch } = (0, import_react.useContext)(import_model.Context);
|
|
56
56
|
const paymentListRef = (0, import_react.useRef)();
|
|
57
57
|
const paymentMethodsRef = (0, import_react.useRef)();
|
|
@@ -59,13 +59,15 @@ var ToCPay = (props, ref) => {
|
|
|
59
59
|
const [submitLoading, setSubmitLoading] = (0, import_react.useState)(false);
|
|
60
60
|
const [open, setOpen] = (0, import_react.useState)(false);
|
|
61
61
|
const [renderType, setRenderType] = (0, import_react.useState)("modal");
|
|
62
|
+
const walletPassBlockRef = (0, import_react.useRef)(null);
|
|
62
63
|
const context = (0, import_useEngineContext.default)();
|
|
63
64
|
const [showInformation, setShowInformation] = (0, import_react.useState)(false);
|
|
64
65
|
const [showDetectIncognitoConfirm, setShowDetectIncognitoConfirm] = (0, import_react.useState)(false);
|
|
65
66
|
const utils = context.appHelper.utils || {};
|
|
66
67
|
const dvaStore = (_c = (_b = (_a = context.appHelper.utils) == null ? void 0 : _a.getStore) == null ? void 0 : _b.call(_a)) == null ? void 0 : _c.getState();
|
|
67
68
|
const customer_id = (_i = (_h = (_g = (_f = (_e = (_d = context.appHelper.utils) == null ? void 0 : _d.getStore()) == null ? void 0 : _e.getState) == null ? void 0 : _f.call(_e)) == null ? void 0 : _g.global) == null ? void 0 : _h.userInfo) == null ? void 0 : _i.id;
|
|
68
|
-
|
|
69
|
+
const shopName = (_l = (_k = (_j = dvaStore.core) == null ? void 0 : _j.core) == null ? void 0 : _k.shop) == null ? void 0 : _l.name;
|
|
70
|
+
import_utils.locales.init(import_locales.default, ((_m = dvaStore.core) == null ? void 0 : _m.translateLocale) || "en");
|
|
69
71
|
import_utils2.request.setRequest(utils == null ? void 0 : utils.request);
|
|
70
72
|
const _initStore = (initProps) => {
|
|
71
73
|
var _a2, _b2, _c2, _d2;
|
|
@@ -88,6 +90,27 @@ var ToCPay = (props, ref) => {
|
|
|
88
90
|
}
|
|
89
91
|
});
|
|
90
92
|
};
|
|
93
|
+
const getWalletSetting = async (initProps) => {
|
|
94
|
+
var _a2, _b2;
|
|
95
|
+
const sale_channel = ((_a2 = initProps == null ? void 0 : initProps.order) == null ? void 0 : _a2.sale_channel) || "online-store";
|
|
96
|
+
const { wallet, wallet_setting } = await (0, import_serve.getWalletNameAndPopupStatus)({
|
|
97
|
+
setting_type: `${sale_channel}-wallet-setting`
|
|
98
|
+
});
|
|
99
|
+
const setting = {
|
|
100
|
+
name: ((_b2 = utils == null ? void 0 : utils.translation) == null ? void 0 : _b2.call(utils, wallet == null ? void 0 : wallet.name)) || import_utils.locales.getText("tocPay.text.walletName")(shopName),
|
|
101
|
+
popup_status: (wallet_setting == null ? void 0 : wallet_setting.popup_status) ?? 1
|
|
102
|
+
};
|
|
103
|
+
if (setting.popup_status === 1) {
|
|
104
|
+
setTimeout(() => {
|
|
105
|
+
var _a3;
|
|
106
|
+
(_a3 = walletPassBlockRef.current) == null ? void 0 : _a3.open();
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
dispatch({
|
|
110
|
+
type: "setWalletSetting",
|
|
111
|
+
payload: setting
|
|
112
|
+
});
|
|
113
|
+
};
|
|
91
114
|
const init = async (initProps) => {
|
|
92
115
|
const { renderType: renderType2 } = initProps;
|
|
93
116
|
setRenderType(renderType2 ?? "modal");
|
|
@@ -97,6 +120,7 @@ var ToCPay = (props, ref) => {
|
|
|
97
120
|
_initStore(initProps);
|
|
98
121
|
(0, import_payGroup.removePayGroupFromStorage)(initProps.order.order_id);
|
|
99
122
|
await _getPaymentsAndWalletPass(initProps.order);
|
|
123
|
+
await getWalletSetting(initProps);
|
|
100
124
|
};
|
|
101
125
|
const _getPaymentsAndWalletPass = async (order) => {
|
|
102
126
|
var _a2, _b2;
|
|
@@ -193,7 +217,7 @@ var ToCPay = (props, ref) => {
|
|
|
193
217
|
const waitAmount = (0, import_react.useMemo)(() => {
|
|
194
218
|
var _a2;
|
|
195
219
|
return ((_a2 = state.payGroup) == null ? void 0 : _a2.wait_amount) || 0;
|
|
196
|
-
}, [(
|
|
220
|
+
}, [(_n = state.payGroup) == null ? void 0 : _n.wait_amount]);
|
|
197
221
|
const isWalletPassPay = (0, import_react.useMemo)(() => {
|
|
198
222
|
var _a2, _b2, _c2;
|
|
199
223
|
const isWalletPass = (_c2 = (_b2 = (_a2 = state.payGroup) == null ? void 0 : _a2.walletPass) == null ? void 0 : _b2.cards) == null ? void 0 : _c2.length;
|
|
@@ -267,7 +291,7 @@ var ToCPay = (props, ref) => {
|
|
|
267
291
|
(_b2 = paymentListRef.current) == null ? void 0 : _b2.calculateSurcharge(
|
|
268
292
|
((_a2 = state.payGroup) == null ? void 0 : _a2.wait_amount) || 0
|
|
269
293
|
);
|
|
270
|
-
}, [(
|
|
294
|
+
}, [(_o = state.payGroup) == null ? void 0 : _o.wait_amount]);
|
|
271
295
|
(0, import_react.useImperativeHandle)(ref, () => {
|
|
272
296
|
return {
|
|
273
297
|
init,
|
|
@@ -381,14 +405,16 @@ var ToCPay = (props, ref) => {
|
|
|
381
405
|
loading,
|
|
382
406
|
mask: true
|
|
383
407
|
},
|
|
384
|
-
((
|
|
385
|
-
/* @__PURE__ */ import_react.default.createElement(import_PayAmount.default, { amount: ((
|
|
386
|
-
((
|
|
408
|
+
((_p = state.order) == null ? void 0 : _p.countdown) && /* @__PURE__ */ import_react.default.createElement(import_PayCountdown.default, { time: (_q = state.order) == null ? void 0 : _q.countdown }),
|
|
409
|
+
/* @__PURE__ */ import_react.default.createElement(import_PayAmount.default, { amount: ((_r = state.payGroup) == null ? void 0 : _r.total_amount) || 0 }),
|
|
410
|
+
((_s = state.payGroup) == null ? void 0 : _s.walletPass) && /* @__PURE__ */ import_react.default.createElement(
|
|
387
411
|
import_WalletPassBlock.default,
|
|
388
412
|
{
|
|
389
413
|
customer_id,
|
|
390
414
|
payGroup: state.payGroup,
|
|
391
|
-
onWalletPassChange
|
|
415
|
+
onWalletPassChange,
|
|
416
|
+
ref: walletPassBlockRef,
|
|
417
|
+
walletSetting: state.walletSetting
|
|
392
418
|
}
|
|
393
419
|
),
|
|
394
420
|
/* @__PURE__ */ import_react.default.createElement(
|
|
@@ -399,7 +425,7 @@ var ToCPay = (props, ref) => {
|
|
|
399
425
|
handlePaymentByType(detail == null ? void 0 : detail.service);
|
|
400
426
|
},
|
|
401
427
|
paymentTypeChange,
|
|
402
|
-
hide: ((
|
|
428
|
+
hide: ((_t = state.payGroup) == null ? void 0 : _t.wait_amount) == 0,
|
|
403
429
|
renderTitle: renderPaymentListTitle
|
|
404
430
|
}
|
|
405
431
|
)
|
|
@@ -60,7 +60,7 @@ declare const _default: {
|
|
|
60
60
|
'tocPay.text.scanBarQrCode': string;
|
|
61
61
|
'tocPay.text.enterCodes': string;
|
|
62
62
|
'tocPay.text.searchDescribe': string;
|
|
63
|
-
'tocPay.text.walletPassEmpty': string;
|
|
63
|
+
'tocPay.text.walletPassEmpty': (walletName: string) => string;
|
|
64
64
|
'tocPay.text.walletPassDisabled': string;
|
|
65
65
|
'tocPay.text.walletPassPermanent': string;
|
|
66
66
|
'tocPay.text.walletPassCompleteTitle': string;
|
|
@@ -71,6 +71,28 @@ declare const _default: {
|
|
|
71
71
|
'tocPay.text.detectIncognitoConfirm': string;
|
|
72
72
|
'tocPay.text.copyLink': string;
|
|
73
73
|
'tocPay.text.copySuccess': string;
|
|
74
|
+
'tocPay.text.walletName': (shopName: string) => string;
|
|
75
|
+
'tocPay.text.bestValueFound': string;
|
|
76
|
+
'tocPay.text.welcomeToUseWalletPass': (walletName: string) => string;
|
|
77
|
+
'tocPay.text.totalSavings': string;
|
|
78
|
+
'tocPay.text.bestCombination': (walletName: string) => string;
|
|
79
|
+
'tocPay.text.recommended': string;
|
|
80
|
+
'tocPay.text.edit': string;
|
|
81
|
+
'tocPay.text.confirm': string;
|
|
82
|
+
'tocPay.text.unusedAndContinueToPayment': string;
|
|
83
|
+
'tocPay.text.walletPassAvailable': (walletName: string) => string;
|
|
84
|
+
'tocPay.text.useWalletPass': (walletName: string) => string;
|
|
85
|
+
'tocPay.text.useWalletPassAdd': (walletName: string) => string;
|
|
86
|
+
'tocPay.text.editWalletPass': (walletName: string) => string;
|
|
87
|
+
'tocPay.text.skipAndContinueToPayment': string;
|
|
88
|
+
'tocPay.text.youMightHaveAnEligibleWalletPass': (walletName: string) => string;
|
|
89
|
+
'tocPay.text.checkIfYouHaveAnyPointsCardRechargableCardOrVouchersToUse': string;
|
|
90
|
+
'tocPay.text.addPointsCard': string;
|
|
91
|
+
'tocPay.text.hasNoWalletPassAmount': string;
|
|
92
|
+
'tocPay.text.multipleSelectionAvailable': string;
|
|
93
|
+
'tocPay.text.youCanSelectMultipleWalletPassesToCombineForPayment': (walletName: string) => string;
|
|
94
|
+
'tocPay.text.bestValueCombination': string;
|
|
95
|
+
'tocPay.text.viewDetail': string;
|
|
74
96
|
};
|
|
75
97
|
'zh-CN': {
|
|
76
98
|
'tocPay.text.checkout': string;
|
|
@@ -133,7 +155,7 @@ declare const _default: {
|
|
|
133
155
|
'tocPay.text.scanBarQrCode': string;
|
|
134
156
|
'tocPay.text.enterCodes': string;
|
|
135
157
|
'tocPay.text.searchDescribe': string;
|
|
136
|
-
'tocPay.text.walletPassEmpty': string;
|
|
158
|
+
'tocPay.text.walletPassEmpty': (walletName: string) => string;
|
|
137
159
|
'tocPay.text.walletPassDisabled': string;
|
|
138
160
|
'tocPay.text.walletPassPermanent': string;
|
|
139
161
|
'tocPay.text.walletPassCompleteTitle': string;
|
|
@@ -143,6 +165,28 @@ declare const _default: {
|
|
|
143
165
|
'tocPay.text.detectIncognitoConfirm': string;
|
|
144
166
|
'tocPay.text.copyLink': string;
|
|
145
167
|
'tocPay.text.copySuccess': string;
|
|
168
|
+
'tocPay.text.walletName': (shopName: string) => string;
|
|
169
|
+
'tocPay.text.bestValueFound': string;
|
|
170
|
+
'tocPay.text.welcomeToUseWalletPass': (walletName: string) => string;
|
|
171
|
+
'tocPay.text.totalSavings': string;
|
|
172
|
+
'tocPay.text.bestCombination': (walletName: string) => string;
|
|
173
|
+
'tocPay.text.recommended': string;
|
|
174
|
+
'tocPay.text.edit': string;
|
|
175
|
+
'tocPay.text.confirm': string;
|
|
176
|
+
'tocPay.text.unusedAndContinueToPayment': string;
|
|
177
|
+
'tocPay.text.walletPassAvailable': (walletName: string) => string;
|
|
178
|
+
'tocPay.text.useWalletPass': (walletName: string) => string;
|
|
179
|
+
'tocPay.text.useWalletPassAdd': (walletName: string) => string;
|
|
180
|
+
'tocPay.text.editWalletPass': (walletName: string) => string;
|
|
181
|
+
'tocPay.text.skipAndContinueToPayment': string;
|
|
182
|
+
'tocPay.text.youMightHaveAnEligibleWalletPass': (walletName: string) => string;
|
|
183
|
+
'tocPay.text.checkIfYouHaveAnyPointsCardRechargableCardOrVouchersToUse': string;
|
|
184
|
+
'tocPay.text.addPointsCard': string;
|
|
185
|
+
'tocPay.text.hasNoWalletPassAmount': string;
|
|
186
|
+
'tocPay.text.multipleSelectionAvailable': string;
|
|
187
|
+
'tocPay.text.youCanSelectMultipleWalletPassesToCombineForPayment': (walletName: string) => string;
|
|
188
|
+
'tocPay.text.bestValueCombination': string;
|
|
189
|
+
'tocPay.text.viewDetail': string;
|
|
146
190
|
};
|
|
147
191
|
'zh-HK': {
|
|
148
192
|
'tocPay.text.checkout': string;
|
|
@@ -205,7 +249,7 @@ declare const _default: {
|
|
|
205
249
|
'tocPay.text.scanBarQrCode': string;
|
|
206
250
|
'tocPay.text.enterCodes': string;
|
|
207
251
|
'tocPay.text.searchDescribe': string;
|
|
208
|
-
'tocPay.text.walletPassEmpty': string;
|
|
252
|
+
'tocPay.text.walletPassEmpty': (walletName: string) => string;
|
|
209
253
|
'tocPay.text.walletPassDisabled': string;
|
|
210
254
|
'tocPay.text.walletPassPermanent': string;
|
|
211
255
|
'tocPay.text.walletPassCompleteTitle': string;
|
|
@@ -215,6 +259,28 @@ declare const _default: {
|
|
|
215
259
|
'tocPay.text.detectIncognitoConfirm': string;
|
|
216
260
|
'tocPay.text.copyLink': string;
|
|
217
261
|
'tocPay.text.copySuccess': string;
|
|
262
|
+
'tocPay.text.walletName': (shopName: string) => string;
|
|
263
|
+
'tocPay.text.bestValueFound': string;
|
|
264
|
+
'tocPay.text.welcomeToUseWalletPass': (walletName: string) => string;
|
|
265
|
+
'tocPay.text.totalSavings': string;
|
|
266
|
+
'tocPay.text.bestCombination': (walletName: string) => string;
|
|
267
|
+
'tocPay.text.recommended': string;
|
|
268
|
+
'tocPay.text.edit': string;
|
|
269
|
+
'tocPay.text.confirm': string;
|
|
270
|
+
'tocPay.text.unusedAndContinueToPayment': string;
|
|
271
|
+
'tocPay.text.walletPassAvailable': (walletName: string) => string;
|
|
272
|
+
'tocPay.text.useWalletPass': (walletName: string) => string;
|
|
273
|
+
'tocPay.text.useWalletPassAdd': (walletName: string) => string;
|
|
274
|
+
'tocPay.text.editWalletPass': (walletName: string) => string;
|
|
275
|
+
'tocPay.text.skipAndContinueToPayment': string;
|
|
276
|
+
'tocPay.text.youMightHaveAnEligibleWalletPass': (walletName: string) => string;
|
|
277
|
+
'tocPay.text.checkIfYouHaveAnyPointsCardRechargableCardOrVouchersToUse': string;
|
|
278
|
+
'tocPay.text.addPointsCard': string;
|
|
279
|
+
'tocPay.text.hasNoWalletPassAmount': string;
|
|
280
|
+
'tocPay.text.multipleSelectionAvailable': string;
|
|
281
|
+
'tocPay.text.youCanSelectMultipleWalletPassesToCombineForPayment': (walletName: string) => string;
|
|
282
|
+
'tocPay.text.bestValueCombination': string;
|
|
283
|
+
'tocPay.text.viewDetail': string;
|
|
218
284
|
};
|
|
219
285
|
};
|
|
220
286
|
export default _default;
|
|
@@ -84,7 +84,7 @@ var locales_default = {
|
|
|
84
84
|
"tocPay.text.scanBarQrCode": "Scan Bar/QR code",
|
|
85
85
|
"tocPay.text.enterCodes": "Enter codes",
|
|
86
86
|
"tocPay.text.searchDescribe": "Please enter code or encode",
|
|
87
|
-
"tocPay.text.walletPassEmpty":
|
|
87
|
+
"tocPay.text.walletPassEmpty": (walletName) => `No ${walletName}`,
|
|
88
88
|
"tocPay.text.walletPassDisabled": "Disabled",
|
|
89
89
|
"tocPay.text.walletPassPermanent": "Permanent",
|
|
90
90
|
"tocPay.text.walletPassCompleteTitle": "Please click ‘Submit’ button at the bottom to complete",
|
|
@@ -94,7 +94,29 @@ var locales_default = {
|
|
|
94
94
|
"tocPay.text.walletSearchEmpty": "No results found.",
|
|
95
95
|
"tocPay.text.detectIncognitoConfirm": "You are currently in private mode, wallet payment may not succeed. Please copy the link and continue payment in a non-private browsing tab.",
|
|
96
96
|
"tocPay.text.copyLink": "Copy link",
|
|
97
|
-
"tocPay.text.copySuccess": "Copy Success"
|
|
97
|
+
"tocPay.text.copySuccess": "Copy Success",
|
|
98
|
+
"tocPay.text.walletName": (shopName) => `${shopName}'s wallet`,
|
|
99
|
+
"tocPay.text.bestValueFound": "Best wallet combination for you!",
|
|
100
|
+
"tocPay.text.welcomeToUseWalletPass": (walletName) => `Welcome to use ${walletName}`,
|
|
101
|
+
"tocPay.text.totalSavings": "Total savings",
|
|
102
|
+
"tocPay.text.bestCombination": (walletName) => `Best combination of your available ${walletName} options`,
|
|
103
|
+
"tocPay.text.recommended": "Recommended",
|
|
104
|
+
"tocPay.text.edit": "Edit",
|
|
105
|
+
"tocPay.text.confirm": "Confirm",
|
|
106
|
+
"tocPay.text.unusedAndContinueToPayment": "Unused and continue to payment",
|
|
107
|
+
"tocPay.text.walletPassAvailable": (walletName) => `You have no valid ${walletName}`,
|
|
108
|
+
"tocPay.text.useWalletPass": (walletName) => `Go to ${walletName}`,
|
|
109
|
+
"tocPay.text.useWalletPassAdd": (walletName) => `Go to ${walletName}`,
|
|
110
|
+
"tocPay.text.editWalletPass": (walletName) => `Change Combination`,
|
|
111
|
+
"tocPay.text.skipAndContinueToPayment": "Skip and continue to payment",
|
|
112
|
+
"tocPay.text.youMightHaveAnEligibleWalletPass": (walletName) => `You might have an eligible ${walletName}`,
|
|
113
|
+
"tocPay.text.checkIfYouHaveAnyPointsCardRechargableCardOrVouchersToUse": "Check if you have any Points Card, Rechargable Card , or Vouchers to use",
|
|
114
|
+
"tocPay.text.addPointsCard": "Add points card, rechargable card, or vouchers if have any in hand.",
|
|
115
|
+
"tocPay.text.hasNoWalletPassAmount": "View points card, rechargable card, or vouchers options",
|
|
116
|
+
"tocPay.text.multipleSelectionAvailable": "Multiple selection available",
|
|
117
|
+
"tocPay.text.youCanSelectMultipleWalletPassesToCombineForPayment": (walletName) => `You can select multiple ${walletName} to combine for payment`,
|
|
118
|
+
"tocPay.text.bestValueCombination": "Best value combination",
|
|
119
|
+
"tocPay.text.viewDetail": "View detail"
|
|
98
120
|
},
|
|
99
121
|
"zh-CN": {
|
|
100
122
|
"tocPay.text.checkout": "结账",
|
|
@@ -157,7 +179,7 @@ var locales_default = {
|
|
|
157
179
|
"tocPay.text.scanBarQrCode": "扫描条形码/二维码",
|
|
158
180
|
"tocPay.text.enterCodes": "输入编码",
|
|
159
181
|
"tocPay.text.searchDescribe": "请输入卡片编码或发行编码",
|
|
160
|
-
"tocPay.text.walletPassEmpty":
|
|
182
|
+
"tocPay.text.walletPassEmpty": (walletName) => `没有可使用的${walletName}`,
|
|
161
183
|
"tocPay.text.walletPassDisabled": "不可用",
|
|
162
184
|
"tocPay.text.walletPassPermanent": "永久有效",
|
|
163
185
|
"tocPay.text.walletPassCompleteTitle": "请点击底部的“提交”按钮完成支付",
|
|
@@ -166,7 +188,29 @@ var locales_default = {
|
|
|
166
188
|
"tocPay.text.walletSearchEmpty": "没有查询到任何结果。",
|
|
167
189
|
"tocPay.text.detectIncognitoConfirm": "当前处于无痕模式,钱包支付可能失败,请复制链接在非无痕模式下继续支付。",
|
|
168
190
|
"tocPay.text.copyLink": "复制链接",
|
|
169
|
-
"tocPay.text.copySuccess": "复制成功"
|
|
191
|
+
"tocPay.text.copySuccess": "复制成功",
|
|
192
|
+
"tocPay.text.walletName": (shopName) => `${shopName}钱包`,
|
|
193
|
+
"tocPay.text.bestValueFound": "找到最佳组合选择!",
|
|
194
|
+
"tocPay.text.welcomeToUseWalletPass": (walletName) => `欢迎使用${walletName}`,
|
|
195
|
+
"tocPay.text.totalSavings": "总节省",
|
|
196
|
+
"tocPay.text.bestCombination": (walletName) => `可用${walletName}选项的最佳组合`,
|
|
197
|
+
"tocPay.text.recommended": "推荐",
|
|
198
|
+
"tocPay.text.edit": "编辑",
|
|
199
|
+
"tocPay.text.confirm": "确认",
|
|
200
|
+
"tocPay.text.unusedAndContinueToPayment": "不使用并继续付款",
|
|
201
|
+
"tocPay.text.walletPassAvailable": (walletName) => `暂无${walletName}可用`,
|
|
202
|
+
"tocPay.text.useWalletPass": (walletName) => `前往${walletName}`,
|
|
203
|
+
"tocPay.text.useWalletPassAdd": (walletName) => `前往${walletName}添加`,
|
|
204
|
+
"tocPay.text.editWalletPass": (walletName) => `修改优惠组合`,
|
|
205
|
+
"tocPay.text.skipAndContinueToPayment": "跳过并继续付款",
|
|
206
|
+
"tocPay.text.youMightHaveAnEligibleWalletPass": (walletName) => `您可能拥有符合条件的${walletName}`,
|
|
207
|
+
"tocPay.text.checkIfYouHaveAnyPointsCardRechargableCardOrVouchersToUse": "检查您是否有积分卡、充值卡或代金券可供使用",
|
|
208
|
+
"tocPay.text.addPointsCard": "如您有任何优惠券、储值卡、积分卡",
|
|
209
|
+
"tocPay.text.hasNoWalletPassAmount": "点击查看可激活的储值、积分、代金券选项",
|
|
210
|
+
"tocPay.text.multipleSelectionAvailable": "可多选",
|
|
211
|
+
"tocPay.text.youCanSelectMultipleWalletPassesToCombineForPayment": (walletName) => `您可以选择多个${walletName}进行组合付款`,
|
|
212
|
+
"tocPay.text.bestValueCombination": "最佳组合",
|
|
213
|
+
"tocPay.text.viewDetail": "查看详情"
|
|
170
214
|
},
|
|
171
215
|
"zh-HK": {
|
|
172
216
|
"tocPay.text.checkout": "結帳",
|
|
@@ -229,7 +273,7 @@ var locales_default = {
|
|
|
229
273
|
"tocPay.text.scanBarQrCode": "掃描條形碼/二維碼",
|
|
230
274
|
"tocPay.text.enterCodes": "輸入編碼",
|
|
231
275
|
"tocPay.text.searchDescribe": "請輸入卡片編碼或發行編碼",
|
|
232
|
-
"tocPay.text.walletPassEmpty":
|
|
276
|
+
"tocPay.text.walletPassEmpty": (walletName) => `沒有可使用的${walletName}`,
|
|
233
277
|
"tocPay.text.walletPassDisabled": "不可用",
|
|
234
278
|
"tocPay.text.walletPassPermanent": "永久有效",
|
|
235
279
|
"tocPay.text.walletPassCompleteTitle": "請點擊底部的“提交”按鈕完成支付",
|
|
@@ -238,6 +282,28 @@ var locales_default = {
|
|
|
238
282
|
"tocPay.text.walletSearchEmpty": "沒有查詢到任何結果。",
|
|
239
283
|
"tocPay.text.detectIncognitoConfirm": "目前處於無痕模式,錢包支付可能失敗,請複製連結在非無痕模式下繼續支付。",
|
|
240
284
|
"tocPay.text.copyLink": "復製链接",
|
|
241
|
-
"tocPay.text.copySuccess": "復製成功"
|
|
285
|
+
"tocPay.text.copySuccess": "復製成功",
|
|
286
|
+
"tocPay.text.walletName": (shopName) => `${shopName}錢包`,
|
|
287
|
+
"tocPay.text.bestValueFound": "找到最佳組合選擇!",
|
|
288
|
+
"tocPay.text.welcomeToUseWalletPass": (walletName) => `歡迎使用${walletName}`,
|
|
289
|
+
"tocPay.text.totalSavings": "總節省",
|
|
290
|
+
"tocPay.text.bestCombination": (walletName) => `可用${walletName}選項的最佳組合`,
|
|
291
|
+
"tocPay.text.recommended": "推薦",
|
|
292
|
+
"tocPay.text.edit": "編輯",
|
|
293
|
+
"tocPay.text.confirm": "確認",
|
|
294
|
+
"tocPay.text.unusedAndContinueToPayment": "不使用並繼續付款",
|
|
295
|
+
"tocPay.text.walletPassAvailable": (walletName) => `暂无${walletName} 可用`,
|
|
296
|
+
"tocPay.text.useWalletPass": (walletName) => `前往${walletName}`,
|
|
297
|
+
"tocPay.text.useWalletPassAdd": (walletName) => `前往${walletName}添加`,
|
|
298
|
+
"tocPay.text.editWalletPass": (walletName) => `修改優惠組合`,
|
|
299
|
+
"tocPay.text.skipAndContinueToPayment": "跳過並繼續付款",
|
|
300
|
+
"tocPay.text.youMightHaveAnEligibleWalletPass": (walletName) => `您可能擁有符合條件的${walletName}`,
|
|
301
|
+
"tocPay.text.checkIfYouHaveAnyPointsCardRechargableCardOrVouchersToUse": "檢查您是否有積分卡、充值卡或代金券可供使用",
|
|
302
|
+
"tocPay.text.addPointsCard": "如您有任何优惠券、储值卡、积分卡",
|
|
303
|
+
"tocPay.text.hasNoWalletPassAmount": "點擊查看可激活的儲值、積分、代金券選項",
|
|
304
|
+
"tocPay.text.multipleSelectionAvailable": "可多選",
|
|
305
|
+
"tocPay.text.youCanSelectMultipleWalletPassesToCombineForPayment": (walletName) => `您可以選擇多個${walletName}進行組合付款`,
|
|
306
|
+
"tocPay.text.bestValueCombination": "最佳組合",
|
|
307
|
+
"tocPay.text.viewDetail": "查看詳情"
|
|
242
308
|
}
|
|
243
309
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export interface FormState {
|
|
3
2
|
platform: 'pc' | 'h5' | '' | undefined;
|
|
4
3
|
order: any;
|
|
@@ -6,6 +5,10 @@ export interface FormState {
|
|
|
6
5
|
payCallback: (res?: any) => void;
|
|
7
6
|
history?: any;
|
|
8
7
|
payGroup?: PayGroup;
|
|
8
|
+
walletSetting: {
|
|
9
|
+
name: string;
|
|
10
|
+
popup_status: 0 | 1 | null;
|
|
11
|
+
};
|
|
9
12
|
}
|
|
10
13
|
export interface PayGroup {
|
|
11
14
|
order_id?: string;
|
|
@@ -25,11 +28,4 @@ export interface PayGroup {
|
|
|
25
28
|
pay_number?: string;
|
|
26
29
|
_order: any;
|
|
27
30
|
}
|
|
28
|
-
export declare const Provider:
|
|
29
|
-
state: FormState;
|
|
30
|
-
} & {
|
|
31
|
-
dispatch: (params: {
|
|
32
|
-
type: string;
|
|
33
|
-
payload: any;
|
|
34
|
-
}) => void;
|
|
35
|
-
}>;
|
|
31
|
+
export declare const Provider: any, Context: any;
|
|
@@ -32,6 +32,10 @@ var defaultState = {
|
|
|
32
32
|
payCallback: () => {
|
|
33
33
|
},
|
|
34
34
|
history: null,
|
|
35
|
+
walletSetting: {
|
|
36
|
+
name: "",
|
|
37
|
+
popup_status: null
|
|
38
|
+
},
|
|
35
39
|
payGroup: {
|
|
36
40
|
wait_amount: 0
|
|
37
41
|
}
|
|
@@ -48,6 +52,12 @@ var { Provider, Context } = (0, import_utils.miniRedux)({
|
|
|
48
52
|
(0, import_payGroup.syncPayGroupToStorage)(res);
|
|
49
53
|
return { ...state, payGroup: res };
|
|
50
54
|
},
|
|
55
|
+
setWalletSetting(state, payload) {
|
|
56
|
+
return { ...state, walletSetting: {
|
|
57
|
+
...state.walletSetting,
|
|
58
|
+
...payload
|
|
59
|
+
} };
|
|
60
|
+
},
|
|
51
61
|
init(state, payload) {
|
|
52
62
|
return { ...defaultState, ...payload };
|
|
53
63
|
}
|
|
@@ -32,3 +32,26 @@ export declare const getPaymentInit: (values: {
|
|
|
32
32
|
order_id?: string;
|
|
33
33
|
amount?: number;
|
|
34
34
|
}) => Promise<any>;
|
|
35
|
+
/**
|
|
36
|
+
* @title: 获取钱包名称和弹窗状态
|
|
37
|
+
* @description:
|
|
38
|
+
* @param {object} values
|
|
39
|
+
* @return {*}
|
|
40
|
+
* @Author: shengjie.zuo
|
|
41
|
+
* @member: 马天宇
|
|
42
|
+
* @Date: 2025-02-21 10:42
|
|
43
|
+
*/
|
|
44
|
+
export declare const getWalletNameAndPopupStatus: (values: {
|
|
45
|
+
setting_type?: string;
|
|
46
|
+
}) => Promise<{
|
|
47
|
+
wallet: {
|
|
48
|
+
name?: {
|
|
49
|
+
en: string;
|
|
50
|
+
'zh-CN': string;
|
|
51
|
+
'zh-HK': string;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
wallet_setting: {
|
|
55
|
+
popup_status?: 1 | 0;
|
|
56
|
+
};
|
|
57
|
+
}>;
|
|
@@ -21,7 +21,8 @@ var serve_exports = {};
|
|
|
21
21
|
__export(serve_exports, {
|
|
22
22
|
getPaymentInit: () => getPaymentInit,
|
|
23
23
|
getPaymentList: () => getPaymentList,
|
|
24
|
-
getPaymentsAndWalletPass: () => getPaymentsAndWalletPass
|
|
24
|
+
getPaymentsAndWalletPass: () => getPaymentsAndWalletPass,
|
|
25
|
+
getWalletNameAndPopupStatus: () => getWalletNameAndPopupStatus
|
|
25
26
|
});
|
|
26
27
|
module.exports = __toCommonJS(serve_exports);
|
|
27
28
|
var import_utils = require("../../../utils");
|
|
@@ -35,9 +36,7 @@ var getPaymentList = async (values) => {
|
|
|
35
36
|
);
|
|
36
37
|
let arr = [];
|
|
37
38
|
if ((0, import_utils2.isWx)()) {
|
|
38
|
-
arr = arr.concat([
|
|
39
|
-
"mw.google"
|
|
40
|
-
]);
|
|
39
|
+
arr = arr.concat(["mw.google"]);
|
|
41
40
|
}
|
|
42
41
|
if (!(0, import_utils2.isWx)()) {
|
|
43
42
|
arr = arr.concat(["globepay.wechat.jsapi", "superpay.wechat.h5"]);
|
|
@@ -60,7 +59,9 @@ var getPaymentList = async (values) => {
|
|
|
60
59
|
};
|
|
61
60
|
var getPaymentsAndWalletPass = async (values) => {
|
|
62
61
|
let { data } = await import_utils.request.getRequest().get("/h5/pay/order/payments-and-walletpass", values);
|
|
63
|
-
const walletPass = (data.payment_list || []).find(
|
|
62
|
+
const walletPass = (data.payment_list || []).find(
|
|
63
|
+
(d) => d.service === "pisell.wallet_pass"
|
|
64
|
+
);
|
|
64
65
|
return {
|
|
65
66
|
...data,
|
|
66
67
|
walletPass
|
|
@@ -70,9 +71,14 @@ var getPaymentInit = async (values) => {
|
|
|
70
71
|
let { data } = await import_utils.request.getRequest().post("/h5/pay/payment/init", values);
|
|
71
72
|
return data;
|
|
72
73
|
};
|
|
74
|
+
var getWalletNameAndPopupStatus = async (values) => {
|
|
75
|
+
const { data } = await import_utils.request.getRequest().get("/h5/wallet/setting", values);
|
|
76
|
+
return data;
|
|
77
|
+
};
|
|
73
78
|
// Annotate the CommonJS export names for ESM import in node:
|
|
74
79
|
0 && (module.exports = {
|
|
75
80
|
getPaymentInit,
|
|
76
81
|
getPaymentList,
|
|
77
|
-
getPaymentsAndWalletPass
|
|
82
|
+
getPaymentsAndWalletPass,
|
|
83
|
+
getWalletNameAndPopupStatus
|
|
78
84
|
});
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { PayGroup } from "./model";
|
|
2
|
+
import { WalletPassDataType } from "./PaymentMethods/WalletPass/serve";
|
|
2
3
|
/**
|
|
3
4
|
* 计算walletPass列表数据的总金额
|
|
4
5
|
* @param list
|
|
@@ -21,7 +22,7 @@ export declare const formatWalletPassParams: (payGroup: PayGroup) => {
|
|
|
21
22
|
order_id: string;
|
|
22
23
|
payment_group_id: number;
|
|
23
24
|
payments: {
|
|
24
|
-
amount:
|
|
25
|
+
amount: string;
|
|
25
26
|
wallet_pass_use_value: any;
|
|
26
27
|
voucher_id: any;
|
|
27
28
|
tag: any;
|
|
@@ -47,3 +48,4 @@ export declare const isFranchiseeShop: (path?: any, history?: any) => any;
|
|
|
47
48
|
*/
|
|
48
49
|
export declare const getFranchiseeShopId: (path?: any, history?: any) => number;
|
|
49
50
|
export declare const formatFranchiseeRoute: (url: string, history?: any) => string;
|
|
51
|
+
export declare const getAvailableMaxAmount: (data: WalletPassDataType) => string;
|
|
@@ -23,6 +23,7 @@ __export(utils_exports, {
|
|
|
23
23
|
formatFranchiseeRoute: () => formatFranchiseeRoute,
|
|
24
24
|
formatWalletPassList2PreparePayments: () => formatWalletPassList2PreparePayments,
|
|
25
25
|
formatWalletPassParams: () => formatWalletPassParams,
|
|
26
|
+
getAvailableMaxAmount: () => getAvailableMaxAmount,
|
|
26
27
|
getFranchiseeShopId: () => getFranchiseeShopId,
|
|
27
28
|
getIsWalletPassAndTripartitePayment: () => getIsWalletPassAndTripartitePayment,
|
|
28
29
|
isFranchiseeShop: () => isFranchiseeShop
|
|
@@ -31,13 +32,13 @@ module.exports = __toCommonJS(utils_exports);
|
|
|
31
32
|
var import_decimal = require("decimal.js");
|
|
32
33
|
var import_status = require("./status");
|
|
33
34
|
var calcWalletPassListAmount = (list) => {
|
|
34
|
-
return list.reduce((pre, cur) => pre.add(new import_decimal.Decimal(String(cur
|
|
35
|
+
return list.reduce((pre, cur) => pre.add(new import_decimal.Decimal(String(getAvailableMaxAmount(cur) || 0))), new import_decimal.Decimal("0")).toNumber();
|
|
35
36
|
};
|
|
36
37
|
var formatWalletPassList2PreparePayments = (list) => {
|
|
37
38
|
return (list || []).map((item) => {
|
|
38
39
|
return {
|
|
39
40
|
voucher_id: item.id || 0,
|
|
40
|
-
amount: Number(item
|
|
41
|
+
amount: Number(getAvailableMaxAmount(item)) || 0,
|
|
41
42
|
tag: item.tag || ""
|
|
42
43
|
};
|
|
43
44
|
});
|
|
@@ -46,7 +47,7 @@ var formatWalletPassParams = (payGroup) => {
|
|
|
46
47
|
const { order_id, payment_group_id, walletPass } = payGroup;
|
|
47
48
|
const payments = (walletPass == null ? void 0 : walletPass.cards.map((item) => {
|
|
48
49
|
return {
|
|
49
|
-
amount: item
|
|
50
|
+
amount: getAvailableMaxAmount(item),
|
|
50
51
|
wallet_pass_use_value: item.available_max_par_value,
|
|
51
52
|
voucher_id: item.id,
|
|
52
53
|
tag: item.tag,
|
|
@@ -81,12 +82,16 @@ var formatFranchiseeRoute = (url, history) => {
|
|
|
81
82
|
}
|
|
82
83
|
return url;
|
|
83
84
|
};
|
|
85
|
+
var getAvailableMaxAmount = (data) => {
|
|
86
|
+
return data.tag !== "point_card" ? data.available_max_amount : data == null ? void 0 : data.recommended_usage_amount;
|
|
87
|
+
};
|
|
84
88
|
// Annotate the CommonJS export names for ESM import in node:
|
|
85
89
|
0 && (module.exports = {
|
|
86
90
|
calcWalletPassListAmount,
|
|
87
91
|
formatFranchiseeRoute,
|
|
88
92
|
formatWalletPassList2PreparePayments,
|
|
89
93
|
formatWalletPassParams,
|
|
94
|
+
getAvailableMaxAmount,
|
|
90
95
|
getFranchiseeShopId,
|
|
91
96
|
getIsWalletPassAndTripartitePayment,
|
|
92
97
|
isFranchiseeShop
|