@pisell/pisellos 1.0.75 → 1.0.76

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.
@@ -141,9 +141,16 @@ export var ProductList = /*#__PURE__*/function (_BaseModule) {
141
141
  sortedList = (productsData.data.list || []).slice().sort(function (a, b) {
142
142
  return Number(b.sort) - Number(a.sort);
143
143
  });
144
+ if (sortedList.length) {
145
+ sortedList.forEach(function (n) {
146
+ if (n.is_eject !== 1 && n['schedule.ids'] && n['schedule.ids'].length) {
147
+ n.is_eject = 1;
148
+ }
149
+ });
150
+ }
144
151
  this.addProduct(sortedList);
145
152
  return _context3.abrupt("return", sortedList);
146
- case 10:
153
+ case 11:
147
154
  case "end":
148
155
  return _context3.stop();
149
156
  }
@@ -1197,7 +1197,7 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
1197
1197
  date: date
1198
1198
  });
1199
1199
  // 如果 quantity 大于 1,且是预约商品,则进入购物车拆散成多条数据
1200
- if (addItemParams.quantity > 1 && !isNormalProduct(productData.origin)) {
1200
+ if (addItemParams.quantity > 1 && !isNormalProduct(productData)) {
1201
1201
  for (var i = 0; i < addItemParams.quantity; i++) {
1202
1202
  var newAddItemParams = cloneDeep(addItemParams);
1203
1203
  newAddItemParams.quantity = 1;
@@ -2735,7 +2735,9 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
2735
2735
  key: "checkMaxDurationCapacity",
2736
2736
  value: function checkMaxDurationCapacity() {
2737
2737
  var _this15 = this;
2738
- var cartItems = cloneDeep(this.store.cart.getItems());
2738
+ var cartItems = this.store.cart.getItems().filter(function (item) {
2739
+ return !isNormalProduct(item._productOrigin);
2740
+ });
2739
2741
  if (cartItems.length === 0) return {
2740
2742
  success: true,
2741
2743
  minAvailableCount: 0
@@ -103,6 +103,13 @@ var ProductList = class extends import_BaseModule.BaseModule {
103
103
  { useCache: true }
104
104
  );
105
105
  const sortedList = (productsData.data.list || []).slice().sort((a, b) => Number(b.sort) - Number(a.sort));
106
+ if (sortedList.length) {
107
+ sortedList.forEach((n) => {
108
+ if (n.is_eject !== 1 && n["schedule.ids"] && n["schedule.ids"].length) {
109
+ n.is_eject = 1;
110
+ }
111
+ });
112
+ }
106
113
  this.addProduct(sortedList);
107
114
  return sortedList;
108
115
  }
@@ -637,7 +637,7 @@ var BookingByStepImpl = class extends import_BaseModule.BaseModule {
637
637
  addItemParams.account = account;
638
638
  }
639
639
  this.addProductCheck({ date });
640
- if (addItemParams.quantity > 1 && !(0, import_utils5.isNormalProduct)(productData.origin)) {
640
+ if (addItemParams.quantity > 1 && !(0, import_utils5.isNormalProduct)(productData)) {
641
641
  for (let i = 0; i < addItemParams.quantity; i++) {
642
642
  const newAddItemParams = (0, import_lodash_es.cloneDeep)(addItemParams);
643
643
  newAddItemParams.quantity = 1;
@@ -1924,7 +1924,7 @@ var BookingByStepImpl = class extends import_BaseModule.BaseModule {
1924
1924
  }
1925
1925
  checkMaxDurationCapacity() {
1926
1926
  var _a, _b;
1927
- const cartItems = (0, import_lodash_es.cloneDeep)(this.store.cart.getItems());
1927
+ const cartItems = this.store.cart.getItems().filter((item) => !(0, import_utils5.isNormalProduct)(item._productOrigin));
1928
1928
  if (cartItems.length === 0)
1929
1929
  return { success: true, minAvailableCount: 0 };
1930
1930
  const itemsWithTime = [];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@pisell/pisellos",
4
- "version": "1.0.75",
4
+ "version": "1.0.76",
5
5
  "description": "一个可扩展的前端模块化SDK框架,支持插件系统",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",