@pisell/pisellos 0.0.354 → 0.0.355

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.
@@ -342,7 +342,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
342
342
  };
343
343
  setOtherData(key: string, value: any): void;
344
344
  getOtherData(key: string): any;
345
- getProductTypeById(id: number): Promise<"duration" | "session" | "normal">;
345
+ getProductTypeById(id: number): Promise<"normal" | "duration" | "session">;
346
346
  /**
347
347
  * 提供给 UI 的方法,减轻 UI 层的计算压力,UI 层只需要传递 cartItemId 和 resourceCode 即返回对应的 renderList
348
348
  *
@@ -3181,7 +3181,9 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
3181
3181
  var product = _ref13.product,
3182
3182
  date = _ref13.date,
3183
3183
  account = _ref13.account;
3184
- var cartItems = cloneDeep(this.store.cart.getItems());
3184
+ var cartItems = this.store.cart.getItems().filter(function (item) {
3185
+ return !isNormalProduct(item._productOrigin);
3186
+ });
3185
3187
 
3186
3188
  // 将 ProductData 转换为 CartItem 但不真正添加到购物车
3187
3189
  var currentCartItem = this.convertProductToCartItem({
@@ -342,7 +342,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
342
342
  };
343
343
  setOtherData(key: string, value: any): void;
344
344
  getOtherData(key: string): any;
345
- getProductTypeById(id: number): Promise<"duration" | "session" | "normal">;
345
+ getProductTypeById(id: number): Promise<"normal" | "duration" | "session">;
346
346
  /**
347
347
  * 提供给 UI 的方法,减轻 UI 层的计算压力,UI 层只需要传递 cartItemId 和 resourceCode 即返回对应的 renderList
348
348
  *
@@ -2199,7 +2199,7 @@ var BookingByStepImpl = class extends import_BaseModule.BaseModule {
2199
2199
  account
2200
2200
  }) {
2201
2201
  var _a, _b;
2202
- const cartItems = (0, import_lodash_es.cloneDeep)(this.store.cart.getItems());
2202
+ const cartItems = this.store.cart.getItems().filter((item) => !(0, import_utils5.isNormalProduct)(item._productOrigin));
2203
2203
  const currentCartItem = this.convertProductToCartItem({ product, date, account });
2204
2204
  cartItems.push(currentCartItem);
2205
2205
  if (cartItems.length === 0)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@pisell/pisellos",
4
- "version": "0.0.354",
4
+ "version": "0.0.355",
5
5
  "description": "一个可扩展的前端模块化SDK框架,支持插件系统",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",