@pisell/private-materials 3.0.121 → 3.0.123
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 +3 -3
- package/build/lowcode/view.js +3 -3
- package/es/components/pay/toC/PaymentList/index.js +11 -4
- package/es/components/pay/toC/PaymentList/serve.d.ts +2 -0
- package/es/components/pay/toC/PaymentList/serve.js +9 -2
- package/es/components/pay/toC/PaymentMethods/index.js +2 -2
- package/lib/components/pay/toC/PaymentList/index.js +7 -4
- package/lib/components/pay/toC/PaymentList/serve.d.ts +2 -0
- package/lib/components/pay/toC/PaymentList/serve.js +5 -2
- package/lib/components/pay/toC/PaymentMethods/index.js +2 -2
- package/package.json +3 -3
|
@@ -145,13 +145,15 @@ var PaymentList = function PaymentList(props, ref) {
|
|
|
145
145
|
* @Date: 2024-08-16 10:53
|
|
146
146
|
*/
|
|
147
147
|
var init = function init(list) {
|
|
148
|
-
var _context$appHelper, _context$appHelper$co
|
|
148
|
+
var _context$appHelper, _context$appHelper$co;
|
|
149
149
|
// 打开loading
|
|
150
150
|
setLoading(true);
|
|
151
151
|
var platform = ((_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : (_context$appHelper$co = _context$appHelper.constants) === null || _context$appHelper$co === void 0 ? void 0 : _context$appHelper$co.platform) || 'h5';
|
|
152
152
|
|
|
153
153
|
// 过滤数据
|
|
154
|
-
var
|
|
154
|
+
var _filterPaymentList = filterPaymentList(list, platform),
|
|
155
|
+
paymentList = _filterPaymentList.paymentList,
|
|
156
|
+
walletPass = _filterPaymentList.walletPass;
|
|
155
157
|
|
|
156
158
|
// 当支付方式大于1的时候
|
|
157
159
|
if (paymentList.length > 0) {
|
|
@@ -165,7 +167,7 @@ var PaymentList = function PaymentList(props, ref) {
|
|
|
165
167
|
paymentTypeChange(first.service, first);
|
|
166
168
|
|
|
167
169
|
// 如果只有一个支付方式, 则直接支付
|
|
168
|
-
isAutoPayment(paymentList);
|
|
170
|
+
isAutoPayment(paymentList, walletPass);
|
|
169
171
|
}
|
|
170
172
|
|
|
171
173
|
// 解除loading
|
|
@@ -181,9 +183,14 @@ var PaymentList = function PaymentList(props, ref) {
|
|
|
181
183
|
* @Author: zhiwei.Wang
|
|
182
184
|
* @Date: 2024-08-16 10:53
|
|
183
185
|
*/
|
|
184
|
-
var isAutoPayment = function isAutoPayment(list) {
|
|
186
|
+
var isAutoPayment = function isAutoPayment(list, walletPass) {
|
|
185
187
|
var _list = list;
|
|
186
188
|
|
|
189
|
+
// 有钱包支付时 不自动触发支付
|
|
190
|
+
if (walletPass) {
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
|
|
187
194
|
// 只有一个支付方式时
|
|
188
195
|
if (_list.length === 1) {
|
|
189
196
|
var isOfflinePayment = _list.find(function (d) {
|
|
@@ -10,6 +10,7 @@ export declare const getPaymentList: (values: any) => Promise<{
|
|
|
10
10
|
message: string;
|
|
11
11
|
status: string;
|
|
12
12
|
paymentList: any[];
|
|
13
|
+
walletPass: any;
|
|
13
14
|
}>;
|
|
14
15
|
/**
|
|
15
16
|
* @title: 过滤支付列表
|
|
@@ -23,4 +24,5 @@ export declare const filterPaymentList: (list: any[], platform?: string) => {
|
|
|
23
24
|
message: string;
|
|
24
25
|
status: string;
|
|
25
26
|
paymentList: any[];
|
|
27
|
+
walletPass: any;
|
|
26
28
|
};
|
|
@@ -62,6 +62,11 @@ export var filterPaymentList = function filterPaymentList(list) {
|
|
|
62
62
|
var platform = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'h5';
|
|
63
63
|
var paymentList = _toConsumableArray(list);
|
|
64
64
|
var _paymentKeys = _toConsumableArray(paymentKeys);
|
|
65
|
+
|
|
66
|
+
// 找出walletPass
|
|
67
|
+
var walletPass = paymentList.find(function (d) {
|
|
68
|
+
return d.service === 'pisell.wallet_pass';
|
|
69
|
+
});
|
|
65
70
|
var arr = [];
|
|
66
71
|
|
|
67
72
|
// 微信环境去除支付宝支付、信用卡、谷歌支付
|
|
@@ -107,7 +112,8 @@ export var filterPaymentList = function filterPaymentList(list) {
|
|
|
107
112
|
message: '该店铺暂未启用支付功能',
|
|
108
113
|
// '该支付功能暂未启用',
|
|
109
114
|
status: 'error',
|
|
110
|
-
paymentList: []
|
|
115
|
+
paymentList: [],
|
|
116
|
+
walletPass: walletPass
|
|
111
117
|
};
|
|
112
118
|
}
|
|
113
119
|
|
|
@@ -130,6 +136,7 @@ export var filterPaymentList = function filterPaymentList(list) {
|
|
|
130
136
|
return {
|
|
131
137
|
message: '',
|
|
132
138
|
status: 'ready',
|
|
133
|
-
paymentList: paymentList
|
|
139
|
+
paymentList: paymentList,
|
|
140
|
+
walletPass: walletPass
|
|
134
141
|
};
|
|
135
142
|
};
|
|
@@ -30,7 +30,7 @@ var isOfflinePayment = function isOfflinePayment(type) {
|
|
|
30
30
|
if (isCustomPayment(type)) {
|
|
31
31
|
return true;
|
|
32
32
|
}
|
|
33
|
-
return ['pisell.bank_deposit', 'pisell.offline_payment', 'pisell.other.cashmanual', 'custom_bank_transfer'].includes(type);
|
|
33
|
+
return ['pisell.bank_deposit', 'pisell.offline_payment', 'pisell.other.cashmanual', 'pisell.custom_bank_transfer'].includes(type);
|
|
34
34
|
};
|
|
35
35
|
var PaymentMethods = function PaymentMethods(props, ref) {
|
|
36
36
|
var MWCreditCardRef = useRef(null);
|
|
@@ -159,7 +159,7 @@ var PaymentMethods = function PaymentMethods(props, ref) {
|
|
|
159
159
|
case 16:
|
|
160
160
|
return _context2.abrupt("return");
|
|
161
161
|
case 17:
|
|
162
|
-
if (!(type === 'superpay.wechat.
|
|
162
|
+
if (!(type === 'superpay.wechat.h5')) {
|
|
163
163
|
_context2.next = 21;
|
|
164
164
|
break;
|
|
165
165
|
}
|
|
@@ -86,21 +86,24 @@ var PaymentList = (props, ref) => {
|
|
|
86
86
|
return list;
|
|
87
87
|
};
|
|
88
88
|
const init = (list) => {
|
|
89
|
-
var _a2, _b2
|
|
89
|
+
var _a2, _b2;
|
|
90
90
|
setLoading(true);
|
|
91
91
|
const platform = ((_b2 = (_a2 = context.appHelper) == null ? void 0 : _a2.constants) == null ? void 0 : _b2.platform) || "h5";
|
|
92
|
-
const paymentList2
|
|
92
|
+
const { paymentList: paymentList2, walletPass } = (0, import_serve.filterPaymentList)(list, platform);
|
|
93
93
|
if (paymentList2.length > 0) {
|
|
94
94
|
let first = paymentList2[0];
|
|
95
95
|
setPaymentList(paymentList2);
|
|
96
96
|
paymentTypeChange(first.service, first);
|
|
97
|
-
isAutoPayment(paymentList2);
|
|
97
|
+
isAutoPayment(paymentList2, walletPass);
|
|
98
98
|
}
|
|
99
99
|
setLoading(false);
|
|
100
100
|
return paymentList2;
|
|
101
101
|
};
|
|
102
|
-
const isAutoPayment = (list) => {
|
|
102
|
+
const isAutoPayment = (list, walletPass) => {
|
|
103
103
|
const _list = list;
|
|
104
|
+
if (walletPass) {
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
104
107
|
if (_list.length === 1) {
|
|
105
108
|
let isOfflinePayment = _list.find(
|
|
106
109
|
(d) => offline.find((t) => d.service.includes(t))
|
|
@@ -10,6 +10,7 @@ export declare const getPaymentList: (values: any) => Promise<{
|
|
|
10
10
|
message: string;
|
|
11
11
|
status: string;
|
|
12
12
|
paymentList: any[];
|
|
13
|
+
walletPass: any;
|
|
13
14
|
}>;
|
|
14
15
|
/**
|
|
15
16
|
* @title: 过滤支付列表
|
|
@@ -23,4 +24,5 @@ export declare const filterPaymentList: (list: any[], platform?: string) => {
|
|
|
23
24
|
message: string;
|
|
24
25
|
status: string;
|
|
25
26
|
paymentList: any[];
|
|
27
|
+
walletPass: any;
|
|
26
28
|
};
|
|
@@ -34,6 +34,7 @@ var getPaymentList = async (values) => {
|
|
|
34
34
|
var filterPaymentList = (list, platform = "h5") => {
|
|
35
35
|
let paymentList = [...list];
|
|
36
36
|
let _paymentKeys = [...import_status.paymentKeys];
|
|
37
|
+
const walletPass = paymentList.find((d) => d.service === "pisell.wallet_pass");
|
|
37
38
|
let arr = [];
|
|
38
39
|
if (!(0, import_utils2.isWx)()) {
|
|
39
40
|
arr = arr.concat(["globepay.wechat.jsapi", "superpay.wechat.h5"]);
|
|
@@ -53,7 +54,8 @@ var filterPaymentList = (list, platform = "h5") => {
|
|
|
53
54
|
message: "该店铺暂未启用支付功能",
|
|
54
55
|
// '该支付功能暂未启用',
|
|
55
56
|
status: "error",
|
|
56
|
-
paymentList: []
|
|
57
|
+
paymentList: [],
|
|
58
|
+
walletPass
|
|
57
59
|
};
|
|
58
60
|
}
|
|
59
61
|
paymentList = paymentList.map((d) => {
|
|
@@ -73,7 +75,8 @@ var filterPaymentList = (list, platform = "h5") => {
|
|
|
73
75
|
return {
|
|
74
76
|
message: "",
|
|
75
77
|
status: "ready",
|
|
76
|
-
paymentList
|
|
78
|
+
paymentList,
|
|
79
|
+
walletPass
|
|
77
80
|
};
|
|
78
81
|
};
|
|
79
82
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -59,7 +59,7 @@ var isOfflinePayment = (type) => {
|
|
|
59
59
|
"pisell.bank_deposit",
|
|
60
60
|
"pisell.offline_payment",
|
|
61
61
|
"pisell.other.cashmanual",
|
|
62
|
-
"custom_bank_transfer"
|
|
62
|
+
"pisell.custom_bank_transfer"
|
|
63
63
|
].includes(type);
|
|
64
64
|
};
|
|
65
65
|
var PaymentMethods = (props, ref) => {
|
|
@@ -124,7 +124,7 @@ var PaymentMethods = (props, ref) => {
|
|
|
124
124
|
await ((_d = SuperPayAliPayH5Ref2.current) == null ? void 0 : _d.init({ payGroup }));
|
|
125
125
|
return;
|
|
126
126
|
}
|
|
127
|
-
if (type === "superpay.wechat.
|
|
127
|
+
if (type === "superpay.wechat.h5") {
|
|
128
128
|
await ((_e = SuperPayWxPayH5Ref2.current) == null ? void 0 : _e.init({ payGroup }));
|
|
129
129
|
return;
|
|
130
130
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/private-materials",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.123",
|
|
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/utils": "1.0.28",
|
|
63
62
|
"@pisell/icon": "0.0.11",
|
|
64
|
-
"@pisell/
|
|
63
|
+
"@pisell/utils": "1.0.28",
|
|
64
|
+
"@pisell/materials": "3.0.39",
|
|
65
65
|
"@pisell/date-picker": "1.0.97"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|