component-sanzhizhou 1.2.13 → 1.3.1

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.
@@ -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: "success" | "info" | "warning" | "error", message: string, description?: import("react").ReactNode, options?: import("./notification").NotificationOption): void;
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;
@@ -1,5 +1,6 @@
1
1
  .ssz-recharge-form-moneyAmount-input{
2
2
  position: relative;
3
+
3
4
  .ssz-recharge-form-moneyAmount-input-bonus{
4
5
  position: absolute;
5
6
  top: -5px;
@@ -5,6 +5,7 @@ interface Props {
5
5
  env?: Global.Env;
6
6
  money: number;
7
7
  onList: (list: RechargeRule.List[]) => void;
8
+ balanceType?: Pay.BalanceType;
8
9
  }
9
10
  declare const RechargeRule: React.FC<Props>;
10
11
  export default RechargeRule;
@@ -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;
@@ -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{width:120px;}}.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%);}}"])
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
  };
@@ -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: {
@@ -118,7 +117,14 @@ var PayRecharge = function PayRecharge(_ref) {
118
117
  span: FormItemSpan
119
118
  },
120
119
  initialValues: _objectSpread({}, formData),
121
- onFinish: onMakeQr
120
+ onFinish: onMakeQr,
121
+ onValuesChange: function onValuesChange(changedValues) {
122
+ // 余额类别 / 金额 / 渠道变更时同步到 formData,
123
+ // 让「充值就送」等依赖当前类别的内容能实时切换。
124
+ setFormData(function (prev) {
125
+ return _objectSpread(_objectSpread({}, prev), changedValues);
126
+ });
127
+ }
122
128
  }, step === 'pay-channel' && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Form.Item, {
123
129
  label: formatMessage('账号')
124
130
  }, /*#__PURE__*/React.createElement("strong", null, nickName)), (balanceTypeOptions || []).length > 0 && /*#__PURE__*/React.createElement(Form.Item, {
@@ -138,13 +144,16 @@ var PayRecharge = function PayRecharge(_ref) {
138
144
  }],
139
145
  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('元')))
140
146
  }, /*#__PURE__*/React.createElement(InputNumber, {
141
- prefix: /*#__PURE__*/React.createElement(React.Fragment, null, "\xA5"),
142
- suffix: /*#__PURE__*/React.createElement(PayRechargeMoneyAmountAlt, {
143
- moneyAmount: formData.moneyAmount,
144
- rechargeRuleList: rechargeRuleList
145
- }),
147
+ prefix: /*#__PURE__*/React.createElement(React.Fragment, null, "\xA5")
148
+ // suffix={(
149
+ // <PayRechargeMoneyAmountAlt
150
+ // moneyAmount={ formData.moneyAmount }
151
+ // rechargeRuleList={ rechargeRuleList }
152
+ // />
153
+ // )}
154
+ ,
146
155
  style: {
147
- // minWidth: 300,
156
+ minWidth: 150
148
157
  },
149
158
  className: "ssz-recharge-form-moneyAmount-input",
150
159
  precision: precision,
@@ -189,6 +198,7 @@ var PayRecharge = function PayRecharge(_ref) {
189
198
  formItemSpan: FormItemSpan,
190
199
  env: env,
191
200
  money: formData.moneyAmount,
201
+ balanceType: formData.balanceType,
192
202
  onList: function onList(list) {
193
203
  return setRechargeRuleList(_toConsumableArray(list));
194
204
  }
@@ -5,5 +5,6 @@ declare namespace RechargeRule {
5
5
  "rechargeMoney": number;
6
6
  "giveMoney": number;
7
7
  "enabled": boolean;
8
+ "balanceType"?: Pay.BalanceType;
8
9
  }
9
10
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "component-sanzhizhou",
3
- "version": "1.2.13",
3
+ "version": "1.3.1",
4
4
  "description": "",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",