@pisell/pisellos 3.0.66 → 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.
- package/dist/modules/ProductList/index.js +10 -2
- package/dist/solution/BookingByStep/index.d.ts +16 -0
- package/dist/solution/BookingByStep/index.js +505 -62
- package/dist/solution/BookingByStep/utils/capacity.d.ts +7 -2
- package/dist/solution/BookingByStep/utils/capacity.js +24 -8
- package/dist/solution/ShopDiscount/index.js +27 -9
- package/lib/modules/ProductList/index.js +9 -1
- package/lib/solution/BookingByStep/index.d.ts +16 -0
- package/lib/solution/BookingByStep/index.js +316 -44
- package/lib/solution/BookingByStep/utils/capacity.d.ts +7 -2
- package/lib/solution/BookingByStep/utils/capacity.js +21 -8
- package/lib/solution/ShopDiscount/index.js +9 -0
- package/package.json +1 -1
|
@@ -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
|
|
150
|
+
case 11:
|
|
143
151
|
case "end":
|
|
144
152
|
return _context3.stop();
|
|
145
153
|
}
|
|
@@ -324,6 +324,22 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
324
324
|
success: boolean;
|
|
325
325
|
minAvailableCount: number;
|
|
326
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
|
+
};
|
|
327
343
|
setOtherData(key: string, value: any): void;
|
|
328
344
|
getOtherData(key: string): any;
|
|
329
345
|
getProductTypeById(id: number): Promise<"duration" | "session" | "normal">;
|