component-sanzhizhou 1.2.12 → 1.3.0
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.d.ts +1 -1
- package/dist/pay/qr.d.ts +1 -0
- package/dist/pay/qr.js +5 -3
- package/dist/pay/recharge-moneyAmount-alt.less +1 -0
- package/dist/pay/recharge-rule.d.ts +1 -0
- package/dist/pay/recharge-rule.js +6 -2
- package/dist/pay/recharge.css.js +1 -1
- package/dist/pay/recharge.d.ts +5 -0
- package/dist/pay/recharge.js +27 -12
- package/dist/types/Pay.d.ts +2 -0
- package/dist/types/RechargeRule.d.ts +1 -0
- package/dist/types/Trade.d.ts +1 -0
- package/package.json +1 -1
package/dist/lib/Tool.d.ts
CHANGED
|
@@ -162,7 +162,7 @@ declare const Tool: {
|
|
|
162
162
|
getTitleByPath(path: string): string;
|
|
163
163
|
getDirByPath(path: string): string;
|
|
164
164
|
h5Pay(query: Pay.H5PayQuery): void;
|
|
165
|
-
notification(type: "
|
|
165
|
+
notification(type: "info" | "warning" | "error" | "success", message: string, description?: import("react").ReactNode, options?: import("./notification").NotificationOption): void;
|
|
166
166
|
notificationSuccess(message: string, description?: import("react").ReactNode, options?: import("./notification").NotificationOption): void;
|
|
167
167
|
notificationError(message: string, description?: import("react").ReactNode, options?: import("./notification").NotificationOption): void;
|
|
168
168
|
notificationWarning(message: string, description?: import("react").ReactNode, options?: import("./notification").NotificationOption): void;
|
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
|
|
@@ -12,16 +12,20 @@ var RechargeRule = function RechargeRule(_ref) {
|
|
|
12
12
|
var formItemSpan = _ref.formItemSpan,
|
|
13
13
|
env = _ref.env,
|
|
14
14
|
money = _ref.money,
|
|
15
|
-
onList = _ref.onList
|
|
15
|
+
onList = _ref.onList,
|
|
16
|
+
balanceType = _ref.balanceType;
|
|
16
17
|
var _useState = useState([]),
|
|
17
18
|
_useState2 = _slicedToArray(_useState, 2),
|
|
18
19
|
listData = _useState2[0],
|
|
19
20
|
setListData = _useState2[1];
|
|
20
21
|
var _useRequest = useRequest(function () {
|
|
21
|
-
return RechargeRuleController.list({
|
|
22
|
+
return RechargeRuleController.list({
|
|
23
|
+
balanceType: balanceType
|
|
24
|
+
}, {
|
|
22
25
|
env: env
|
|
23
26
|
});
|
|
24
27
|
}, {
|
|
28
|
+
refreshDeps: [balanceType],
|
|
25
29
|
onSuccess: function onSuccess(result) {
|
|
26
30
|
result.sort(function (a, b) {
|
|
27
31
|
return a.rechargeMoney - b.rechargeMoney;
|
package/dist/pay/recharge.css.js
CHANGED
|
@@ -3,5 +3,5 @@ export default {
|
|
|
3
3
|
PayRecharge: styled.div.withConfig({
|
|
4
4
|
displayName: "PayRecharge",
|
|
5
5
|
componentId: "component-sanzhizhou__sc-1np6liz-0"
|
|
6
|
-
})([".ssz-recharge-form-moneyAmount-input{input{
|
|
6
|
+
})([".ssz-recharge-form-moneyAmount-input{input{}}.ssz-groupItems{padding:0 0 12px 0;}.ssz-submits{display:flex;flex-direction:row;justify-content:space-between;padding:0 0 18px;}.ssz-groupTitle{font-size:14px;color:#777;font-weight:300;padding:0 0 3px 0;}.ant-radio-wrapper-disabled{.ssz-color-tag{opacity:0.4;-webkit-filter:grayscale(100%);filter:grayscale(100%);}}"])
|
|
7
7
|
};
|
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
|
@@ -12,7 +12,6 @@ import notification from "../lib/notification";
|
|
|
12
12
|
import sleep from "../lib/sleep";
|
|
13
13
|
import formatMessage from "../lib/formatMessage";
|
|
14
14
|
import RechargeRule from "./recharge-rule";
|
|
15
|
-
import PayRechargeMoneyAmountAlt from "./recharge-moneyAmount-alt";
|
|
16
15
|
import PayChannelList from "./payChannelList";
|
|
17
16
|
var BaseDict = {
|
|
18
17
|
productKind: {
|
|
@@ -21,7 +20,7 @@ var BaseDict = {
|
|
|
21
20
|
}
|
|
22
21
|
};
|
|
23
22
|
var PayRecharge = function PayRecharge(_ref) {
|
|
24
|
-
var _PayChannelList$filte
|
|
23
|
+
var _PayChannelList$filte, _balanceTypeOptions$;
|
|
25
24
|
var appId = _ref.appId,
|
|
26
25
|
apiUrl = _ref.apiUrl,
|
|
27
26
|
nickName = _ref.nickName,
|
|
@@ -41,7 +40,9 @@ var PayRecharge = function PayRecharge(_ref) {
|
|
|
41
40
|
_ref$maxPrice = _ref.maxPrice,
|
|
42
41
|
maxPrice = _ref$maxPrice === void 0 ? 5000 : _ref$maxPrice,
|
|
43
42
|
onHandSuccess = _ref.onHandSuccess,
|
|
44
|
-
env = _ref.env
|
|
43
|
+
env = _ref.env,
|
|
44
|
+
balanceTypeOptions = _ref.balanceTypeOptions,
|
|
45
|
+
defaultBalanceType = _ref.defaultBalanceType;
|
|
45
46
|
var _useState = useState(((_PayChannelList$filte = PayChannelList.filter(function (items) {
|
|
46
47
|
var itemList = items.childrenList.filter(function (item) {
|
|
47
48
|
return item.name === defaultPayChannel;
|
|
@@ -55,7 +56,8 @@ var PayRecharge = function PayRecharge(_ref) {
|
|
|
55
56
|
setSelectPayChannel = _useState2[1];
|
|
56
57
|
var _useState3 = useState({
|
|
57
58
|
moneyAmount: defaultPrice,
|
|
58
|
-
payChannel: defaultPayChannel
|
|
59
|
+
payChannel: defaultPayChannel,
|
|
60
|
+
balanceType: defaultBalanceType || (balanceTypeOptions === null || balanceTypeOptions === void 0 || (_balanceTypeOptions$ = balanceTypeOptions[0]) === null || _balanceTypeOptions$ === void 0 ? void 0 : _balanceTypeOptions$.value)
|
|
59
61
|
}),
|
|
60
62
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
61
63
|
formData = _useState4[0],
|
|
@@ -118,7 +120,15 @@ var PayRecharge = function PayRecharge(_ref) {
|
|
|
118
120
|
onFinish: onMakeQr
|
|
119
121
|
}, step === 'pay-channel' && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Form.Item, {
|
|
120
122
|
label: formatMessage('账号')
|
|
121
|
-
}, /*#__PURE__*/React.createElement("strong", null, nickName)), /*#__PURE__*/React.createElement(Form.Item, {
|
|
123
|
+
}, /*#__PURE__*/React.createElement("strong", null, nickName)), (balanceTypeOptions || []).length > 0 && /*#__PURE__*/React.createElement(Form.Item, {
|
|
124
|
+
name: "balanceType",
|
|
125
|
+
label: formatMessage('余额类别')
|
|
126
|
+
}, /*#__PURE__*/React.createElement(Radio.Group, null, (balanceTypeOptions || []).map(function (item) {
|
|
127
|
+
return /*#__PURE__*/React.createElement(Radio, {
|
|
128
|
+
key: item.value,
|
|
129
|
+
value: item.value
|
|
130
|
+
}, item.label);
|
|
131
|
+
}))), /*#__PURE__*/React.createElement(Form.Item, {
|
|
122
132
|
label: formatMessage('金额'),
|
|
123
133
|
name: "moneyAmount",
|
|
124
134
|
rules: [{
|
|
@@ -127,13 +137,16 @@ var PayRecharge = function PayRecharge(_ref) {
|
|
|
127
137
|
}],
|
|
128
138
|
extra: /*#__PURE__*/React.createElement("small", null, formatMessage('充值'), "\uFF1A", formatMessage('最低'), " ", /*#__PURE__*/React.createElement("strong", null, " ", minPrice), /*#__PURE__*/React.createElement("small", null, " ", formatMessage('元')), "\uFF0C", formatMessage('最大'), " ", /*#__PURE__*/React.createElement("strong", null, " ", maxPrice), /*#__PURE__*/React.createElement("small", null, " ", formatMessage('元')))
|
|
129
139
|
}, /*#__PURE__*/React.createElement(InputNumber, {
|
|
130
|
-
prefix: /*#__PURE__*/React.createElement(React.Fragment, null, "\xA5")
|
|
131
|
-
suffix
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
}
|
|
140
|
+
prefix: /*#__PURE__*/React.createElement(React.Fragment, null, "\xA5")
|
|
141
|
+
// suffix={(
|
|
142
|
+
// <PayRechargeMoneyAmountAlt
|
|
143
|
+
// moneyAmount={ formData.moneyAmount }
|
|
144
|
+
// rechargeRuleList={ rechargeRuleList }
|
|
145
|
+
// />
|
|
146
|
+
// )}
|
|
147
|
+
,
|
|
135
148
|
style: {
|
|
136
|
-
|
|
149
|
+
minWidth: 150
|
|
137
150
|
},
|
|
138
151
|
className: "ssz-recharge-form-moneyAmount-input",
|
|
139
152
|
precision: precision,
|
|
@@ -178,6 +191,7 @@ var PayRecharge = function PayRecharge(_ref) {
|
|
|
178
191
|
formItemSpan: FormItemSpan,
|
|
179
192
|
env: env,
|
|
180
193
|
money: formData.moneyAmount,
|
|
194
|
+
balanceType: formData.balanceType,
|
|
181
195
|
onList: function onList(list) {
|
|
182
196
|
return setRechargeRuleList(_toConsumableArray(list));
|
|
183
197
|
}
|
|
@@ -196,7 +210,8 @@ var PayRecharge = function PayRecharge(_ref) {
|
|
|
196
210
|
size: size,
|
|
197
211
|
env: env,
|
|
198
212
|
productKind: productKind,
|
|
199
|
-
couponCode: ""
|
|
213
|
+
couponCode: "",
|
|
214
|
+
balanceType: formData.balanceType
|
|
200
215
|
})), /*#__PURE__*/React.createElement(Divider, null), /*#__PURE__*/React.createElement("div", {
|
|
201
216
|
className: "ssz-submits"
|
|
202
217
|
}, /*#__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