@pisell/pisellos 2.2.21 → 2.2.23

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.
@@ -16,7 +16,7 @@ export declare const calculateSubtotal: (items: CartItem[]) => string;
16
16
  * @return {*}
17
17
  * @Author: xiangfeng.xue
18
18
  */
19
- export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) => Decimal | "0.00";
19
+ export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) => "0.00" | Decimal;
20
20
  /**
21
21
  * @title: 计算定金
22
22
  * @param items - 购物车商品数组
@@ -465,6 +465,7 @@ export var ProductsModule = /*#__PURE__*/function (_BaseModule) {
465
465
  // 组合规格
466
466
  'variantGroup.variantItem'],
467
467
  open_deposit: 1,
468
+ is_append_product_description: 1,
468
469
  with_count: ['bundleGroup', 'optionGroup'],
469
470
  with_category_tree: 1,
470
471
  status: 'published',
@@ -270,20 +270,14 @@ export var ShopDiscountImpl = /*#__PURE__*/function (_BaseModule) {
270
270
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
271
271
  while (1) switch (_context4.prev = _context4.next) {
272
272
  case 0:
273
- if (!(this.isWalkIn() && this.isWalkIn(customer === null || customer === void 0 ? void 0 : customer.id))) {
274
- _context4.next = 2;
275
- break;
276
- }
277
- return _context4.abrupt("return");
278
- case 2:
279
273
  if (!(((_this$store$customer = this.store.customer) === null || _this$store$customer === void 0 ? void 0 : _this$store$customer.id) !== customer.id)) {
280
- _context4.next = 6;
274
+ _context4.next = 4;
281
275
  break;
282
276
  }
283
277
  this.store.customer = customer;
284
- _context4.next = 6;
278
+ _context4.next = 4;
285
279
  return this.core.effects.emit("".concat(this.name, ":onCustomerChange"), customer);
286
- case 6:
280
+ case 4:
287
281
  case "end":
288
282
  return _context4.stop();
289
283
  }
@@ -528,9 +522,9 @@ export var ShopDiscountImpl = /*#__PURE__*/function (_BaseModule) {
528
522
  // 是否是walkIn
529
523
  }, {
530
524
  key: "isWalkIn",
531
- value: function isWalkIn(id) {
525
+ value: function isWalkIn() {
532
526
  var _this$getCustomer;
533
- return (id !== null && id !== void 0 ? id : ((_this$getCustomer = this.getCustomer()) === null || _this$getCustomer === void 0 ? void 0 : _this$getCustomer.id) || 1) === 1;
527
+ return (((_this$getCustomer = this.getCustomer()) === null || _this$getCustomer === void 0 ? void 0 : _this$getCustomer.id) || 1) === 1;
534
528
  }
535
529
 
536
530
  // 触发优惠列表变更事件
@@ -16,7 +16,7 @@ export declare const calculateSubtotal: (items: CartItem[]) => string;
16
16
  * @return {*}
17
17
  * @Author: xiangfeng.xue
18
18
  */
19
- export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) => Decimal | "0.00";
19
+ export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) => "0.00" | Decimal;
20
20
  /**
21
21
  * @title: 计算定金
22
22
  * @param items - 购物车商品数组
@@ -303,6 +303,7 @@ var ProductsModule = class extends import_BaseModule.BaseModule {
303
303
  "variantGroup.variantItem"
304
304
  ],
305
305
  open_deposit: 1,
306
+ is_append_product_description: 1,
306
307
  with_count: ["bundleGroup", "optionGroup"],
307
308
  with_category_tree: 1,
308
309
  status: "published",
@@ -185,9 +185,6 @@ var ShopDiscountImpl = class extends import_BaseModule.BaseModule {
185
185
  // 设置客户
186
186
  async setCustomer(customer) {
187
187
  var _a;
188
- if (this.isWalkIn() && this.isWalkIn(customer == null ? void 0 : customer.id)) {
189
- return;
190
- }
191
188
  if (((_a = this.store.customer) == null ? void 0 : _a.id) !== customer.id) {
192
189
  this.store.customer = customer;
193
190
  await this.core.effects.emit(
@@ -351,9 +348,9 @@ var ShopDiscountImpl = class extends import_BaseModule.BaseModule {
351
348
  return this.store.customer;
352
349
  }
353
350
  // 是否是walkIn
354
- isWalkIn(id) {
351
+ isWalkIn() {
355
352
  var _a;
356
- return (id ?? (((_a = this.getCustomer()) == null ? void 0 : _a.id) || 1)) === 1;
353
+ return (((_a = this.getCustomer()) == null ? void 0 : _a.id) || 1) === 1;
357
354
  }
358
355
  // 触发优惠列表变更事件
359
356
  async emitDiscountListChange(discountList) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@pisell/pisellos",
4
- "version": "2.2.21",
4
+ "version": "2.2.23",
5
5
  "description": "一个可扩展的前端模块化SDK框架,支持插件系统",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",