@pisell/pisellos 3.0.65 → 3.0.67

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.
@@ -128,7 +128,8 @@ export var ProductList = /*#__PURE__*/function (_BaseModule) {
128
128
  front_end_cache_id: cacheId,
129
129
  // client_schedule_ids: schedule_ids,
130
130
  schedule_date: schedule_date,
131
- application_code: (_this$otherParams = this.otherParams) === null || _this$otherParams === void 0 ? void 0 : _this$otherParams.channel
131
+ application_code: (_this$otherParams = this.otherParams) === null || _this$otherParams === void 0 ? void 0 : _this$otherParams.channel,
132
+ is_eject: 1
132
133
  }, {
133
134
  useCache: true
134
135
  });
@@ -137,9 +138,16 @@ export var ProductList = /*#__PURE__*/function (_BaseModule) {
137
138
  sortedList = (productsData.data.list || []).slice().sort(function (a, b) {
138
139
  return Number(b.sort) - Number(a.sort);
139
140
  });
141
+ if (sortedList.length) {
142
+ sortedList.forEach(function (n) {
143
+ if (n.is_eject !== 1 && n['schedule.ids'] && n['schedule.ids'].length) {
144
+ n.is_eject = 1;
145
+ }
146
+ });
147
+ }
140
148
  this.addProduct(sortedList);
141
149
  return _context3.abrupt("return", sortedList);
142
- case 10:
150
+ case 11:
143
151
  case "end":
144
152
  return _context3.stop();
145
153
  }
@@ -180,7 +180,10 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
180
180
  * @param {ProductData} productData
181
181
  * @memberof BookingByStepImpl
182
182
  */
183
- storeProduct(productData: ProductData): Promise<void>;
183
+ storeProduct(productData: ProductData): {
184
+ success: boolean;
185
+ errorCode?: string;
186
+ };
184
187
  /**
185
188
  * 往购物车加商品数据
186
189
  *
@@ -203,7 +206,10 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
203
206
  endTime: string;
204
207
  } | null;
205
208
  account?: Account | null;
206
- }): void;
209
+ }): {
210
+ success: boolean;
211
+ errorCode?: string;
212
+ };
207
213
  /**
208
214
  * 添加完购物车以后做的一些检测,比如日期是否在同一天
209
215
  *
@@ -294,8 +300,6 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
294
300
  };
295
301
  getTimeSlotByAllResources(resources_code: string): any[];
296
302
  submitTimeSlot(timeSlots: TimeSliceItem): void;
297
- clearCache(): void;
298
- clearCacheByModule(module: string): void;
299
303
  private getScheduleDataByIds;
300
304
  openProductDetail(productId: number): Promise<void>;
301
305
  closeProductDetail(): void;
@@ -312,6 +316,30 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
312
316
  count: number;
313
317
  left: number;
314
318
  }[];
319
+ /**
320
+ * 找到多个资源的公共可用时间段
321
+ */
322
+ private findCommonAvailableTimeSlots;
323
+ checkMaxDurationCapacity(): {
324
+ success: boolean;
325
+ minAvailableCount: number;
326
+ };
327
+ /**
328
+ * 将 ProductData 转换为 CartItem,但不添加到购物车
329
+ * 参考 addProductToCart 方法的实现
330
+ */
331
+ private convertProductToCartItem;
332
+ checkMaxDurationCapacityForDetailNums({ product, date, account, }: {
333
+ product: ProductData;
334
+ date?: {
335
+ startTime: string;
336
+ endTime: string;
337
+ } | null;
338
+ account?: Account | null;
339
+ }): {
340
+ success: boolean;
341
+ minAvailableCount: number;
342
+ };
315
343
  setOtherData(key: string, value: any): void;
316
344
  getOtherData(key: string): any;
317
345
  getProductTypeById(id: number): Promise<"duration" | "session" | "normal">;