@pisell/private-materials 6.11.25 → 6.11.26

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.
@@ -363,14 +363,16 @@ export var useWalletPass = function useWalletPass(props) {
363
363
  // 监听 selectedWithDetails 变化,自动通知外部 前端策略模型计算早于订单创建
364
364
  useDebounceEffect(function () {
365
365
  notifySelectChange(selectedWithDetails);
366
+ // 将计算后的数据同步回 selectedWallet
367
+ setWalletSelect(selectedWithDetails);
366
368
  setLoading(false);
367
369
  }, [selectedWithDetails], {
368
370
  wait: 200
369
371
  });
370
372
  var data = useMemo(function () {
371
373
  // 使用前端计算后的数据
372
- return formatMachineCodeServer2CardList(uniqueByKey(mergeDataWithInitialOrder([].concat(_toConsumableArray(selectedWallet), _toConsumableArray(displayVouchers), _toConsumableArray(displayOtherVouchers))), 'id'), selectedVoucherIds);
373
- }, [displayVouchers, displayOtherVouchers, selectedVoucherIds, selectedWallet]);
374
+ return formatMachineCodeServer2CardList(uniqueByKey(mergeDataWithInitialOrder([].concat(_toConsumableArray(selectedWithDetails), _toConsumableArray(displayVouchers), _toConsumableArray(displayOtherVouchers))), 'id'), selectedVoucherIds);
375
+ }, [displayVouchers, displayOtherVouchers, selectedVoucherIds, selectedWithDetails]);
374
376
 
375
377
  // 获取用户识别码列表
376
378
  var fetchUserIdentificationCodes = useMemoizedFn( /*#__PURE__*/function () {
@@ -719,7 +721,7 @@ export var useWalletPass = function useWalletPass(props) {
719
721
  var handleSearchIdentificationCode = useMemoizedFn(function (value) {
720
722
  return paymentModule.wallet.searchIdentificationCodeAsync({
721
723
  code: value,
722
- prepare_payments: paymentModule.wallet.formatWalletPassList2PreparePayments(selectedWalletRef.current)
724
+ prepare_payments: paymentModule.wallet.formatWalletPassList2PreparePayments(selectedWithDetails)
723
725
  });
724
726
  });
725
727
 
@@ -210,6 +210,7 @@ var useWalletPass = (props) => {
210
210
  }, [selectedVouchers, allVouchersForCalculation, transformList, searchIdentificationCodeList, noApplicableVoucher, totalAmount, products]);
211
211
  (0, import_ahooks.useDebounceEffect)(() => {
212
212
  notifySelectChange(selectedWithDetails);
213
+ setWalletSelect(selectedWithDetails);
213
214
  setLoading(false);
214
215
  }, [selectedWithDetails], {
215
216
  wait: 200
@@ -218,7 +219,7 @@ var useWalletPass = (props) => {
218
219
  return (0, import_utils2.formatMachineCodeServer2CardList)(
219
220
  (0, import_utils.uniqueByKey)(
220
221
  mergeDataWithInitialOrder([
221
- ...selectedWallet,
222
+ ...selectedWithDetails,
222
223
  ...displayVouchers,
223
224
  ...displayOtherVouchers
224
225
  ]),
@@ -226,7 +227,7 @@ var useWalletPass = (props) => {
226
227
  ),
227
228
  selectedVoucherIds
228
229
  );
229
- }, [displayVouchers, displayOtherVouchers, selectedVoucherIds, selectedWallet]);
230
+ }, [displayVouchers, displayOtherVouchers, selectedVoucherIds, selectedWithDetails]);
230
231
  const fetchUserIdentificationCodes = (0, import_ahooks.useMemoizedFn)(async (params) => {
231
232
  setLoading(true);
232
233
  setError(null);
@@ -511,7 +512,7 @@ var useWalletPass = (props) => {
511
512
  return paymentModule.wallet.searchIdentificationCodeAsync({
512
513
  code: value,
513
514
  prepare_payments: paymentModule.wallet.formatWalletPassList2PreparePayments(
514
- selectedWalletRef.current
515
+ selectedWithDetails
515
516
  )
516
517
  });
517
518
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/private-materials",
3
- "version": "6.11.25",
3
+ "version": "6.11.26",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -69,8 +69,8 @@
69
69
  "styled-components": "^6.0.0-rc.3",
70
70
  "@pisell/utils": "3.0.2",
71
71
  "@pisell/materials": "6.11.8",
72
- "@pisell/icon": "0.0.11",
73
- "@pisell/date-picker": "3.0.8"
72
+ "@pisell/date-picker": "3.0.8",
73
+ "@pisell/icon": "0.0.11"
74
74
  },
75
75
  "peerDependencies": {
76
76
  "react": "^18.0.0",