dolphin-weex-bc 0.0.51 → 0.0.52

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # 升级日志
2
2
 
3
+ ## 0.0.52
4
+ - [ ! ] 耗材组件请求设备接口改成并行请求
5
+ - [ ! ] date: 2026/09/15
6
+
3
7
  ## 0.0.51
4
8
  - [ ! ] 耗材组件一键加购商品信息接口分批加载
5
9
  - [ ! ] date: 2026/09/11
@@ -3393,7 +3393,7 @@ var MaterialEvent = {
3393
3393
  var _this13 = this;
3394
3394
 
3395
3395
  return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee11() {
3396
- var applianceCodeArr, deviceForApplianceCode, groupNum, index, resDeviceList;
3396
+ var applianceCodeArr, deviceForApplianceCode, groupNum, tasks, index, resList;
3397
3397
  return regeneratorRuntime.wrap(function _callee11$(_context11) {
3398
3398
  while (1) {
3399
3399
  switch (_context11.prev = _context11.next) {
@@ -3406,68 +3406,52 @@ var MaterialEvent = {
3406
3406
  deviceForApplianceCode = [];
3407
3407
 
3408
3408
  if (!(applianceCodeArr && applianceCodeArr.length > 20)) {
3409
- _context11.next = 22;
3409
+ _context11.next = 13;
3410
3410
  break;
3411
3411
  }
3412
3412
 
3413
3413
  groupNum = Math.ceil(applianceCodeArr.length / 20);
3414
- index = 0;
3414
+ tasks = [];
3415
3415
 
3416
- case 6:
3417
- if (!(index < groupNum)) {
3418
- _context11.next = 20;
3419
- break;
3416
+ for (index = 0; index < groupNum; index++) {
3417
+ tasks.push(_this13.getDeviceListFromApplianceCode(applianceCodeArr.slice(index * 20, (index + 1) * 20)));
3420
3418
  }
3419
+ _context11.next = 9;
3420
+ return Promise.all(tasks);
3421
3421
 
3422
- _context11.prev = 7;
3423
- _context11.next = 10;
3424
- return _this13.getDeviceListFromApplianceCode(applianceCodeArr.slice(index * 20, (index + 1) * 20));
3425
-
3426
- case 10:
3427
- resDeviceList = _context11.sent;
3428
-
3429
- deviceForApplianceCode = deviceForApplianceCode.concat(resDeviceList);
3430
- _context11.next = 17;
3431
- break;
3432
-
3433
- case 14:
3434
- _context11.prev = 14;
3435
- _context11.t0 = _context11['catch'](7);
3436
- throw _context11.t0;
3437
-
3438
- case 17:
3439
- index++;
3440
- _context11.next = 6;
3441
- break;
3422
+ case 9:
3423
+ resList = _context11.sent;
3442
3424
 
3443
- case 20:
3444
- _context11.next = 31;
3425
+ resList.forEach(function (res) {
3426
+ deviceForApplianceCode = deviceForApplianceCode.concat(res);
3427
+ });
3428
+ _context11.next = 22;
3445
3429
  break;
3446
3430
 
3447
- case 22:
3448
- _context11.prev = 22;
3449
- _context11.next = 25;
3431
+ case 13:
3432
+ _context11.prev = 13;
3433
+ _context11.next = 16;
3450
3434
  return _this13.getDeviceListFromApplianceCode(applianceCodeArr);
3451
3435
 
3452
- case 25:
3436
+ case 16:
3453
3437
  deviceForApplianceCode = _context11.sent;
3454
- _context11.next = 31;
3438
+ _context11.next = 22;
3455
3439
  break;
3456
3440
 
3457
- case 28:
3458
- _context11.prev = 28;
3459
- _context11.t1 = _context11['catch'](22);
3460
- throw _context11.t1;
3441
+ case 19:
3442
+ _context11.prev = 19;
3443
+ _context11.t0 = _context11['catch'](13);
3444
+ throw _context11.t0;
3461
3445
 
3462
- case 31:
3446
+ case 22:
3463
3447
  return _context11.abrupt('return', deviceForApplianceCode);
3464
3448
 
3465
- case 32:
3449
+ case 23:
3466
3450
  case 'end':
3467
3451
  return _context11.stop();
3468
3452
  }
3469
3453
  }
3470
- }, _callee11, _this13, [[7, 14], [22, 28]]);
3454
+ }, _callee11, _this13, [[13, 19]]);
3471
3455
  }))();
3472
3456
  },
3473
3457
  getDeviceListFromApplianceCode: function getDeviceListFromApplianceCode(applianceCodeArr) {