@pisell/pisellos 0.0.111 → 0.0.112
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.
|
@@ -212,7 +212,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
212
212
|
}): void;
|
|
213
213
|
setOtherData(key: string, value: any): void;
|
|
214
214
|
getOtherData(key: string): any;
|
|
215
|
-
getProductTypeById(id: number): Promise<"
|
|
215
|
+
getProductTypeById(id: number): Promise<"duration" | "session" | "normal">;
|
|
216
216
|
/**
|
|
217
217
|
* 提供给 UI 的方法,减轻 UI 层的计算压力,UI 层只需要传递 cartItemId 和 resourceCode 即返回对应的 renderList
|
|
218
218
|
*
|
|
@@ -292,6 +292,8 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
292
292
|
return n.date === date;
|
|
293
293
|
}).flatMap(function (n) {
|
|
294
294
|
return n.schedule_id;
|
|
295
|
+
}).filter(function (n) {
|
|
296
|
+
return n !== null;
|
|
295
297
|
}); // 尝试去拿schedule 里的 other_product_ids 和 product_ids 拼在一起去重
|
|
296
298
|
otherProductsIds = this.store.schedule.getOtherProductsIds() || [];
|
|
297
299
|
allProductIds = [].concat(_toConsumableArray(product_ids), _toConsumableArray(otherProductsIds)).filter(function (n, index, self) {
|
|
@@ -212,7 +212,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
212
212
|
}): void;
|
|
213
213
|
setOtherData(key: string, value: any): void;
|
|
214
214
|
getOtherData(key: string): any;
|
|
215
|
-
getProductTypeById(id: number): Promise<"
|
|
215
|
+
getProductTypeById(id: number): Promise<"duration" | "session" | "normal">;
|
|
216
216
|
/**
|
|
217
217
|
* 提供给 UI 的方法,减轻 UI 层的计算压力,UI 层只需要传递 cartItemId 和 resourceCode 即返回对应的 renderList
|
|
218
218
|
*
|
|
@@ -220,7 +220,7 @@ var BookingByStepImpl = class extends import_BaseModule.BaseModule {
|
|
|
220
220
|
{ date, status: "available", week: "", weekNum: 0 },
|
|
221
221
|
{ date, status: "available", week: "", weekNum: 0 }
|
|
222
222
|
]);
|
|
223
|
-
const scheduleIds = scheduleList.filter((n) => n.date === date).flatMap((n) => n.schedule_id);
|
|
223
|
+
const scheduleIds = scheduleList.filter((n) => n.date === date).flatMap((n) => n.schedule_id).filter((n) => n !== null);
|
|
224
224
|
const otherProductsIds = this.store.schedule.getOtherProductsIds() || [];
|
|
225
225
|
const allProductIds = [...product_ids, ...otherProductsIds].filter((n, index, self) => self.indexOf(n) === index);
|
|
226
226
|
return await this.loadProducts({
|