@pisell/pisellos 0.0.32 → 0.0.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.
@@ -301,7 +301,7 @@ export var ShopDiscountImpl = /*#__PURE__*/function (_BaseModule) {
301
301
  key: "scanCode",
302
302
  value: function () {
303
303
  var _scanCode = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(code) {
304
- var _this$store$discount3, resultDiscountList, rulesModule, _ref3, newProductList, newDiscountList, isAvailable;
304
+ var _this$store$discount3, resultDiscountList, rulesModule, _ref3, newProductList, newDiscountList, isAvailable, _this$options$otherPa6;
305
305
  return _regeneratorRuntime().wrap(function _callee5$(_context5) {
306
306
  while (1) switch (_context5.prev = _context5.next) {
307
307
  case 0:
@@ -343,7 +343,7 @@ export var ShopDiscountImpl = /*#__PURE__*/function (_BaseModule) {
343
343
  }
344
344
  this.setDiscountList(newDiscountList || []);
345
345
  this.setProductList(newProductList || []);
346
- if (!(this.isWalkIn() && resultDiscountList.length)) {
346
+ if (!(this.isWalkIn() && resultDiscountList.length && ((_this$options$otherPa6 = this.options.otherParams) === null || _this$options$otherPa6 === void 0 ? void 0 : _this$options$otherPa6.platform) === 'shop')) {
347
347
  _context5.next = 17;
348
348
  break;
349
349
  }
@@ -186,7 +186,7 @@ var ShopDiscountImpl = class extends import_BaseModule.BaseModule {
186
186
  }
187
187
  // 扫码输入code
188
188
  async scanCode(code) {
189
- var _a;
189
+ var _a, _b;
190
190
  try {
191
191
  const resultDiscountList = await ((_a = this.store.discount) == null ? void 0 : _a.batchSearch(code)) || [];
192
192
  const rulesModule = this.store.rules;
@@ -213,7 +213,7 @@ var ShopDiscountImpl = class extends import_BaseModule.BaseModule {
213
213
  if (isAvailable) {
214
214
  this.setDiscountList(newDiscountList || []);
215
215
  this.setProductList(newProductList || []);
216
- if (this.isWalkIn() && resultDiscountList.length) {
216
+ if (this.isWalkIn() && resultDiscountList.length && ((_b = this.options.otherParams) == null ? void 0 : _b.platform) === "shop") {
217
217
  await this.getCustomerWallet(
218
218
  resultDiscountList[0].customer_id
219
219
  );
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@pisell/pisellos",
4
- "version": "0.0.32",
4
+ "version": "0.0.33",
5
5
  "description": "一个可扩展的前端模块化SDK框架,支持插件系统",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",