component-sanzhizhou 1.2.11 → 1.2.13
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/dist/lib/Tool.js +1 -1
- package/dist/lib/product-detail-link.js +4 -2
- package/dist/pay/qr.d.ts +1 -0
- package/dist/pay/qr.js +5 -3
- package/dist/pay/recharge.d.ts +5 -0
- package/dist/pay/recharge.js +17 -5
- package/dist/types/Pay.d.ts +2 -0
- package/dist/types/Trade.d.ts +1 -0
- package/package.json +1 -1
package/dist/lib/Tool.js
CHANGED
|
@@ -43,7 +43,7 @@ export var getProductDetailUrl = function getProductDetailUrl(_ref) {
|
|
|
43
43
|
var platform = _ref.platform,
|
|
44
44
|
skuId = _ref.skuId,
|
|
45
45
|
query = _ref.query;
|
|
46
|
-
if (skuId
|
|
46
|
+
if (!skuId) {
|
|
47
47
|
return '';
|
|
48
48
|
}
|
|
49
49
|
var build = PLATFORM_URL_BUILDERS[platform];
|
|
@@ -75,13 +75,15 @@ var ProductDetailLink = function ProductDetailLink(_ref2) {
|
|
|
75
75
|
// 客户端内通过桥接在本机浏览器打开,避免新开浏览器标签页
|
|
76
76
|
if (isInClient()) {
|
|
77
77
|
var _window$getBridge, _window;
|
|
78
|
+
console.log('ProductDetailLink handleClick in client:', event);
|
|
78
79
|
var bridge = (_window$getBridge = (_window = window).getBridge) === null || _window$getBridge === void 0 ? void 0 : _window$getBridge.call(_window);
|
|
79
80
|
if (bridge !== null && bridge !== void 0 && bridge.openLocalBrowser) {
|
|
80
81
|
event.preventDefault();
|
|
81
82
|
bridge.openLocalBrowser(href);
|
|
83
|
+
return;
|
|
82
84
|
}
|
|
83
85
|
}
|
|
84
|
-
onClick === null || onClick === void 0
|
|
86
|
+
return onClick === null || onClick === void 0 ? void 0 : onClick(event);
|
|
85
87
|
};
|
|
86
88
|
return /*#__PURE__*/React.createElement("a", _extends({
|
|
87
89
|
href: href,
|
package/dist/pay/qr.d.ts
CHANGED
package/dist/pay/qr.js
CHANGED
|
@@ -30,7 +30,8 @@ var UserVipOrderPayQr = function UserVipOrderPayQr(_ref) {
|
|
|
30
30
|
_ref$size = _ref.size,
|
|
31
31
|
size = _ref$size === void 0 ? 260 : _ref$size,
|
|
32
32
|
productKind = _ref.productKind,
|
|
33
|
-
env = _ref.env
|
|
33
|
+
env = _ref.env,
|
|
34
|
+
balanceType = _ref.balanceType;
|
|
34
35
|
var _useState = useState(''),
|
|
35
36
|
_useState2 = _slicedToArray(_useState, 2),
|
|
36
37
|
qrUrl = _useState2[0],
|
|
@@ -58,7 +59,7 @@ var UserVipOrderPayQr = function UserVipOrderPayQr(_ref) {
|
|
|
58
59
|
var _useRequest = useRequest(function () {
|
|
59
60
|
var postQuery = {
|
|
60
61
|
pagePath: "pages/recharge/index",
|
|
61
|
-
pathQuery: "moneyAmount=".concat(moneyAmount, "&productCount=").concat(productCount, "&userToken=").concat(getLocalUserInfo().sid || '', "&productKind=").concat(productKind, "&productTypeId=").concat(vipId, "&payChannel=").concat(payChannel),
|
|
62
|
+
pathQuery: "moneyAmount=".concat(moneyAmount, "&productCount=").concat(productCount, "&userToken=").concat(getLocalUserInfo().sid || '', "&productKind=").concat(productKind, "&productTypeId=").concat(vipId, "&payChannel=").concat(payChannel).concat(balanceType ? "&balanceType=".concat(balanceType) : ''),
|
|
62
63
|
couponCode: couponCode,
|
|
63
64
|
envVersion: getApiEnv() === 'local' ? "develop" : 'release'
|
|
64
65
|
};
|
|
@@ -91,7 +92,8 @@ var UserVipOrderPayQr = function UserVipOrderPayQr(_ref) {
|
|
|
91
92
|
userId: 0,
|
|
92
93
|
payChannel: 'alipay',
|
|
93
94
|
couponCode: couponCode,
|
|
94
|
-
userToken: getLocalUserInfo().sid || ''
|
|
95
|
+
userToken: getLocalUserInfo().sid || '',
|
|
96
|
+
balanceType: balanceType
|
|
95
97
|
}, {
|
|
96
98
|
apiUrl: apiUrl,
|
|
97
99
|
env: env
|
package/dist/pay/recharge.d.ts
CHANGED
|
@@ -13,6 +13,11 @@ interface Props {
|
|
|
13
13
|
maxPrice?: number;
|
|
14
14
|
onHandSuccess: () => void;
|
|
15
15
|
env?: Global.Env;
|
|
16
|
+
balanceTypeOptions?: {
|
|
17
|
+
label: React.ReactNode;
|
|
18
|
+
value: Pay.BalanceType;
|
|
19
|
+
}[];
|
|
20
|
+
defaultBalanceType?: Pay.BalanceType;
|
|
16
21
|
}
|
|
17
22
|
declare const PayRecharge: React.FC<Props>;
|
|
18
23
|
export default PayRecharge;
|
package/dist/pay/recharge.js
CHANGED
|
@@ -21,7 +21,7 @@ var BaseDict = {
|
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
23
|
var PayRecharge = function PayRecharge(_ref) {
|
|
24
|
-
var _PayChannelList$filte
|
|
24
|
+
var _PayChannelList$filte, _balanceTypeOptions$;
|
|
25
25
|
var appId = _ref.appId,
|
|
26
26
|
apiUrl = _ref.apiUrl,
|
|
27
27
|
nickName = _ref.nickName,
|
|
@@ -41,7 +41,9 @@ var PayRecharge = function PayRecharge(_ref) {
|
|
|
41
41
|
_ref$maxPrice = _ref.maxPrice,
|
|
42
42
|
maxPrice = _ref$maxPrice === void 0 ? 5000 : _ref$maxPrice,
|
|
43
43
|
onHandSuccess = _ref.onHandSuccess,
|
|
44
|
-
env = _ref.env
|
|
44
|
+
env = _ref.env,
|
|
45
|
+
balanceTypeOptions = _ref.balanceTypeOptions,
|
|
46
|
+
defaultBalanceType = _ref.defaultBalanceType;
|
|
45
47
|
var _useState = useState(((_PayChannelList$filte = PayChannelList.filter(function (items) {
|
|
46
48
|
var itemList = items.childrenList.filter(function (item) {
|
|
47
49
|
return item.name === defaultPayChannel;
|
|
@@ -55,7 +57,8 @@ var PayRecharge = function PayRecharge(_ref) {
|
|
|
55
57
|
setSelectPayChannel = _useState2[1];
|
|
56
58
|
var _useState3 = useState({
|
|
57
59
|
moneyAmount: defaultPrice,
|
|
58
|
-
payChannel: defaultPayChannel
|
|
60
|
+
payChannel: defaultPayChannel,
|
|
61
|
+
balanceType: defaultBalanceType || (balanceTypeOptions === null || balanceTypeOptions === void 0 || (_balanceTypeOptions$ = balanceTypeOptions[0]) === null || _balanceTypeOptions$ === void 0 ? void 0 : _balanceTypeOptions$.value)
|
|
59
62
|
}),
|
|
60
63
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
61
64
|
formData = _useState4[0],
|
|
@@ -118,7 +121,15 @@ var PayRecharge = function PayRecharge(_ref) {
|
|
|
118
121
|
onFinish: onMakeQr
|
|
119
122
|
}, step === 'pay-channel' && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Form.Item, {
|
|
120
123
|
label: formatMessage('账号')
|
|
121
|
-
}, /*#__PURE__*/React.createElement("strong", null, nickName)), /*#__PURE__*/React.createElement(Form.Item, {
|
|
124
|
+
}, /*#__PURE__*/React.createElement("strong", null, nickName)), (balanceTypeOptions || []).length > 0 && /*#__PURE__*/React.createElement(Form.Item, {
|
|
125
|
+
name: "balanceType",
|
|
126
|
+
label: formatMessage('余额类别')
|
|
127
|
+
}, /*#__PURE__*/React.createElement(Radio.Group, null, (balanceTypeOptions || []).map(function (item) {
|
|
128
|
+
return /*#__PURE__*/React.createElement(Radio, {
|
|
129
|
+
key: item.value,
|
|
130
|
+
value: item.value
|
|
131
|
+
}, item.label);
|
|
132
|
+
}))), /*#__PURE__*/React.createElement(Form.Item, {
|
|
122
133
|
label: formatMessage('金额'),
|
|
123
134
|
name: "moneyAmount",
|
|
124
135
|
rules: [{
|
|
@@ -196,7 +207,8 @@ var PayRecharge = function PayRecharge(_ref) {
|
|
|
196
207
|
size: size,
|
|
197
208
|
env: env,
|
|
198
209
|
productKind: productKind,
|
|
199
|
-
couponCode: ""
|
|
210
|
+
couponCode: "",
|
|
211
|
+
balanceType: formData.balanceType
|
|
200
212
|
})), /*#__PURE__*/React.createElement(Divider, null), /*#__PURE__*/React.createElement("div", {
|
|
201
213
|
className: "ssz-submits"
|
|
202
214
|
}, /*#__PURE__*/React.createElement("div", null, ['qr-show'].includes(step) && /*#__PURE__*/React.createElement(Button, {
|
package/dist/types/Pay.d.ts
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
declare namespace Pay {
|
|
3
3
|
type PayChannel = Trade.PayChannel;
|
|
4
4
|
type ProductKind = 'vip' | 'vip-card' | 'recharge' | 'added-service';
|
|
5
|
+
type BalanceType = 'software-fee' | 'package-fee';
|
|
5
6
|
interface ChannelList {
|
|
6
7
|
groupTitle: string;
|
|
7
8
|
disabled?: boolean;
|
|
@@ -17,6 +18,7 @@ declare namespace Pay {
|
|
|
17
18
|
interface RechargeFormData {
|
|
18
19
|
moneyAmount: number;
|
|
19
20
|
payChannel: PayChannel;
|
|
21
|
+
balanceType?: BalanceType;
|
|
20
22
|
}
|
|
21
23
|
interface GetPaymentQr {
|
|
22
24
|
qrUrl: string;
|
package/dist/types/Trade.d.ts
CHANGED