@pisell/pisellos 2.1.124 → 2.1.125
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.
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// 导出评估器
|
|
2
|
+
export { PromotionEvaluator } from "./evaluator";
|
|
3
|
+
|
|
4
|
+
// 导出适配器
|
|
5
|
+
export { PromotionAdapter } from "./adapter";
|
|
6
|
+
export { default } from "./adapter";
|
|
7
|
+
|
|
8
|
+
// 导出策略配置示例常量
|
|
9
|
+
export { X_ITEMS_FOR_Y_PRICE_STRATEGY, BUY_X_GET_Y_FREE_STRATEGY } from "./examples";
|
|
@@ -445,6 +445,8 @@ export var VenueBookingImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
445
445
|
openDataModule,
|
|
446
446
|
_this$store$order,
|
|
447
447
|
_this$store$order2,
|
|
448
|
+
_this$store$quotation,
|
|
449
|
+
_this$otherParams6,
|
|
448
450
|
_args6 = arguments;
|
|
449
451
|
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
450
452
|
while (1) switch (_context6.prev = _context6.next) {
|
|
@@ -590,31 +592,34 @@ export var VenueBookingImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
590
592
|
return this.loadRuntimeConfigs();
|
|
591
593
|
case 55:
|
|
592
594
|
if (!this.store.schedule) {
|
|
593
|
-
_context6.next =
|
|
595
|
+
_context6.next = 60;
|
|
594
596
|
break;
|
|
595
597
|
}
|
|
596
598
|
_context6.next = 58;
|
|
597
599
|
return this.store.schedule.loadAllSchedule();
|
|
598
600
|
case 58:
|
|
599
601
|
this.injectScheduleResolverToQuotation();
|
|
600
|
-
|
|
601
|
-
|
|
602
|
+
(_this$store$quotation = this.store.quotation) === null || _this$store$quotation === void 0 || _this$store$quotation.loadQuotations({
|
|
603
|
+
channel: (_this$otherParams6 = this.otherParams) === null || _this$otherParams6 === void 0 ? void 0 : _this$otherParams6.channel
|
|
604
|
+
});
|
|
605
|
+
case 60:
|
|
606
|
+
_context6.next = 62;
|
|
602
607
|
return this.refreshItemRuleQuantityLimits();
|
|
603
|
-
case
|
|
608
|
+
case 62:
|
|
604
609
|
this.store.status = 'ready';
|
|
605
610
|
console.log('[VenueBooking] 初始化完成');
|
|
606
|
-
_context6.next =
|
|
611
|
+
_context6.next = 66;
|
|
607
612
|
return this.core.effects.emit(VenueBookingHooks.onInited, {
|
|
608
613
|
status: this.store.status
|
|
609
614
|
});
|
|
610
|
-
case
|
|
615
|
+
case 66:
|
|
611
616
|
this.logMethodSuccess('initialize', {
|
|
612
617
|
status: this.store.status
|
|
613
618
|
});
|
|
614
|
-
_context6.next =
|
|
619
|
+
_context6.next = 76;
|
|
615
620
|
break;
|
|
616
|
-
case
|
|
617
|
-
_context6.prev =
|
|
621
|
+
case 69:
|
|
622
|
+
_context6.prev = 69;
|
|
618
623
|
_context6.t0 = _context6["catch"](49);
|
|
619
624
|
this.store.status = 'error';
|
|
620
625
|
this.store.error = _context6.t0 instanceof Error ? _context6.t0.message : '初始化失败';
|
|
@@ -623,11 +628,11 @@ export var VenueBookingImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
623
628
|
status: this.store.status
|
|
624
629
|
});
|
|
625
630
|
throw _context6.t0;
|
|
626
|
-
case
|
|
631
|
+
case 76:
|
|
627
632
|
case "end":
|
|
628
633
|
return _context6.stop();
|
|
629
634
|
}
|
|
630
|
-
}, _callee6, this, [[49,
|
|
635
|
+
}, _callee6, this, [[49, 69]]);
|
|
631
636
|
}));
|
|
632
637
|
function initialize(_x5) {
|
|
633
638
|
return _initialize.apply(this, arguments);
|
|
@@ -802,7 +807,7 @@ export var VenueBookingImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
802
807
|
key: "_doLoadAllProducts",
|
|
803
808
|
value: function () {
|
|
804
809
|
var _doLoadAllProducts2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
|
|
805
|
-
var _this$
|
|
810
|
+
var _this$otherParams7, _this$store$venueProd, associatedMenus, menuListIds, allProducts, list, venueList, addonList, venueStore;
|
|
806
811
|
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
|
|
807
812
|
while (1) switch (_context11.prev = _context11.next) {
|
|
808
813
|
case 0:
|
|
@@ -820,7 +825,7 @@ export var VenueBookingImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
820
825
|
}
|
|
821
826
|
throw new Error('addonProducts 模块未初始化');
|
|
822
827
|
case 6:
|
|
823
|
-
associatedMenus = ((_this$
|
|
828
|
+
associatedMenus = ((_this$otherParams7 = this.otherParams) === null || _this$otherParams7 === void 0 || (_this$otherParams7 = _this$otherParams7.openData) === null || _this$otherParams7 === void 0 ? void 0 : _this$otherParams7['menu.associated_menus']) || [];
|
|
824
829
|
if (associatedMenus.length) {
|
|
825
830
|
_context11.next = 9;
|
|
826
831
|
break;
|
|
@@ -1963,7 +1968,7 @@ export var VenueBookingImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
1963
1968
|
key: "submitOrder",
|
|
1964
1969
|
value: function () {
|
|
1965
1970
|
var _submitOrder = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee24() {
|
|
1966
|
-
var _this$
|
|
1971
|
+
var _this$otherParams8, _this$otherParams9, _this$otherParams10, _this$otherParams11, _tempOrder$products2, result, tempOrder;
|
|
1967
1972
|
return _regeneratorRuntime().wrap(function _callee24$(_context24) {
|
|
1968
1973
|
while (1) switch (_context24.prev = _context24.next) {
|
|
1969
1974
|
case 0:
|
|
@@ -1981,10 +1986,10 @@ export var VenueBookingImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
1981
1986
|
_context24.next = 8;
|
|
1982
1987
|
return this.store.order.submitTempOrder({
|
|
1983
1988
|
cacheId: this.cacheId,
|
|
1984
|
-
platform: (_this$
|
|
1985
|
-
businessCode: (_this$
|
|
1986
|
-
channel: (_this$
|
|
1987
|
-
type: (_this$
|
|
1989
|
+
platform: (_this$otherParams8 = this.otherParams) === null || _this$otherParams8 === void 0 ? void 0 : _this$otherParams8.platform,
|
|
1990
|
+
businessCode: (_this$otherParams9 = this.otherParams) === null || _this$otherParams9 === void 0 ? void 0 : _this$otherParams9.businessCode,
|
|
1991
|
+
channel: (_this$otherParams10 = this.otherParams) === null || _this$otherParams10 === void 0 ? void 0 : _this$otherParams10.channel,
|
|
1992
|
+
type: (_this$otherParams11 = this.otherParams) === null || _this$otherParams11 === void 0 ? void 0 : _this$otherParams11.type
|
|
1988
1993
|
});
|
|
1989
1994
|
case 8:
|
|
1990
1995
|
result = _context24.sent;
|
|
@@ -292,7 +292,7 @@ var _VenueBookingImpl = class extends import_BaseModule.BaseModule {
|
|
|
292
292
|
}
|
|
293
293
|
}
|
|
294
294
|
async initialize(core, options = {}) {
|
|
295
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
295
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
296
296
|
this.logMethodStart("initialize");
|
|
297
297
|
this.core = core;
|
|
298
298
|
this.initializeOptions = options || {};
|
|
@@ -425,6 +425,9 @@ var _VenueBookingImpl = class extends import_BaseModule.BaseModule {
|
|
|
425
425
|
if (this.store.schedule) {
|
|
426
426
|
await this.store.schedule.loadAllSchedule();
|
|
427
427
|
this.injectScheduleResolverToQuotation();
|
|
428
|
+
(_k = this.store.quotation) == null ? void 0 : _k.loadQuotations({
|
|
429
|
+
channel: (_j = this.otherParams) == null ? void 0 : _j.channel
|
|
430
|
+
});
|
|
428
431
|
}
|
|
429
432
|
await this.refreshItemRuleQuantityLimits();
|
|
430
433
|
this.store.status = "ready";
|