@pisell/private-materials 6.11.60 → 6.11.61

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.
@@ -63,8 +63,6 @@ var PaymentModalContent = function PaymentModalContent(_ref) {
63
63
  useLayoutEffect(function () {
64
64
  var _ref2 = pisellosAllModule || {},
65
65
  BookingTicket = _ref2.BookingTicket;
66
-
67
- // 检查下现在是否有 bookingTicket 的 OS 实例,如果没有我们这边先 new 一个
68
66
  var bookingTicketModule = pisellos === null || pisellos === void 0 ? void 0 : pisellos.getModule(getBookingTicketKey('ticket'));
69
67
  if (BookingTicket && !bookingTicketModule) {
70
68
  pisellos === null || pisellos === void 0 || pisellos.registerModule(new BookingTicket(getBookingTicketKey('ticket')), {
@@ -75,7 +73,15 @@ var PaymentModalContent = function PaymentModalContent(_ref) {
75
73
  }
76
74
  });
77
75
  }
78
- });
76
+
77
+ // 关键:调用 initPeripheralsListener 挂载 peripheralsResult
78
+ // 如果模块已存在则直接调用,否则注册后调用
79
+ setTimeout(function () {
80
+ var _module$initPeriphera;
81
+ var module = pisellos === null || pisellos === void 0 ? void 0 : pisellos.getModule(getBookingTicketKey('ticket'));
82
+ module === null || module === void 0 || (_module$initPeriphera = module.initPeripheralsListener) === null || _module$initPeriphera === void 0 || _module$initPeriphera.call(module);
83
+ }, 0);
84
+ }, []);
79
85
  var getDataFromHost = function getDataFromHost() {
80
86
  try {
81
87
  var is_price_include_tax = getData('is_price_include_tax');
@@ -68,7 +68,12 @@ var PaymentModalContent = ({ state, dispatch }) => {
68
68
  }
69
69
  });
70
70
  }
71
- });
71
+ setTimeout(() => {
72
+ var _a2;
73
+ const module2 = pisellos == null ? void 0 : pisellos.getModule((0, import_utils4.getBookingTicketKey)("ticket"));
74
+ (_a2 = module2 == null ? void 0 : module2.initPeripheralsListener) == null ? void 0 : _a2.call(module2);
75
+ }, 0);
76
+ }, []);
72
77
  const getDataFromHost = () => {
73
78
  try {
74
79
  const is_price_include_tax = getData("is_price_include_tax");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/private-materials",
3
- "version": "6.11.60",
3
+ "version": "6.11.61",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",