@pisell/pisellos 2.2.18 → 2.2.19

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.
@@ -145,6 +145,15 @@ export var WalletPassPaymentImpl = /*#__PURE__*/function () {
145
145
  userIdentificationCodes: []
146
146
  });
147
147
  case 4:
148
+ if (![1, 0].includes((walletParams === null || walletParams === void 0 ? void 0 : walletParams.customer_id) || 0)) {
149
+ _context.next = 6;
150
+ break;
151
+ }
152
+ return _context.abrupt("return", {
153
+ walletRecommendList: [],
154
+ userIdentificationCodes: []
155
+ });
156
+ case 6:
148
157
  // 发送初始化开始事件
149
158
  this.emitEvent(WalletPassHooks.OnWalletInitializationStarted, {
150
159
  businessData: businessData,
@@ -157,10 +166,10 @@ export var WalletPassPaymentImpl = /*#__PURE__*/function () {
157
166
  order_wait_pay_amount: businessData.order_wait_pay_amount,
158
167
  products_count: ((_businessData$product = businessData.products) === null || _businessData$product === void 0 ? void 0 : _businessData$product.length) || 0
159
168
  });
160
- _context.prev = 6;
161
- _context.next = 9;
169
+ _context.prev = 8;
170
+ _context.next = 11;
162
171
  return this.initializeWalletDataAsync(walletParams);
163
- case 9:
172
+ case 11:
164
173
  result = _context.sent;
165
174
  endTime = Date.now();
166
175
  duration = endTime - startTime; // 发送初始化完成事件
@@ -177,9 +186,9 @@ export var WalletPassPaymentImpl = /*#__PURE__*/function () {
177
186
  userIdentificationCodes_count: ((_result$userIdentific = result.userIdentificationCodes) === null || _result$userIdentific === void 0 ? void 0 : _result$userIdentific.length) || 0
178
187
  });
179
188
  return _context.abrupt("return", result);
180
- case 17:
181
- _context.prev = 17;
182
- _context.t0 = _context["catch"](6);
189
+ case 19:
190
+ _context.prev = 19;
191
+ _context.t0 = _context["catch"](8);
183
192
  _endTime = Date.now();
184
193
  _duration = _endTime - startTime; // 发送初始化失败事件
185
194
  this.emitEvent(WalletPassHooks.OnWalletInitializationFailed, {
@@ -195,11 +204,11 @@ export var WalletPassPaymentImpl = /*#__PURE__*/function () {
195
204
  totalAmount: (_businessData$amountI5 = businessData.amountInfo) === null || _businessData$amountI5 === void 0 ? void 0 : _businessData$amountI5.totalAmount
196
205
  });
197
206
  throw _context.t0;
198
- case 24:
207
+ case 26:
199
208
  case "end":
200
209
  return _context.stop();
201
210
  }
202
- }, _callee, this, [[6, 17]]);
211
+ }, _callee, this, [[8, 19]]);
203
212
  }));
204
213
  function initializeWalletDataFromBusinessAsync(_x) {
205
214
  return _initializeWalletDataFromBusinessAsync.apply(this, arguments);
@@ -118,6 +118,12 @@ var WalletPassPaymentImpl = class {
118
118
  userIdentificationCodes: []
119
119
  };
120
120
  }
121
+ if ([1, 0].includes((walletParams == null ? void 0 : walletParams.customer_id) || 0)) {
122
+ return {
123
+ walletRecommendList: [],
124
+ userIdentificationCodes: []
125
+ };
126
+ }
121
127
  this.emitEvent(import_types.WalletPassHooks.OnWalletInitializationStarted, {
122
128
  businessData,
123
129
  startTime
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@pisell/pisellos",
4
- "version": "2.2.18",
4
+ "version": "2.2.19",
5
5
  "description": "一个可扩展的前端模块化SDK框架,支持插件系统",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",