@pisell/pisellos 2.1.51 → 2.1.52

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.
@@ -49,5 +49,5 @@ export declare class Product extends BaseModule implements Module {
49
49
  getCategories(): ProductCategory[];
50
50
  setOtherParams(key: string, value: any): void;
51
51
  getOtherParams(): any;
52
- getProductType(): "duration" | "session" | "normal";
52
+ getProductType(): "normal" | "duration" | "session";
53
53
  }
@@ -660,7 +660,10 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
660
660
  discount_list: []
661
661
  }))]);
662
662
  } else {
663
- processedProductsMap.set(product._id, [_this3.hooks.setProduct(originProduct, _objectSpread(_objectSpread({}, isManualDiscount ? {} : {
663
+ processedProductsMap.set(product._id, [_this3.hooks.setProduct(originProduct, _objectSpread(_objectSpread({}, isManualDiscount ? {
664
+ price: product.price,
665
+ main_product_selling_price: product.price
666
+ } : {
664
667
  _id: product._id.split('___')[0] + '___' + index,
665
668
  total: product.origin_total || product.total,
666
669
  price: product.price,
@@ -673,7 +676,7 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
673
676
  // bundle子商品:保存到扁平化Map
674
677
  processedFlatItemsMap.set(flatItem._id, [_objectSpread(_objectSpread({}, flatItem), {}, {
675
678
  discount_list: [],
676
- price: flatItem.bundleItem.original_price,
679
+ price: isManualDiscount ? flatItem.bundleItem.price : flatItem.bundleItem.original_price,
677
680
  processed: true
678
681
  })]);
679
682
  }
@@ -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
  *
@@ -49,5 +49,5 @@ export declare class Product extends BaseModule implements Module {
49
49
  getCategories(): ProductCategory[];
50
50
  setOtherParams(key: string, value: any): void;
51
51
  getOtherParams(): any;
52
- getProductType(): "duration" | "session" | "normal";
52
+ getProductType(): "normal" | "duration" | "session";
53
53
  }
@@ -467,7 +467,10 @@ var RulesModule = class extends import_BaseModule.BaseModule {
467
467
  processedProductsMap.set(
468
468
  product._id,
469
469
  [this.hooks.setProduct(originProduct, {
470
- ...isManualDiscount ? {} : {
470
+ ...isManualDiscount ? {
471
+ price: product.price,
472
+ main_product_selling_price: product.price
473
+ } : {
471
474
  _id: product._id.split("___")[0] + "___" + index,
472
475
  total: product.origin_total || product.total,
473
476
  price: product.price,
@@ -481,7 +484,7 @@ var RulesModule = class extends import_BaseModule.BaseModule {
481
484
  processedFlatItemsMap.set(flatItem._id, [{
482
485
  ...flatItem,
483
486
  discount_list: [],
484
- price: flatItem.bundleItem.original_price,
487
+ price: isManualDiscount ? flatItem.bundleItem.price : flatItem.bundleItem.original_price,
485
488
  processed: true
486
489
  }]);
487
490
  }
@@ -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
  *
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@pisell/pisellos",
4
- "version": "2.1.51",
4
+ "version": "2.1.52",
5
5
  "description": "一个可扩展的前端模块化SDK框架,支持插件系统",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",