@pisell/private-materials 3.0.112 → 3.0.113
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.js +1 -1
- package/es/components/pay/toC/PaymentList/index.js +12 -9
- package/es/components/pay/toC/PaymentList/utils.js +2 -1
- package/es/components/pay/toC/index.js +3 -2
- package/es/components/pay/toC/locales.d.ts +1 -0
- package/es/components/pay/toC/locales.js +5 -4
- package/lib/components/pay/toC/PaymentList/index.js +7 -7
- package/lib/components/pay/toC/PaymentList/utils.js +1 -1
- package/lib/components/pay/toC/index.js +1 -0
- package/lib/components/pay/toC/locales.d.ts +1 -0
- package/lib/components/pay/toC/locales.js +5 -4
- package/package.json +2 -2
|
@@ -153,17 +153,20 @@ var PaymentList = function PaymentList(props, ref) {
|
|
|
153
153
|
// 过滤数据
|
|
154
154
|
var paymentList = (_filterPaymentList = filterPaymentList(list, platform)) === null || _filterPaymentList === void 0 ? void 0 : _filterPaymentList.paymentList;
|
|
155
155
|
|
|
156
|
-
//
|
|
157
|
-
|
|
156
|
+
// 当支付方式大于1的时候
|
|
157
|
+
if (paymentList.length > 1) {
|
|
158
|
+
// 默认支付
|
|
159
|
+
var first = paymentList[0];
|
|
158
160
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
+
// 设置支付列表
|
|
162
|
+
setPaymentList(paymentList);
|
|
161
163
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
+
// 设置默认的支付方式
|
|
165
|
+
paymentTypeChange(first.service, first);
|
|
164
166
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
+
// 如果只有一个支付方式, 则直接支付
|
|
168
|
+
isAutoPayment(paymentList);
|
|
169
|
+
}
|
|
167
170
|
|
|
168
171
|
// 解除loading
|
|
169
172
|
setLoading(false);
|
|
@@ -259,7 +262,7 @@ var PaymentList = function PaymentList(props, ref) {
|
|
|
259
262
|
// 没有支付方式展示空
|
|
260
263
|
if (!_paymentList.length) {
|
|
261
264
|
return /*#__PURE__*/React.createElement(PisellEmpty, {
|
|
262
|
-
|
|
265
|
+
description: locales.getText('tocPay.text.noAvailablePaymentMethods')
|
|
263
266
|
});
|
|
264
267
|
}
|
|
265
268
|
return /*#__PURE__*/React.createElement(PisellCheckboxGroup, {
|
|
@@ -27,8 +27,9 @@ export var calculateSurcharge = function calculateSurcharge(paymentList, amount)
|
|
|
27
27
|
|
|
28
28
|
// 分别计算出每一项的手续费 百分比 * amount + 固定金额
|
|
29
29
|
var fees = surcharge_config.map(function (config) {
|
|
30
|
+
var _config$percent;
|
|
30
31
|
// 后端字段不统一?, 做下兼容
|
|
31
|
-
var percentageFee = parseFloat(config.percent
|
|
32
|
+
var percentageFee = parseFloat((_config$percent = config.percent) !== null && _config$percent !== void 0 ? _config$percent : config.percentage) * Number(amount);
|
|
32
33
|
var totalFee = percentageFee + parseFloat(config.amount);
|
|
33
34
|
return totalFee;
|
|
34
35
|
});
|
|
@@ -207,16 +207,17 @@ var ToCPay = function ToCPay(props, ref) {
|
|
|
207
207
|
setTimeout(function () {
|
|
208
208
|
setLoading(false);
|
|
209
209
|
}, 100);
|
|
210
|
-
_context2.next =
|
|
210
|
+
_context2.next = 15;
|
|
211
211
|
break;
|
|
212
212
|
case 11:
|
|
213
213
|
_context2.prev = 11;
|
|
214
214
|
_context2.t0 = _context2["catch"](0);
|
|
215
|
+
console.log('err', _context2.t0);
|
|
215
216
|
payCallback({
|
|
216
217
|
key: 'fail',
|
|
217
218
|
data: {}
|
|
218
219
|
});
|
|
219
|
-
case
|
|
220
|
+
case 15:
|
|
220
221
|
case "end":
|
|
221
222
|
return _context2.stop();
|
|
222
223
|
}
|
|
@@ -65,6 +65,7 @@ declare const _default: {
|
|
|
65
65
|
'tocPay.text.walletPassCompleteTitle': string;
|
|
66
66
|
'tocPay.text.walletPassNoExtraPay': string;
|
|
67
67
|
'tocPay.text.walletCanPay': string;
|
|
68
|
+
'tocPay.text.paymentInstructions': string;
|
|
68
69
|
'tocPay.text.walletSearchEmpty': string;
|
|
69
70
|
};
|
|
70
71
|
'zh-CN': {
|
|
@@ -65,6 +65,7 @@ export default {
|
|
|
65
65
|
'tocPay.text.walletPassCompleteTitle': 'Please click ‘Submit’ button at the bottom to complete',
|
|
66
66
|
'tocPay.text.walletPassNoExtraPay': 'No extra pay needed',
|
|
67
67
|
'tocPay.text.walletCanPay': 'You can use the balance in your wallet pass or other eligible types of voucher to pay.',
|
|
68
|
+
'tocPay.text.paymentInstructions': 'Instructions',
|
|
68
69
|
'tocPay.text.walletSearchEmpty': 'No results found.'
|
|
69
70
|
},
|
|
70
71
|
'zh-CN': {
|
|
@@ -119,7 +120,7 @@ export default {
|
|
|
119
120
|
'tocPay.text.searchResult': '搜索结果',
|
|
120
121
|
'tocPay.text.select': '选择',
|
|
121
122
|
'tocPay.text.couponCodesAdded': '编码添加',
|
|
122
|
-
'tocPay.text.redeem': '
|
|
123
|
+
'tocPay.text.redeem': '兑换',
|
|
123
124
|
'tocPay.text.howToPay': '您想如何付款?',
|
|
124
125
|
'tocPay.text.congrats': '恭喜,您钱包内有',
|
|
125
126
|
'tocPay.text.creditHaveBeen': '可以用于支付订单金额。',
|
|
@@ -127,7 +128,7 @@ export default {
|
|
|
127
128
|
'tocPay.text.scanBarQrCode': '扫描条形码/二维码',
|
|
128
129
|
'tocPay.text.enterCodes': '输入编码',
|
|
129
130
|
'tocPay.text.searchDescribe': '请输入卡片编码或发行编码',
|
|
130
|
-
'tocPay.text.walletPassEmpty': '
|
|
131
|
+
'tocPay.text.walletPassEmpty': '没有可使用的卡片,请扫描或搜索卡片',
|
|
131
132
|
'tocPay.text.walletPassDisabled': '不可用',
|
|
132
133
|
'tocPay.text.walletPassPermanent': '永久有效',
|
|
133
134
|
'tocPay.text.walletPassCompleteTitle': '请点击底部的“提交”按钮完成支付',
|
|
@@ -187,7 +188,7 @@ export default {
|
|
|
187
188
|
'tocPay.text.searchResult': '搜索結果',
|
|
188
189
|
'tocPay.text.select': '選擇',
|
|
189
190
|
'tocPay.text.couponCodesAdded': '編碼添加',
|
|
190
|
-
'tocPay.text.redeem': '
|
|
191
|
+
'tocPay.text.redeem': '兌換',
|
|
191
192
|
'tocPay.text.howToPay': '您想如何付款?',
|
|
192
193
|
'tocPay.text.congrats': '恭喜,您錢包內有',
|
|
193
194
|
'tocPay.text.creditHaveBeen': '可以用於支付訂單金額。',
|
|
@@ -195,7 +196,7 @@ export default {
|
|
|
195
196
|
'tocPay.text.scanBarQrCode': '掃描條形碼/二維碼',
|
|
196
197
|
'tocPay.text.enterCodes': '輸入編碼',
|
|
197
198
|
'tocPay.text.searchDescribe': '請輸入卡片編碼或發行編碼',
|
|
198
|
-
'tocPay.text.walletPassEmpty': '
|
|
199
|
+
'tocPay.text.walletPassEmpty': '沒有可使用的卡片,請掃描或搜尋卡片',
|
|
199
200
|
'tocPay.text.walletPassDisabled': '不可用',
|
|
200
201
|
'tocPay.text.walletPassPermanent': '永久有效',
|
|
201
202
|
'tocPay.text.walletPassCompleteTitle': '請點擊底部的“提交”按鈕完成支付',
|
|
@@ -90,10 +90,12 @@ var PaymentList = (props, ref) => {
|
|
|
90
90
|
setLoading(true);
|
|
91
91
|
const platform = ((_b2 = (_a2 = context.appHelper) == null ? void 0 : _a2.constants) == null ? void 0 : _b2.platform) || "h5";
|
|
92
92
|
const paymentList2 = (_c = (0, import_serve.filterPaymentList)(list, platform)) == null ? void 0 : _c.paymentList;
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
93
|
+
if (paymentList2.length > 1) {
|
|
94
|
+
let first = paymentList2[0];
|
|
95
|
+
setPaymentList(paymentList2);
|
|
96
|
+
paymentTypeChange(first.service, first);
|
|
97
|
+
isAutoPayment(paymentList2);
|
|
98
|
+
}
|
|
97
99
|
setLoading(false);
|
|
98
100
|
return paymentList2;
|
|
99
101
|
};
|
|
@@ -145,9 +147,7 @@ var PaymentList = (props, ref) => {
|
|
|
145
147
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
146
148
|
import_materials.PisellEmpty,
|
|
147
149
|
{
|
|
148
|
-
|
|
149
|
-
"tocPay.text.noAvailablePaymentMethods"
|
|
150
|
-
)
|
|
150
|
+
description: import_utils2.locales.getText("tocPay.text.noAvailablePaymentMethods")
|
|
151
151
|
}
|
|
152
152
|
);
|
|
153
153
|
}
|
|
@@ -30,7 +30,7 @@ var calculateSurcharge = (paymentList, amount) => {
|
|
|
30
30
|
return payment;
|
|
31
31
|
}
|
|
32
32
|
const fees = surcharge_config.map((config) => {
|
|
33
|
-
const percentageFee = parseFloat(config.percent
|
|
33
|
+
const percentageFee = parseFloat(config.percent ?? config.percentage) * Number(amount);
|
|
34
34
|
const totalFee = percentageFee + parseFloat(config.amount);
|
|
35
35
|
return totalFee;
|
|
36
36
|
});
|
|
@@ -65,6 +65,7 @@ declare const _default: {
|
|
|
65
65
|
'tocPay.text.walletPassCompleteTitle': string;
|
|
66
66
|
'tocPay.text.walletPassNoExtraPay': string;
|
|
67
67
|
'tocPay.text.walletCanPay': string;
|
|
68
|
+
'tocPay.text.paymentInstructions': string;
|
|
68
69
|
'tocPay.text.walletSearchEmpty': string;
|
|
69
70
|
};
|
|
70
71
|
'zh-CN': {
|
|
@@ -89,6 +89,7 @@ var locales_default = {
|
|
|
89
89
|
"tocPay.text.walletPassCompleteTitle": "Please click ‘Submit’ button at the bottom to complete",
|
|
90
90
|
"tocPay.text.walletPassNoExtraPay": "No extra pay needed",
|
|
91
91
|
"tocPay.text.walletCanPay": "You can use the balance in your wallet pass or other eligible types of voucher to pay.",
|
|
92
|
+
"tocPay.text.paymentInstructions": "Instructions",
|
|
92
93
|
"tocPay.text.walletSearchEmpty": "No results found."
|
|
93
94
|
},
|
|
94
95
|
"zh-CN": {
|
|
@@ -143,7 +144,7 @@ var locales_default = {
|
|
|
143
144
|
"tocPay.text.searchResult": "搜索结果",
|
|
144
145
|
"tocPay.text.select": "选择",
|
|
145
146
|
"tocPay.text.couponCodesAdded": "编码添加",
|
|
146
|
-
"tocPay.text.redeem": "
|
|
147
|
+
"tocPay.text.redeem": "兑换",
|
|
147
148
|
"tocPay.text.howToPay": "您想如何付款?",
|
|
148
149
|
"tocPay.text.congrats": "恭喜,您钱包内有",
|
|
149
150
|
"tocPay.text.creditHaveBeen": "可以用于支付订单金额。",
|
|
@@ -151,7 +152,7 @@ var locales_default = {
|
|
|
151
152
|
"tocPay.text.scanBarQrCode": "扫描条形码/二维码",
|
|
152
153
|
"tocPay.text.enterCodes": "输入编码",
|
|
153
154
|
"tocPay.text.searchDescribe": "请输入卡片编码或发行编码",
|
|
154
|
-
"tocPay.text.walletPassEmpty": "
|
|
155
|
+
"tocPay.text.walletPassEmpty": "没有可使用的卡片,请扫描或搜索卡片",
|
|
155
156
|
"tocPay.text.walletPassDisabled": "不可用",
|
|
156
157
|
"tocPay.text.walletPassPermanent": "永久有效",
|
|
157
158
|
"tocPay.text.walletPassCompleteTitle": "请点击底部的“提交”按钮完成支付",
|
|
@@ -211,7 +212,7 @@ var locales_default = {
|
|
|
211
212
|
"tocPay.text.searchResult": "搜索結果",
|
|
212
213
|
"tocPay.text.select": "選擇",
|
|
213
214
|
"tocPay.text.couponCodesAdded": "編碼添加",
|
|
214
|
-
"tocPay.text.redeem": "
|
|
215
|
+
"tocPay.text.redeem": "兌換",
|
|
215
216
|
"tocPay.text.howToPay": "您想如何付款?",
|
|
216
217
|
"tocPay.text.congrats": "恭喜,您錢包內有",
|
|
217
218
|
"tocPay.text.creditHaveBeen": "可以用於支付訂單金額。",
|
|
@@ -219,7 +220,7 @@ var locales_default = {
|
|
|
219
220
|
"tocPay.text.scanBarQrCode": "掃描條形碼/二維碼",
|
|
220
221
|
"tocPay.text.enterCodes": "輸入編碼",
|
|
221
222
|
"tocPay.text.searchDescribe": "請輸入卡片編碼或發行編碼",
|
|
222
|
-
"tocPay.text.walletPassEmpty": "
|
|
223
|
+
"tocPay.text.walletPassEmpty": "沒有可使用的卡片,請掃描或搜尋卡片",
|
|
223
224
|
"tocPay.text.walletPassDisabled": "不可用",
|
|
224
225
|
"tocPay.text.walletPassPermanent": "永久有效",
|
|
225
226
|
"tocPay.text.walletPassCompleteTitle": "請點擊底部的“提交”按鈕完成支付",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/private-materials",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.113",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
"rc-virtual-list": "^3.11.3",
|
|
61
61
|
"decimal.js": "^10.4.3",
|
|
62
62
|
"@pisell/utils": "1.0.28",
|
|
63
|
-
"@pisell/icon": "0.0.11",
|
|
64
63
|
"@pisell/materials": "3.0.36",
|
|
64
|
+
"@pisell/icon": "0.0.11",
|
|
65
65
|
"@pisell/date-picker": "1.0.97"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|