@pisell/pisellos 2.2.32 → 2.2.33

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(): "normal" | "duration" | "session";
52
+ getProductType(): "duration" | "session" | "normal";
53
53
  }
@@ -162,6 +162,8 @@ export interface ProductData {
162
162
  categories: ProductCategory[];
163
163
  /** 套餐组 */
164
164
  bundle_groups: ProductBundleGroup[];
165
+ /** 套餐组 */
166
+ bundle_group: ProductBundleGroup[];
165
167
  /** 商品资源 */
166
168
  product_resource?: {
167
169
  resources?: ProductResourceItem[];
@@ -108,11 +108,11 @@ export function applyPriceDataToProducts(products, priceData) {
108
108
  }
109
109
  }
110
110
 
111
- // 3. 更新 bundle_groups 价格
112
- if (updatedProduct.bundle_groups && updatedProduct.bundle_groups.length > 0) {
111
+ // 3. 更新 bundle_group 价格
112
+ if (updatedProduct.bundle_group && updatedProduct.bundle_group.length > 0) {
113
113
  var productBundleMap = bundleMap.get(product.id);
114
114
  if (productBundleMap) {
115
- updatedProduct.bundle_groups = updatedProduct.bundle_groups.map(function (bg) {
115
+ updatedProduct.bundle_group = updatedProduct.bundle_group.map(function (bg) {
116
116
  var groupItemMap = productBundleMap.get(bg.id); // O(1)
117
117
  if (!groupItemMap) return bg;
118
118
  return _objectSpread(_objectSpread({}, bg), {}, {
@@ -343,7 +343,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
343
343
  };
344
344
  setOtherData(key: string, value: any): void;
345
345
  getOtherData(key: string): any;
346
- getProductTypeById(id: number): Promise<"normal" | "duration" | "session">;
346
+ getProductTypeById(id: number): Promise<"duration" | "session" | "normal">;
347
347
  /**
348
348
  * 提供给 UI 的方法,减轻 UI 层的计算压力,UI 层只需要传递 cartItemId 和 resourceCode 即返回对应的 renderList
349
349
  *
@@ -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(): "normal" | "duration" | "session";
52
+ getProductType(): "duration" | "session" | "normal";
53
53
  }
@@ -162,6 +162,8 @@ export interface ProductData {
162
162
  categories: ProductCategory[];
163
163
  /** 套餐组 */
164
164
  bundle_groups: ProductBundleGroup[];
165
+ /** 套餐组 */
166
+ bundle_group: ProductBundleGroup[];
165
167
  /** 商品资源 */
166
168
  product_resource?: {
167
169
  resources?: ProductResourceItem[];
@@ -94,10 +94,10 @@ function applyPriceDataToProducts(products, priceData) {
94
94
  });
95
95
  }
96
96
  }
97
- if (updatedProduct.bundle_groups && updatedProduct.bundle_groups.length > 0) {
97
+ if (updatedProduct.bundle_group && updatedProduct.bundle_group.length > 0) {
98
98
  const productBundleMap = bundleMap.get(product.id);
99
99
  if (productBundleMap) {
100
- updatedProduct.bundle_groups = updatedProduct.bundle_groups.map(
100
+ updatedProduct.bundle_group = updatedProduct.bundle_group.map(
101
101
  (bg) => {
102
102
  const groupItemMap = productBundleMap.get(bg.id);
103
103
  if (!groupItemMap)
@@ -343,7 +343,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
343
343
  };
344
344
  setOtherData(key: string, value: any): void;
345
345
  getOtherData(key: string): any;
346
- getProductTypeById(id: number): Promise<"normal" | "duration" | "session">;
346
+ getProductTypeById(id: number): Promise<"duration" | "session" | "normal">;
347
347
  /**
348
348
  * 提供给 UI 的方法,减轻 UI 层的计算压力,UI 层只需要传递 cartItemId 和 resourceCode 即返回对应的 renderList
349
349
  *
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@pisell/pisellos",
4
- "version": "2.2.32",
4
+ "version": "2.2.33",
5
5
  "description": "一个可扩展的前端模块化SDK框架,支持插件系统",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",