@pisell/pisellos 2.0.35 → 2.0.36

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.
@@ -42,10 +42,11 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
42
42
  * 更新step
43
43
  */
44
44
  updateStep(key: string, step: IStep): void;
45
- loadProducts({ category_ids, product_ids, collection, }: {
45
+ loadProducts({ category_ids, product_ids, collection, schedule_date, }: {
46
46
  category_ids?: number[];
47
47
  product_ids?: number[];
48
48
  collection?: number | string[];
49
+ schedule_date?: string;
49
50
  }): Promise<any>;
50
51
  loadProductByScheduleDate({ date, product_ids, category_ids, }: {
51
52
  date: string;
@@ -209,11 +209,11 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
209
209
  key: "loadProducts",
210
210
  value: function () {
211
211
  var _loadProducts = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_ref) {
212
- var _ref$category_ids, category_ids, _ref$product_ids, product_ids, _ref$collection, collection, userPlugin, customer_id, _userPlugin$get, productsData;
212
+ var _ref$category_ids, category_ids, _ref$product_ids, product_ids, _ref$collection, collection, schedule_date, userPlugin, customer_id, _userPlugin$get, productsData;
213
213
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
214
214
  while (1) switch (_context2.prev = _context2.next) {
215
215
  case 0:
216
- _ref$category_ids = _ref.category_ids, category_ids = _ref$category_ids === void 0 ? [] : _ref$category_ids, _ref$product_ids = _ref.product_ids, product_ids = _ref$product_ids === void 0 ? [] : _ref$product_ids, _ref$collection = _ref.collection, collection = _ref$collection === void 0 ? [] : _ref$collection;
216
+ _ref$category_ids = _ref.category_ids, category_ids = _ref$category_ids === void 0 ? [] : _ref$category_ids, _ref$product_ids = _ref.product_ids, product_ids = _ref$product_ids === void 0 ? [] : _ref$product_ids, _ref$collection = _ref.collection, collection = _ref$collection === void 0 ? [] : _ref$collection, schedule_date = _ref.schedule_date;
217
217
  // // 如果 schedule_ids 为空,则需要尝试从 schedule 模块里获取
218
218
  // if (!schedule_ids?.length) {
219
219
  // const schedule_ids_data = this.store.schedule
@@ -247,9 +247,9 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
247
247
  category_ids: category_ids,
248
248
  ids: product_ids,
249
249
  collection: collection,
250
- front_end_cache_id: this.cacheId
250
+ front_end_cache_id: this.cacheId,
251
251
  // client_schedule_ids: schedule_ids,
252
- // schedule_date,
252
+ schedule_date: schedule_date
253
253
  }, {
254
254
  useCache: true
255
255
  });
@@ -318,8 +318,8 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
318
318
  return this.loadProducts({
319
319
  // schedule_ids: scheduleIds,
320
320
  product_ids: allProductIds,
321
- category_ids: category_ids
322
- // schedule_date: date,
321
+ category_ids: category_ids,
322
+ schedule_date: date
323
323
  });
324
324
  case 9:
325
325
  return _context3.abrupt("return", _context3.sent);
@@ -42,10 +42,11 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
42
42
  * 更新step
43
43
  */
44
44
  updateStep(key: string, step: IStep): void;
45
- loadProducts({ category_ids, product_ids, collection, }: {
45
+ loadProducts({ category_ids, product_ids, collection, schedule_date, }: {
46
46
  category_ids?: number[];
47
47
  product_ids?: number[];
48
48
  collection?: number | string[];
49
+ schedule_date?: string;
49
50
  }): Promise<any>;
50
51
  loadProductByScheduleDate({ date, product_ids, category_ids, }: {
51
52
  date: string;
@@ -163,9 +163,9 @@ var BookingByStepImpl = class extends import_BaseModule.BaseModule {
163
163
  async loadProducts({
164
164
  category_ids = [],
165
165
  product_ids = [],
166
- collection = []
166
+ collection = [],
167
167
  // schedule_ids = [],
168
- // schedule_date,
168
+ schedule_date
169
169
  }) {
170
170
  var _a;
171
171
  let userPlugin = this.core.getPlugin("user");
@@ -196,9 +196,9 @@ var BookingByStepImpl = class extends import_BaseModule.BaseModule {
196
196
  category_ids,
197
197
  ids: product_ids,
198
198
  collection,
199
- front_end_cache_id: this.cacheId
199
+ front_end_cache_id: this.cacheId,
200
200
  // client_schedule_ids: schedule_ids,
201
- // schedule_date,
201
+ schedule_date
202
202
  },
203
203
  { useCache: true }
204
204
  );
@@ -227,8 +227,8 @@ var BookingByStepImpl = class extends import_BaseModule.BaseModule {
227
227
  return await this.loadProducts({
228
228
  // schedule_ids: scheduleIds,
229
229
  product_ids: allProductIds,
230
- category_ids
231
- // schedule_date: date,
230
+ category_ids,
231
+ schedule_date: date
232
232
  });
233
233
  }
234
234
  async updateQuotationPriceAndCart(date) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@pisell/pisellos",
4
- "version": "2.0.35",
4
+ "version": "2.0.36",
5
5
  "description": "一个可扩展的前端模块化SDK框架,支持插件系统",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",