@pisell/pisellos 3.0.40 → 3.0.41

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.
@@ -279,7 +279,7 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
279
279
  value: function () {
280
280
  var _loadProductByScheduleDate = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(_ref2) {
281
281
  var _schedule$product_ids;
282
- var date, _ref2$product_ids, product_ids, _ref2$category_ids, category_ids, scheduleList, schedule, otherProductsIds, allProductIds;
282
+ var date, _ref2$product_ids, product_ids, _ref2$category_ids, category_ids, scheduleList, newProductIds, schedule, otherProductsIds, allProductIds;
283
283
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
284
284
  while (1) switch (_context3.prev = _context3.next) {
285
285
  case 0:
@@ -296,11 +296,10 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
296
296
  week: '',
297
297
  weekNum: 0
298
298
  }]);
299
- // const scheduleIds = scheduleList
299
+ newProductIds = []; // const scheduleIds = scheduleList
300
300
  // .filter((n) => n.date === date)
301
301
  // .flatMap((n) => n.schedule_id)
302
302
  // .filter((n) => n !== null && n !== undefined);
303
-
304
303
  // 如果外面没传 product_ids,尝试从对应 schedule 里拿 product_ids
305
304
  // if (!product_ids?.length) {
306
305
  // const schedule = scheduleList.find((n) => n.date === date);
@@ -313,23 +312,23 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
313
312
  return n.date === date;
314
313
  });
315
314
  if (schedule && (_schedule$product_ids = schedule.product_ids) !== null && _schedule$product_ids !== void 0 && _schedule$product_ids.length) {
316
- product_ids = schedule.product_ids;
315
+ newProductIds = schedule.product_ids;
317
316
  }
318
317
  // 尝试去拿schedule 里的 other_product_ids 和 product_ids 拼在一起去重
319
318
  otherProductsIds = this.store.schedule.getOtherProductsIds() || [];
320
- allProductIds = [].concat(_toConsumableArray(product_ids), _toConsumableArray(otherProductsIds)).filter(function (n, index, self) {
319
+ allProductIds = [].concat(_toConsumableArray(newProductIds), _toConsumableArray(otherProductsIds)).filter(function (n, index, self) {
321
320
  return self.indexOf(n) === index;
322
321
  });
323
- _context3.next = 9;
322
+ _context3.next = 10;
324
323
  return this.loadProducts({
325
324
  // schedule_ids: scheduleIds,
326
325
  product_ids: allProductIds,
327
326
  category_ids: category_ids,
328
327
  schedule_date: date
329
328
  });
330
- case 9:
331
- return _context3.abrupt("return", _context3.sent);
332
329
  case 10:
330
+ return _context3.abrupt("return", _context3.sent);
331
+ case 11:
333
332
  case "end":
334
333
  return _context3.stop();
335
334
  }
@@ -219,12 +219,13 @@ var BookingByStepImpl = class extends import_BaseModule.BaseModule {
219
219
  { date, status: "available", week: "", weekNum: 0 },
220
220
  { date, status: "available", week: "", weekNum: 0 }
221
221
  ]);
222
+ let newProductIds = [];
222
223
  const schedule = scheduleList.find((n) => n.date === date);
223
224
  if (schedule && ((_a = schedule.product_ids) == null ? void 0 : _a.length)) {
224
- product_ids = schedule.product_ids;
225
+ newProductIds = schedule.product_ids;
225
226
  }
226
227
  const otherProductsIds = this.store.schedule.getOtherProductsIds() || [];
227
- const allProductIds = [...product_ids, ...otherProductsIds].filter(
228
+ const allProductIds = [...newProductIds, ...otherProductsIds].filter(
228
229
  (n, index, self) => self.indexOf(n) === index
229
230
  );
230
231
  return await this.loadProducts({
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@pisell/pisellos",
4
- "version": "3.0.40",
4
+ "version": "3.0.41",
5
5
  "description": "一个可扩展的前端模块化SDK框架,支持插件系统",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",