@pisell/pisellos 0.0.47 → 0.0.48

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.
@@ -123,6 +123,8 @@ export var CartModule = /*#__PURE__*/function (_BaseModule) {
123
123
  if (product) {
124
124
  cartItem._productOrigin = cloneDeep(product);
125
125
  cartItem._productInit = cloneDeep(product);
126
+ cartItem._bundleOrigin = cloneDeep(bundle);
127
+ cartItem._optionsOrigin = cloneDeep(options);
126
128
  cartItem = formatProductToCartItem({
127
129
  cartItem: cartItem,
128
130
  product: product,
@@ -214,6 +216,8 @@ export var CartModule = /*#__PURE__*/function (_BaseModule) {
214
216
  cartItem = params.cartItem,
215
217
  account = params.account,
216
218
  product = params.product,
219
+ bundle = params.bundle,
220
+ options = params.options,
217
221
  discounts = params.discounts,
218
222
  resources = params.resources,
219
223
  note = params.note,
@@ -230,9 +234,13 @@ export var CartModule = /*#__PURE__*/function (_BaseModule) {
230
234
  }
231
235
  if (product) {
232
236
  tempCartItem._productOrigin = cloneDeep(product);
237
+ tempCartItem._bundleOrigin = cloneDeep(bundle);
238
+ tempCartItem._optionsOrigin = cloneDeep(options);
233
239
  tempCartItem = formatProductToCartItem({
234
240
  cartItem: tempCartItem,
235
- product: product
241
+ product: product,
242
+ bundle: bundle,
243
+ options: options
236
244
  });
237
245
  }
238
246
  if (discounts) {
@@ -106,6 +106,10 @@ export interface CartItem {
106
106
  _resourceOrigin?: Resource[];
107
107
  /** 容量 */
108
108
  capacity?: any;
109
+ /** 商品套餐原始数据 */
110
+ _bundleOrigin?: any[];
111
+ /** 商品规格原始数据 */
112
+ _optionsOrigin?: any[];
109
113
  }
110
114
  /**
111
115
  * 购物车状态接口
@@ -147,6 +151,10 @@ export interface IUpdateItemParams {
147
151
  account?: Account;
148
152
  /** 商品 */
149
153
  product?: ProductData;
154
+ /** 商品套餐信息 */
155
+ bundle?: any[];
156
+ /** 商品规格信息 */
157
+ options?: any[];
150
158
  /** 折扣列表 */
151
159
  discounts?: IDiscount[];
152
160
  /** 数量 */
@@ -105,6 +105,7 @@ export var formatProductToCartItem = function formatProductToCartItem(params) {
105
105
  cartItem.isNormalProduct = isNormalProduct(product);
106
106
  cartItem.is_charge_tax = product === null || product === void 0 ? void 0 : product.is_charge_tax;
107
107
  }
108
+ console.log('cartItem>>>>>>', cartItem);
108
109
  if (bundle !== null && bundle !== void 0 && bundle.length) {
109
110
  cartItem.bundle = formatBundle(bundle);
110
111
  }
@@ -77,6 +77,8 @@ var CartModule = class extends import_BaseModule.BaseModule {
77
77
  if (product) {
78
78
  cartItem._productOrigin = (0, import_lodash_es.cloneDeep)(product);
79
79
  cartItem._productInit = (0, import_lodash_es.cloneDeep)(product);
80
+ cartItem._bundleOrigin = (0, import_lodash_es.cloneDeep)(bundle);
81
+ cartItem._optionsOrigin = (0, import_lodash_es.cloneDeep)(options);
80
82
  cartItem = (0, import_utils.formatProductToCartItem)({
81
83
  cartItem,
82
84
  product,
@@ -121,6 +123,8 @@ var CartModule = class extends import_BaseModule.BaseModule {
121
123
  cartItem,
122
124
  account,
123
125
  product,
126
+ bundle,
127
+ options,
124
128
  discounts,
125
129
  resources,
126
130
  note,
@@ -136,9 +140,13 @@ var CartModule = class extends import_BaseModule.BaseModule {
136
140
  }
137
141
  if (product) {
138
142
  tempCartItem._productOrigin = (0, import_lodash_es.cloneDeep)(product);
143
+ tempCartItem._bundleOrigin = (0, import_lodash_es.cloneDeep)(bundle);
144
+ tempCartItem._optionsOrigin = (0, import_lodash_es.cloneDeep)(options);
139
145
  tempCartItem = (0, import_utils.formatProductToCartItem)({
140
146
  cartItem: tempCartItem,
141
- product
147
+ product,
148
+ bundle,
149
+ options
142
150
  });
143
151
  }
144
152
  if (discounts) {
@@ -106,6 +106,10 @@ export interface CartItem {
106
106
  _resourceOrigin?: Resource[];
107
107
  /** 容量 */
108
108
  capacity?: any;
109
+ /** 商品套餐原始数据 */
110
+ _bundleOrigin?: any[];
111
+ /** 商品规格原始数据 */
112
+ _optionsOrigin?: any[];
109
113
  }
110
114
  /**
111
115
  * 购物车状态接口
@@ -147,6 +151,10 @@ export interface IUpdateItemParams {
147
151
  account?: Account;
148
152
  /** 商品 */
149
153
  product?: ProductData;
154
+ /** 商品套餐信息 */
155
+ bundle?: any[];
156
+ /** 商品规格信息 */
157
+ options?: any[];
150
158
  /** 折扣列表 */
151
159
  discounts?: IDiscount[];
152
160
  /** 数量 */
@@ -129,6 +129,7 @@ var formatProductToCartItem = (params) => {
129
129
  cartItem.isNormalProduct = isNormalProduct(product);
130
130
  cartItem.is_charge_tax = product == null ? void 0 : product.is_charge_tax;
131
131
  }
132
+ console.log("cartItem>>>>>>", cartItem);
132
133
  if (bundle == null ? void 0 : bundle.length) {
133
134
  cartItem.bundle = formatBundle(bundle);
134
135
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@pisell/pisellos",
4
- "version": "0.0.47",
4
+ "version": "0.0.48",
5
5
  "description": "一个可扩展的前端模块化SDK框架,支持插件系统",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",