@pisell/pisellos 2.1.35 → 2.1.38

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.
Files changed (55) hide show
  1. package/dist/effects/index.d.ts +0 -1
  2. package/dist/effects/index.js +6 -29
  3. package/dist/modules/Account/index.js +3 -2
  4. package/dist/modules/BaseModule.d.ts +0 -3
  5. package/dist/modules/BaseModule.js +0 -15
  6. package/dist/modules/Customer/index.js +10 -9
  7. package/dist/modules/Customer/types.d.ts +2 -2
  8. package/dist/modules/Customer/types.js +2 -2
  9. package/dist/modules/Discount/index.js +1 -1
  10. package/dist/modules/Guests/index.js +9 -9
  11. package/dist/modules/Order/index.js +1 -1
  12. package/dist/modules/Payment/index.js +17 -17
  13. package/dist/modules/Payment/walletpass.js +1 -4
  14. package/dist/modules/Product/index.d.ts +1 -1
  15. package/dist/modules/ProductList/index.js +3 -2
  16. package/dist/modules/Resource/index.js +1 -1
  17. package/dist/modules/Rules/index.js +3 -2
  18. package/dist/solution/BookingByStep/index.d.ts +1 -1
  19. package/dist/solution/BookingByStep/index.js +44 -50
  20. package/dist/solution/BookingTicket/index.d.ts +0 -4
  21. package/dist/solution/BookingTicket/index.js +8 -17
  22. package/dist/solution/BookingTicket/utils/scan/index.d.ts +0 -4
  23. package/dist/solution/BookingTicket/utils/scan/index.js +16 -25
  24. package/dist/solution/BuyTickets/index.js +8 -7
  25. package/dist/solution/Checkout/index.js +35 -35
  26. package/dist/solution/ShopDiscount/index.js +10 -9
  27. package/dist/types/index.d.ts +0 -1
  28. package/lib/effects/index.d.ts +0 -1
  29. package/lib/effects/index.js +0 -13
  30. package/lib/modules/Account/index.js +3 -2
  31. package/lib/modules/BaseModule.d.ts +0 -3
  32. package/lib/modules/BaseModule.js +0 -9
  33. package/lib/modules/Customer/index.js +10 -9
  34. package/lib/modules/Customer/types.d.ts +2 -2
  35. package/lib/modules/Customer/types.js +2 -2
  36. package/lib/modules/Discount/index.js +1 -1
  37. package/lib/modules/Guests/index.js +9 -9
  38. package/lib/modules/Order/index.js +1 -1
  39. package/lib/modules/Payment/index.js +16 -16
  40. package/lib/modules/Payment/walletpass.js +1 -3
  41. package/lib/modules/Product/index.d.ts +1 -1
  42. package/lib/modules/ProductList/index.js +3 -2
  43. package/lib/modules/Resource/index.js +1 -1
  44. package/lib/modules/Rules/index.js +3 -2
  45. package/lib/solution/BookingByStep/index.d.ts +1 -1
  46. package/lib/solution/BookingByStep/index.js +6 -6
  47. package/lib/solution/BookingTicket/index.d.ts +0 -4
  48. package/lib/solution/BookingTicket/index.js +6 -6
  49. package/lib/solution/BookingTicket/utils/scan/index.d.ts +0 -4
  50. package/lib/solution/BookingTicket/utils/scan/index.js +1 -7
  51. package/lib/solution/BuyTickets/index.js +8 -7
  52. package/lib/solution/Checkout/index.js +34 -34
  53. package/lib/solution/ShopDiscount/index.js +11 -10
  54. package/lib/types/index.d.ts +0 -1
  55. package/package.json +1 -1
@@ -39,7 +39,7 @@ var import_dayjs = __toESM(require("dayjs"));
39
39
  var OrderModule = class extends import_BaseModule.BaseModule {
40
40
  // LoggerManager 实例
41
41
  constructor(name, version) {
42
- super(name || "order", version);
42
+ super(name, version);
43
43
  this.defaultName = "order";
44
44
  this.defaultVersion = "1.0.0";
45
45
  }
@@ -55,7 +55,7 @@ function generateRequestUniqueId() {
55
55
  }
56
56
  var PaymentModule = class extends import_BaseModule.BaseModule {
57
57
  constructor(name, version) {
58
- super(name || "payment", version);
58
+ super(name, version);
59
59
  this.defaultName = "pay";
60
60
  this.defaultVersion = "1.0.0";
61
61
  // LoggerManager 实例
@@ -193,7 +193,7 @@ var PaymentModule = class extends import_BaseModule.BaseModule {
193
193
  console.warn("[PaymentModule] 无法缓存支付方式,pay_method 表不存在");
194
194
  }
195
195
  await this.core.effects.emit(
196
- `${this.name}:onPaymentMethodsLoaded`,
196
+ import_types.PaymentHooks.OnPaymentMethodsLoaded,
197
197
  payMethods
198
198
  );
199
199
  this.logInfo("getPayMethodListAsync completed successfully", {
@@ -243,7 +243,7 @@ var PaymentModule = class extends import_BaseModule.BaseModule {
243
243
  newMethods: newPayMethods
244
244
  };
245
245
  await this.core.effects.emit(
246
- `${this.name}:onPaymentMethodsChanged`,
246
+ import_types.PaymentHooks.OnPaymentMethodsChanged,
247
247
  eventData
248
248
  );
249
249
  } else {
@@ -368,7 +368,7 @@ var PaymentModule = class extends import_BaseModule.BaseModule {
368
368
  const order = await this.dbManager.get("order", orderUuid);
369
369
  if (order) {
370
370
  await this.dbManager.delete("order", orderUuid);
371
- await this.core.effects.emit(`${this.name}:onOrderDeleted`, order);
371
+ await this.core.effects.emit(import_types.PaymentHooks.OnOrderDeleted, order);
372
372
  console.log("[PaymentModule] 支付订单删除成功:", orderUuid);
373
373
  }
374
374
  } catch (error) {
@@ -386,8 +386,8 @@ var PaymentModule = class extends import_BaseModule.BaseModule {
386
386
  const updatedOrder = { ...order, ...params };
387
387
  this.recalculateOrderAmount(updatedOrder);
388
388
  await this.dbManager.update("order", updatedOrder);
389
- await this.core.effects.emit(`${this.name}:onOrderUpdated`, updatedOrder);
390
- await this.core.effects.emit(`${this.name}:onOrderChanged`, {
389
+ await this.core.effects.emit(import_types.PaymentHooks.OnOrderUpdated, updatedOrder);
390
+ await this.core.effects.emit(import_types.PaymentHooks.OnOrderChanged, {
391
391
  action: "update",
392
392
  order: updatedOrder,
393
393
  originalOrder: order
@@ -445,8 +445,8 @@ var PaymentModule = class extends import_BaseModule.BaseModule {
445
445
  }
446
446
  };
447
447
  await this.dbManager.update("order", updatedOrder);
448
- await this.core.effects.emit(`${this.name}:onOrderUpdated`, updatedOrder);
449
- await this.core.effects.emit(`${this.name}:onOrderChanged`, {
448
+ await this.core.effects.emit(import_types.PaymentHooks.OnOrderUpdated, updatedOrder);
449
+ await this.core.effects.emit(import_types.PaymentHooks.OnOrderChanged, {
450
450
  action: "order_id_replaced",
451
451
  order: updatedOrder,
452
452
  originalOrder: existingOrder,
@@ -563,7 +563,7 @@ var PaymentModule = class extends import_BaseModule.BaseModule {
563
563
  order.payment.push(newPaymentItem);
564
564
  this.recalculateOrderAmount(order);
565
565
  await this.dbManager.update("order", order);
566
- await this.core.effects.emit(`${this.name}:onPaymentAdded`, {
566
+ await this.core.effects.emit(import_types.PaymentHooks.OnPaymentAdded, {
567
567
  orderUuid,
568
568
  payment: newPaymentItem
569
569
  });
@@ -619,11 +619,11 @@ var PaymentModule = class extends import_BaseModule.BaseModule {
619
619
  });
620
620
  this.recalculateOrderAmount(order);
621
621
  await this.dbManager.update("order", order);
622
- await this.core.effects.emit(`${this.name}:onPaymentDeleted`, {
622
+ await this.core.effects.emit(import_types.PaymentHooks.OnPaymentDeleted, {
623
623
  order,
624
624
  paymentItem
625
625
  });
626
- await this.core.effects.emit(`${this.name}:onOrderChanged`, {
626
+ await this.core.effects.emit(import_types.PaymentHooks.OnOrderChanged, {
627
627
  action: "payment_delete",
628
628
  order,
629
629
  paymentItem
@@ -700,7 +700,7 @@ var PaymentModule = class extends import_BaseModule.BaseModule {
700
700
  await this.addPaymentItemAsync(orderUuid, voucherItem);
701
701
  }
702
702
  const updatedOrder = await this.getPaymentOrderByUuidAsync(orderUuid);
703
- await this.core.effects.emit(`${this.name}:onPaymentAdded`, {
703
+ await this.core.effects.emit(import_types.PaymentHooks.OnPaymentAdded, {
704
704
  orderUuid,
705
705
  order: updatedOrder,
706
706
  payment: null
@@ -741,11 +741,11 @@ var PaymentModule = class extends import_BaseModule.BaseModule {
741
741
  Object.assign(paymentItem, formattedParams);
742
742
  this.recalculateOrderAmount(order);
743
743
  await this.dbManager.update("order", order);
744
- await this.core.effects.emit(`${this.name}:onPaymentUpdated`, {
744
+ await this.core.effects.emit(import_types.PaymentHooks.OnPaymentUpdated, {
745
745
  order,
746
746
  paymentItem
747
747
  });
748
- await this.core.effects.emit(`${this.name}:onOrderChanged`, {
748
+ await this.core.effects.emit(import_types.PaymentHooks.OnOrderChanged, {
749
749
  action: "payment_update",
750
750
  order,
751
751
  paymentItem
@@ -833,8 +833,8 @@ var PaymentModule = class extends import_BaseModule.BaseModule {
833
833
  });
834
834
  return;
835
835
  }
836
- await this.core.effects.emit(`${this.name}:onPaymentSubmitted`, order);
837
- await this.core.effects.emit(`${this.name}:onOrderChanged`, {
836
+ await this.core.effects.emit(import_types.PaymentHooks.OnPaymentSubmitted, order);
837
+ await this.core.effects.emit(import_types.PaymentHooks.OnOrderChanged, {
838
838
  action: "submit",
839
839
  order
840
840
  });
@@ -38,9 +38,7 @@ var WalletPassPaymentImpl = class {
38
38
  */
39
39
  emitEvent(hook, data) {
40
40
  try {
41
- const eventName = hook.split(":")[1] || hook.replace(/^[A-Z][a-z]+/, "").replace(/^On/, "").toLowerCase();
42
- const fullEventName = `${this.paymentModule.name}:${eventName}`;
43
- this.paymentModule.core.effects.emit(fullEventName, data);
41
+ this.paymentModule.core.effects.emit(hook, data);
44
42
  } catch (error) {
45
43
  this.paymentModule.logError("[WalletPass] 发送事件失败", error, { hook });
46
44
  }
@@ -49,5 +49,5 @@ export declare class Product extends BaseModule implements Module {
49
49
  getCategories(): ProductCategory[];
50
50
  setOtherParams(key: string, value: any): void;
51
51
  getOtherParams(): any;
52
- getProductType(): "normal" | "duration" | "session";
52
+ getProductType(): "duration" | "session" | "normal";
53
53
  }
@@ -24,6 +24,7 @@ __export(ProductList_exports, {
24
24
  });
25
25
  module.exports = __toCommonJS(ProductList_exports);
26
26
  var import_BaseModule = require("../BaseModule");
27
+ var import_types = require("./types");
27
28
  var import_lodash_es = require("lodash-es");
28
29
  __reExport(ProductList_exports, require("./types"), module.exports);
29
30
  var ProductList = class extends import_BaseModule.BaseModule {
@@ -133,14 +134,14 @@ var ProductList = class extends import_BaseModule.BaseModule {
133
134
  }
134
135
  async getProducts() {
135
136
  await this.core.effects.emit(
136
- `${this.name}:onGetProducts`,
137
+ import_types.ProductListHooks.onGetProducts,
137
138
  this.store.list
138
139
  );
139
140
  return (0, import_lodash_es.cloneDeep)(this.store.list);
140
141
  }
141
142
  async getProduct(id) {
142
143
  await this.core.effects.emit(
143
- `${this.name}:onGetProduct`,
144
+ import_types.ProductListHooks.onGetProduct,
144
145
  this.store.list
145
146
  );
146
147
  const product = this.store.list.find((product2) => product2.id === id);
@@ -42,7 +42,7 @@ var ResourceListModule = class extends import_BaseModule.BaseModule {
42
42
  if (!resource)
43
43
  return;
44
44
  this.store.selectedResource = resource;
45
- await this.core.effects.emit(`${this.name}:onResourceSelect`, resource);
45
+ await this.core.effects.emit(import_types.ResourceHooks.OnResourceSelect, resource);
46
46
  }
47
47
  getSelectedResource() {
48
48
  return this.store.selectedResource;
@@ -33,6 +33,7 @@ __export(Rules_exports, {
33
33
  });
34
34
  module.exports = __toCommonJS(Rules_exports);
35
35
  var import_BaseModule = require("../BaseModule");
36
+ var import_types = require("./types");
36
37
  var import_utils = require("../../solution/ShopDiscount/utils");
37
38
  var import_utils2 = require("../Cart/utils");
38
39
  var import_decimal = __toESM(require("decimal.js"));
@@ -51,7 +52,7 @@ var RulesModule = class extends import_BaseModule.BaseModule {
51
52
  }
52
53
  async setRulesList(rulesList) {
53
54
  this.store.rulesList = rulesList;
54
- await this.core.effects.emit(`${this.name}:onRulesListChange`, rulesList);
55
+ await this.core.effects.emit(import_types.RulesHooks.OnRulesListChange, rulesList);
55
56
  }
56
57
  getRulesList() {
57
58
  return this.store.rulesList;
@@ -488,7 +489,7 @@ var RulesModule = class extends import_BaseModule.BaseModule {
488
489
  }
489
490
  async destroy() {
490
491
  this.core.effects.offByModuleDestroy(this.name);
491
- await this.core.effects.emit(`${this.name}:onDestroy`, {});
492
+ await this.core.effects.emit(import_types.RulesHooks.OnDestroy, {});
492
493
  console.log("[Rules] 已销毁");
493
494
  }
494
495
  async clear() {
@@ -342,7 +342,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
342
342
  };
343
343
  setOtherData(key: string, value: any): void;
344
344
  getOtherData(key: string): any;
345
- getProductTypeById(id: number): Promise<"normal" | "duration" | "session">;
345
+ getProductTypeById(id: number): Promise<"duration" | "session" | "normal">;
346
346
  /**
347
347
  * 提供给 UI 的方法,减轻 UI 层的计算压力,UI 层只需要传递 cartItemId 和 resourceCode 即返回对应的 renderList
348
348
  *
@@ -116,7 +116,7 @@ var BookingByStepImpl = class extends import_BaseModule.BaseModule {
116
116
  }
117
117
  });
118
118
  this.store.schedule.loadAllSchedule();
119
- this.core.effects.emit(`${this.name}:onInited`, {});
119
+ this.core.effects.emit(import_types.BookingByStepHooks.onInited, {});
120
120
  }
121
121
  // 初始化step
122
122
  initStep(stepList) {
@@ -636,7 +636,7 @@ var BookingByStepImpl = class extends import_BaseModule.BaseModule {
636
636
  addItemParams.account = account;
637
637
  }
638
638
  this.addProductCheck({ date });
639
- if (addItemParams.quantity > 1 && !(0, import_utils5.isNormalProduct)(productData.origin)) {
639
+ if (addItemParams.quantity > 1 && !(0, import_utils5.isNormalProduct)(productData)) {
640
640
  for (let i = 0; i < addItemParams.quantity; i++) {
641
641
  const newAddItemParams = (0, import_lodash_es.cloneDeep)(addItemParams);
642
642
  newAddItemParams.quantity = 1;
@@ -1904,12 +1904,12 @@ var BookingByStepImpl = class extends import_BaseModule.BaseModule {
1904
1904
  }
1905
1905
  });
1906
1906
  });
1907
+ if (intersections.length === 0) {
1908
+ console.log(`资源${i}与当前公共时间段无交集,跳过该资源`);
1909
+ continue;
1910
+ }
1907
1911
  commonSlots = intersections;
1908
1912
  console.log(`与资源${i}求交集后的公共时间段:`, commonSlots.map((slot) => `${slot.start.format("HH:mm")}-${slot.end.format("HH:mm")}`));
1909
- if (commonSlots.length === 0) {
1910
- console.log("没有找到公共时间段");
1911
- return [];
1912
- }
1913
1913
  }
1914
1914
  const result = commonSlots.map((slot) => ({
1915
1915
  startTime: slot.start.format("HH:mm"),
@@ -22,10 +22,6 @@ export declare class BookingTicketImpl extends BaseModule implements Module {
22
22
  * @returns 商品列表
23
23
  */
24
24
  loadProducts(params?: ILoadProductsParams): Promise<any>;
25
- /**
26
- * 初始化外设扫码结果监听
27
- */
28
- initPeripheralsListener(): void;
29
25
  /**
30
26
  * 获取商品列表(不加载到模块中)
31
27
  * @returns 商品列表
@@ -99,7 +99,7 @@ var BookingTicketImpl = class extends import_BaseModule.BaseModule {
99
99
  throw new Error(`模块 ${step} 不存在`);
100
100
  }
101
101
  });
102
- this.core.effects.emit(`${this.name}:onInited`, {});
102
+ this.core.effects.emit(import_types.BookingTicketHooks.onInited, {});
103
103
  }
104
104
  /**
105
105
  * 获取商品列表
@@ -115,7 +115,7 @@ var BookingTicketImpl = class extends import_BaseModule.BaseModule {
115
115
  ...params,
116
116
  cacheId: this.cacheId
117
117
  });
118
- this.core.effects.emit(`${this.name}:onProductsLoaded`, result);
118
+ this.core.effects.emit(import_types.BookingTicketHooks.onProductsLoaded, result);
119
119
  return result;
120
120
  } catch (error) {
121
121
  console.error("Failed to load products:", error);
@@ -149,7 +149,7 @@ var BookingTicketImpl = class extends import_BaseModule.BaseModule {
149
149
  */
150
150
  setActiveCustomer(customer) {
151
151
  this.store.customer.setSelectedCustomer(customer);
152
- this.core.effects.emit(`${this.name}:onCustomerSelected`, {
152
+ this.core.effects.emit(import_types.BookingTicketHooks.onCustomerSelected, {
153
153
  customer
154
154
  });
155
155
  }
@@ -168,7 +168,7 @@ var BookingTicketImpl = class extends import_BaseModule.BaseModule {
168
168
  const customer = this.store.customer.getCustomerById(customerId);
169
169
  if (customer) {
170
170
  this.store.customer.setSelectedCustomer(customer);
171
- this.core.effects.emit(`${this.name}:onCustomerSelected`, {
171
+ this.core.effects.emit(import_types.BookingTicketHooks.onCustomerSelected, {
172
172
  customer
173
173
  });
174
174
  }
@@ -248,7 +248,7 @@ var BookingTicketImpl = class extends import_BaseModule.BaseModule {
248
248
  async loadMoreCustomers() {
249
249
  try {
250
250
  const result = await this.store.customer.loadMoreCustomers();
251
- this.core.effects.emit(`${this.name}:onCustomerListUpdate`, result);
251
+ this.core.effects.emit(import_types.BookingTicketHooks.onCustomerListUpdate, result);
252
252
  return result;
253
253
  } catch (error) {
254
254
  console.error("Failed to load more customers:", error);
@@ -263,7 +263,7 @@ var BookingTicketImpl = class extends import_BaseModule.BaseModule {
263
263
  async resetAndLoadCustomers(params = {}) {
264
264
  try {
265
265
  const result = await this.store.customer.resetAndLoadCustomers(params);
266
- this.core.effects.emit(`${this.name}:onCustomerListReset`, result);
266
+ this.core.effects.emit(import_types.BookingTicketHooks.onCustomerListReset, result);
267
267
  return result;
268
268
  } catch (error) {
269
269
  console.error("Failed to reset and load customers:", error);
@@ -18,10 +18,6 @@ export default class Scan {
18
18
  private watchKey;
19
19
  private listenerConfig;
20
20
  constructor(solution: BookingTicketImpl, watchKey: string);
21
- /**
22
- * 初始化外设扫码结果监听
23
- */
24
- initPeripheralsListener(): void;
25
21
  /**
26
22
  * 处理扫码事件
27
23
  * @param eventKey 事件key
@@ -37,15 +37,9 @@ var import_task = __toESM(require("../../../../utils/task"));
37
37
  var Scan = class {
38
38
  constructor(solution, watchKey) {
39
39
  this.listenerConfig = /* @__PURE__ */ new Map();
40
+ var _a, _b, _c, _d, _e;
40
41
  this.solution = solution;
41
42
  this.watchKey = watchKey;
42
- this.initPeripheralsListener();
43
- }
44
- /**
45
- * 初始化外设扫码结果监听
46
- */
47
- initPeripheralsListener() {
48
- var _a, _b, _c, _d, _e;
49
43
  (_e = (_d = (_c = (_b = (_a = this.solution) == null ? void 0 : _a.window) == null ? void 0 : _b.interaction) == null ? void 0 : _c.utils) == null ? void 0 : _d.mountFunction) == null ? void 0 : _e.call(
50
44
  _d,
51
45
  "global",
@@ -24,6 +24,7 @@ __export(BuyTickets_exports, {
24
24
  });
25
25
  module.exports = __toCommonJS(BuyTickets_exports);
26
26
  var import_modules = require("../../modules/");
27
+ var import_types = require("./types");
27
28
  var import_BaseModule = require("../../modules/BaseModule");
28
29
  __reExport(BuyTickets_exports, require("./types"), module.exports);
29
30
  var BuyTicketsImpl = class extends import_BaseModule.BaseModule {
@@ -48,7 +49,7 @@ var BuyTicketsImpl = class extends import_BaseModule.BaseModule {
48
49
  if (this.otherParams.prodctIds) {
49
50
  await this.loadProductsByIds(this.otherParams.prodctIds);
50
51
  }
51
- await this.core.effects.emit(`${this.name}:onInited`, {});
52
+ await this.core.effects.emit(import_types.BuyTicketsHooks.onInited, {});
52
53
  }
53
54
  // 通过 ids 获取产品,在当前解决方案下,获取到的就是主商品
54
55
  async loadProductsByIds(ids) {
@@ -68,13 +69,13 @@ var BuyTicketsImpl = class extends import_BaseModule.BaseModule {
68
69
  }
69
70
  });
70
71
  this.store.mainProducts = mainProducts;
71
- await this.core.effects.emit(`${this.name}:onMainProductsLoaded`, {});
72
+ await this.core.effects.emit(import_types.BuyTicketsHooks.onMainProductsLoaded, {});
72
73
  }
73
74
  // 通过 ids 获取产品,在当前解决方案下,获取到的就是其他商品
74
75
  async loadProductsByCategory(categoryId) {
75
76
  }
76
77
  async destroy() {
77
- await this.core.effects.emit(`${this.name}:onDestroy`, {});
78
+ await this.core.effects.emit(import_types.BuyTicketsHooks.onDestroy, {});
78
79
  console.log("[BuyTickets] 已销毁");
79
80
  }
80
81
  // 获取当前绑定的所有商品
@@ -82,7 +83,7 @@ var BuyTicketsImpl = class extends import_BaseModule.BaseModule {
82
83
  var _a;
83
84
  const mainData = await this.store.mainProducts.getProducts() || [];
84
85
  const otherData = await ((_a = this.store.otherProducts) == null ? void 0 : _a.getProducts()) || [];
85
- await this.core.effects.emit(`${this.name}:onGetProducts`, [
86
+ await this.core.effects.emit(import_types.BuyTicketsHooks.OnGetProducts, [
86
87
  ...mainData,
87
88
  ...otherData
88
89
  ]);
@@ -101,7 +102,7 @@ var BuyTicketsImpl = class extends import_BaseModule.BaseModule {
101
102
  }
102
103
  // 商品列表页提交
103
104
  async listSubmit(data) {
104
- const res = await this.core.effects.emit(`${this.name}:onListSubmit`, {
105
+ const res = await this.core.effects.emit(import_types.BuyTicketsHooks.onListSubmit, {
105
106
  ...data,
106
107
  products: this.getProducts()
107
108
  });
@@ -115,14 +116,14 @@ var BuyTicketsImpl = class extends import_BaseModule.BaseModule {
115
116
  }
116
117
  // 购物车提交
117
118
  async cartSubmit(data) {
118
- await this.core.effects.emit(`${this.name}:onCartSubmit`, {
119
+ await this.core.effects.emit(import_types.BuyTicketsHooks.onCartSubmit, {
119
120
  ...data,
120
121
  products: this.getProducts()
121
122
  });
122
123
  }
123
124
  // 结算提交
124
125
  async checkoutSubmit(data) {
125
- await this.core.effects.emit(`${this.name}:onCheckoutSubmit`, {
126
+ await this.core.effects.emit(import_types.BuyTicketsHooks.onCheckoutSubmit, {
126
127
  ...data,
127
128
  products: this.getProducts()
128
129
  });