@pisell/pisellos 2.1.123 → 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.
@@ -78,8 +78,8 @@ export var QuotationModule = /*#__PURE__*/function (_BaseModule) {
78
78
  case 0:
79
79
  query = {};
80
80
  if (params !== null && params !== void 0 && params.channel) query.channel = params.channel;
81
- if ((params === null || params === void 0 ? void 0 : params.channel) === 'online-store') {
82
- query.channel = 'online_store';
81
+ if ((params === null || params === void 0 ? void 0 : params.channel) === 'online_store') {
82
+ query.channel = 'online-store';
83
83
  }
84
84
  _context2.next = 5;
85
85
  return this.request.get('/quotation/available', query, {
@@ -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 = 59;
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
- case 59:
601
- _context6.next = 61;
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 61:
608
+ case 62:
604
609
  this.store.status = 'ready';
605
610
  console.log('[VenueBooking] 初始化完成');
606
- _context6.next = 65;
611
+ _context6.next = 66;
607
612
  return this.core.effects.emit(VenueBookingHooks.onInited, {
608
613
  status: this.store.status
609
614
  });
610
- case 65:
615
+ case 66:
611
616
  this.logMethodSuccess('initialize', {
612
617
  status: this.store.status
613
618
  });
614
- _context6.next = 75;
619
+ _context6.next = 76;
615
620
  break;
616
- case 68:
617
- _context6.prev = 68;
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 75:
631
+ case 76:
627
632
  case "end":
628
633
  return _context6.stop();
629
634
  }
630
- }, _callee6, this, [[49, 68]]);
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$otherParams6, _this$store$venueProd, associatedMenus, menuListIds, allProducts, list, venueList, addonList, venueStore;
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$otherParams6 = this.otherParams) === null || _this$otherParams6 === void 0 || (_this$otherParams6 = _this$otherParams6.openData) === null || _this$otherParams6 === void 0 ? void 0 : _this$otherParams6['menu.associated_menus']) || [];
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$otherParams7, _this$otherParams8, _this$otherParams9, _this$otherParams10, _tempOrder$products2, result, tempOrder;
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$otherParams7 = this.otherParams) === null || _this$otherParams7 === void 0 ? void 0 : _this$otherParams7.platform,
1985
- businessCode: (_this$otherParams8 = this.otherParams) === null || _this$otherParams8 === void 0 ? void 0 : _this$otherParams8.businessCode,
1986
- channel: (_this$otherParams9 = this.otherParams) === null || _this$otherParams9 === void 0 ? void 0 : _this$otherParams9.channel,
1987
- type: (_this$otherParams10 = this.otherParams) === null || _this$otherParams10 === void 0 ? void 0 : _this$otherParams10.type
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;
@@ -43,8 +43,8 @@ var QuotationModule = class extends import_BaseModule.BaseModule {
43
43
  const query = {};
44
44
  if (params == null ? void 0 : params.channel)
45
45
  query.channel = params.channel;
46
- if ((params == null ? void 0 : params.channel) === "online-store") {
47
- query.channel = "online_store";
46
+ if ((params == null ? void 0 : params.channel) === "online_store") {
47
+ query.channel = "online-store";
48
48
  }
49
49
  const res = await this.request.get(
50
50
  "/quotation/available",
@@ -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";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@pisell/pisellos",
4
- "version": "2.1.123",
4
+ "version": "2.1.125",
5
5
  "description": "一个可扩展的前端模块化SDK框架,支持插件系统",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",