dolphin-weex-bc 0.0.30 → 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.
- package/CHANGELOG.md +15 -0
- package/dist/index.native.js +89 -36
- package/dist/index.native.js.map +1 -1
- package/dist/index.web.js +89 -36
- package/dist/index.web.js.map +1 -1
- package/package.json +1 -1
- package/packages/material-event/index.js +80 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# 升级日志
|
|
2
2
|
|
|
3
|
+
## 0.0.33
|
|
4
|
+
|
|
5
|
+
- [ ! ] colmo耗材组件,恢复0.0.28版本的方法
|
|
6
|
+
- [ ! ] date: 2026/01/28
|
|
7
|
+
|
|
8
|
+
## 0.0.32
|
|
9
|
+
|
|
10
|
+
- [ ! ] 修复耗材组件商品更换新接口参数不一致问题
|
|
11
|
+
- [ ! ] date: 2026/01/27
|
|
12
|
+
|
|
13
|
+
## 0.0.31
|
|
14
|
+
|
|
15
|
+
- [ ! ] 耗材组件增加耗材不足的耗材判断
|
|
16
|
+
- [ ! ] date: 2026/01/26
|
|
17
|
+
|
|
3
18
|
## 0.0.30
|
|
4
19
|
|
|
5
20
|
- [ ! ] 耗材组件getAllMaterialList(),getMaterialList()增加识别是否colmo
|
package/dist/index.native.js
CHANGED
|
@@ -2759,6 +2759,8 @@ var MaterialEvent = {
|
|
|
2759
2759
|
|
|
2760
2760
|
productCodeList: [], //存储的商品code
|
|
2761
2761
|
|
|
2762
|
+
insufficientArr: [], //不足的耗材
|
|
2763
|
+
|
|
2762
2764
|
sort: 'hierarchical',
|
|
2763
2765
|
|
|
2764
2766
|
//批量查询耗材的情况
|
|
@@ -2776,8 +2778,9 @@ var MaterialEvent = {
|
|
|
2776
2778
|
_this6.needBackground = options.needBackground;
|
|
2777
2779
|
_this6.needOptimize = options.needOptimize;
|
|
2778
2780
|
_this6.deviceMaterialList = [];
|
|
2781
|
+
_this6.insufficientArr = [];
|
|
2779
2782
|
_this6.sort = options.sort;
|
|
2780
|
-
isColmo = params.appId == 12017;
|
|
2783
|
+
if (!isColmo) isColmo = params.appId == 12017;
|
|
2781
2784
|
return _context2.abrupt('return', new Promise(function () {
|
|
2782
2785
|
var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(resolve, reject) {
|
|
2783
2786
|
var homeGroupId, deviceList;
|
|
@@ -2827,7 +2830,7 @@ var MaterialEvent = {
|
|
|
2827
2830
|
};
|
|
2828
2831
|
}()));
|
|
2829
2832
|
|
|
2830
|
-
case
|
|
2833
|
+
case 9:
|
|
2831
2834
|
case 'end':
|
|
2832
2835
|
return _context2.stop();
|
|
2833
2836
|
}
|
|
@@ -2849,7 +2852,7 @@ var MaterialEvent = {
|
|
|
2849
2852
|
_this7.needBackground = options.needBackground;
|
|
2850
2853
|
_this7.deviceMaterialList = [];
|
|
2851
2854
|
_this7.sort = options.sort;
|
|
2852
|
-
isColmo = params.appId == 12017;
|
|
2855
|
+
if (!isColmo) isColmo = params.appId == 12017;
|
|
2853
2856
|
return _context4.abrupt('return', new Promise(function () {
|
|
2854
2857
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(resolve, reject) {
|
|
2855
2858
|
var deviceList, res;
|
|
@@ -3405,6 +3408,7 @@ var MaterialEvent = {
|
|
|
3405
3408
|
var it = _step.value;
|
|
3406
3409
|
|
|
3407
3410
|
console.log('consumables===it:1' + JSON.stringify(it));
|
|
3411
|
+
if (it.model === 'null' || it.model === '/') it.model = ''; //兜底某些数据返回异常字符串
|
|
3408
3412
|
if (isColmo) {
|
|
3409
3413
|
it.chartData = _this15.setChartDataColmo(it);
|
|
3410
3414
|
continue;
|
|
@@ -3458,7 +3462,7 @@ var MaterialEvent = {
|
|
|
3458
3462
|
break;
|
|
3459
3463
|
}
|
|
3460
3464
|
|
|
3461
|
-
return _context13.abrupt('return', _this15.
|
|
3465
|
+
return _context13.abrupt('return', _this15.handleMaterialSeviceTypeColmo());
|
|
3462
3466
|
|
|
3463
3467
|
case 5:
|
|
3464
3468
|
|
|
@@ -3487,7 +3491,8 @@ var MaterialEvent = {
|
|
|
3487
3491
|
var _this16 = this;
|
|
3488
3492
|
|
|
3489
3493
|
return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee14() {
|
|
3490
|
-
var codeList, skuinfolist, groupNum, index,
|
|
3494
|
+
var codeList, skuinfolist, groupNum, index, resSuccessMap, _resSuccessMap;
|
|
3495
|
+
|
|
3491
3496
|
return regeneratorRuntime.wrap(function _callee14$(_context14) {
|
|
3492
3497
|
while (1) {
|
|
3493
3498
|
switch (_context14.prev = _context14.next) {
|
|
@@ -3505,6 +3510,21 @@ var MaterialEvent = {
|
|
|
3505
3510
|
|
|
3506
3511
|
case 4:
|
|
3507
3512
|
skuinfolist = [];
|
|
3513
|
+
// if (codeList && codeList.length > 20) {
|
|
3514
|
+
// let groupNum = Math.ceil(codeList.length / 20)
|
|
3515
|
+
// for (let index = 0; index < groupNum; index++) {
|
|
3516
|
+
// try {
|
|
3517
|
+
// const shopList = await this.getUpkeepShopInfo(codeList.slice(index * 20, (index + 1) * 20))
|
|
3518
|
+
// skuinfolist = skuinfolist.concat(shopList)
|
|
3519
|
+
// } catch (error) {
|
|
3520
|
+
// continue
|
|
3521
|
+
// }
|
|
3522
|
+
// }
|
|
3523
|
+
// } else {
|
|
3524
|
+
// try {
|
|
3525
|
+
// skuinfolist = await this.getUpkeepShopInfo(codeList)
|
|
3526
|
+
// } catch (error) {}
|
|
3527
|
+
// }
|
|
3508
3528
|
|
|
3509
3529
|
if (!(codeList && codeList.length > 20)) {
|
|
3510
3530
|
_context14.next = 24;
|
|
@@ -3522,12 +3542,12 @@ var MaterialEvent = {
|
|
|
3522
3542
|
|
|
3523
3543
|
_context14.prev = 9;
|
|
3524
3544
|
_context14.next = 12;
|
|
3525
|
-
return _this16.
|
|
3545
|
+
return _this16.querySkuIdByItemCodes(codeList.slice(index * 20, (index + 1) * 20));
|
|
3526
3546
|
|
|
3527
3547
|
case 12:
|
|
3528
|
-
|
|
3548
|
+
resSuccessMap = _context14.sent;
|
|
3529
3549
|
|
|
3530
|
-
skuinfolist
|
|
3550
|
+
_this16.handleSkuinfolist(skuinfolist, resSuccessMap, codeList);
|
|
3531
3551
|
_context14.next = 19;
|
|
3532
3552
|
break;
|
|
3533
3553
|
|
|
@@ -3542,60 +3562,72 @@ var MaterialEvent = {
|
|
|
3542
3562
|
break;
|
|
3543
3563
|
|
|
3544
3564
|
case 22:
|
|
3545
|
-
_context14.next =
|
|
3565
|
+
_context14.next = 33;
|
|
3546
3566
|
break;
|
|
3547
3567
|
|
|
3548
3568
|
case 24:
|
|
3549
3569
|
_context14.prev = 24;
|
|
3550
3570
|
_context14.next = 27;
|
|
3551
|
-
return _this16.
|
|
3571
|
+
return _this16.querySkuIdByItemCodes(codeList);
|
|
3552
3572
|
|
|
3553
3573
|
case 27:
|
|
3554
|
-
|
|
3555
|
-
|
|
3574
|
+
_resSuccessMap = _context14.sent;
|
|
3575
|
+
|
|
3576
|
+
_this16.handleSkuinfolist(skuinfolist, _resSuccessMap, codeList);
|
|
3577
|
+
_context14.next = 33;
|
|
3556
3578
|
break;
|
|
3557
3579
|
|
|
3558
|
-
case
|
|
3559
|
-
_context14.prev =
|
|
3580
|
+
case 31:
|
|
3581
|
+
_context14.prev = 31;
|
|
3560
3582
|
_context14.t1 = _context14['catch'](24);
|
|
3561
3583
|
|
|
3562
|
-
case
|
|
3584
|
+
case 33:
|
|
3563
3585
|
|
|
3564
3586
|
console.log('获取到的商品信息:' + JSON.stringify(skuinfolist));
|
|
3565
3587
|
|
|
3566
3588
|
if (!(skuinfolist.length > 0)) {
|
|
3567
|
-
_context14.next =
|
|
3589
|
+
_context14.next = 38;
|
|
3568
3590
|
break;
|
|
3569
3591
|
}
|
|
3570
3592
|
|
|
3571
|
-
_context14.prev = 34;
|
|
3572
|
-
_context14.next = 37;
|
|
3573
|
-
return _this16.handleGoodsInfoNewSkuId(skuinfolist);
|
|
3574
|
-
|
|
3575
|
-
case 37:
|
|
3576
|
-
_context14.next = 41;
|
|
3577
|
-
break;
|
|
3578
|
-
|
|
3579
|
-
case 39:
|
|
3580
|
-
_context14.prev = 39;
|
|
3581
|
-
_context14.t2 = _context14['catch'](34);
|
|
3582
|
-
|
|
3583
|
-
case 41:
|
|
3584
3593
|
return _context14.abrupt('return', _this16.setMaterialGoodInfo(skuinfolist));
|
|
3585
3594
|
|
|
3586
|
-
case
|
|
3595
|
+
case 38:
|
|
3587
3596
|
return _context14.abrupt('return', _this16.handleMaterialSeviceType());
|
|
3588
3597
|
|
|
3589
|
-
case
|
|
3598
|
+
case 39:
|
|
3590
3599
|
case 'end':
|
|
3591
3600
|
return _context14.stop();
|
|
3592
3601
|
}
|
|
3593
3602
|
}
|
|
3594
|
-
}, _callee14, _this16, [[9, 16], [24,
|
|
3603
|
+
}, _callee14, _this16, [[9, 16], [24, 31]]);
|
|
3595
3604
|
}))();
|
|
3596
3605
|
},
|
|
3597
3606
|
|
|
3598
3607
|
|
|
3608
|
+
//处理商品信息
|
|
3609
|
+
handleSkuinfolist: function handleSkuinfolist(skuinfolist, resSuccessMap, codeList) {
|
|
3610
|
+
if (resSuccessMap.code == '000000') {
|
|
3611
|
+
codeList.forEach(function (item) {
|
|
3612
|
+
if (resSuccessMap.data && resSuccessMap.data.successMap) {
|
|
3613
|
+
if (resSuccessMap.data.successMap[item] && resSuccessMap.data.successMap[item].skuId) {
|
|
3614
|
+
console.log('获取到的图片信息:' + JSON.stringify(resSuccessMap.data.successMap[item].mainPicList));
|
|
3615
|
+
if (resSuccessMap.data.successMap[item].mainPicList && resSuccessMap.data.successMap[item].mainPicList.length > 0) {
|
|
3616
|
+
resSuccessMap.data.successMap[item].mainPicList.forEach(function (item1) {
|
|
3617
|
+
console.log('获取到的图片信息:' + JSON.stringify(item1));
|
|
3618
|
+
if (item1.imageSort == 1) {
|
|
3619
|
+
resSuccessMap.data.successMap[item].picInfo = item1.imageUrl;
|
|
3620
|
+
}
|
|
3621
|
+
});
|
|
3622
|
+
}
|
|
3623
|
+
skuinfolist.push(resSuccessMap.data.successMap[item]);
|
|
3624
|
+
}
|
|
3625
|
+
}
|
|
3626
|
+
});
|
|
3627
|
+
}
|
|
3628
|
+
},
|
|
3629
|
+
|
|
3630
|
+
|
|
3599
3631
|
//给商品信息增加新sku
|
|
3600
3632
|
handleGoodsInfoNewSkuId: function handleGoodsInfoNewSkuId(skuinfolist) {
|
|
3601
3633
|
var _this17 = this;
|
|
@@ -3607,7 +3639,7 @@ var MaterialEvent = {
|
|
|
3607
3639
|
switch (_context15.prev = _context15.next) {
|
|
3608
3640
|
case 0:
|
|
3609
3641
|
itemCodeList = skuinfolist.map(function (item) {
|
|
3610
|
-
return item.
|
|
3642
|
+
return item.itemCode;
|
|
3611
3643
|
});
|
|
3612
3644
|
_context15.prev = 1;
|
|
3613
3645
|
_context15.next = 4;
|
|
@@ -3619,7 +3651,7 @@ var MaterialEvent = {
|
|
|
3619
3651
|
if (res.code == '000000') {
|
|
3620
3652
|
skuinfolist.forEach(function (item) {
|
|
3621
3653
|
if (res.data && res.data.successMap) {
|
|
3622
|
-
item.skuId = res.data.successMap[item.
|
|
3654
|
+
item.skuId = res.data.successMap[item.itemCode] ? res.data.successMap[item.itemCode].skuId : '';
|
|
3623
3655
|
}
|
|
3624
3656
|
});
|
|
3625
3657
|
}
|
|
@@ -3782,11 +3814,11 @@ var MaterialEvent = {
|
|
|
3782
3814
|
console.log('\u5546\u54C1item==' + index + '==1' + JSON.stringify(item));
|
|
3783
3815
|
_this20.deviceMaterialList.forEach(function (it, i) {
|
|
3784
3816
|
it.consumables.forEach(function (itt, index) {
|
|
3785
|
-
if (itt.productCode == item.
|
|
3817
|
+
if (itt.productCode == item.itemCode) {
|
|
3786
3818
|
itt.goodsInfo = item;
|
|
3787
3819
|
}
|
|
3788
3820
|
//对于清洗服务里面的productCode单独处理
|
|
3789
|
-
if (itt.serviceSupport && itt.serviceSupport.washingService && itt.serviceSupport.washingService.productCode == item.
|
|
3821
|
+
if (itt.serviceSupport && itt.serviceSupport.washingService && itt.serviceSupport.washingService.productCode == item.itemCode) {
|
|
3790
3822
|
console.log('清洗的哦哦:1' + i + '---' + index);
|
|
3791
3823
|
itt.washingServiceGoodsInfo = item;
|
|
3792
3824
|
}
|
|
@@ -3834,6 +3866,25 @@ var MaterialEvent = {
|
|
|
3834
3866
|
},
|
|
3835
3867
|
|
|
3836
3868
|
|
|
3869
|
+
// COLMO按钮类型 2保养换芯 3售后维修 4清洗服务
|
|
3870
|
+
handleMaterialSeviceTypeColmo: function handleMaterialSeviceTypeColmo() {
|
|
3871
|
+
this.deviceMaterialList.forEach(function (item, index) {
|
|
3872
|
+
item.consumables.forEach(function (it) {
|
|
3873
|
+
if (it.serviceSupport) {
|
|
3874
|
+
if (it.serviceSupport && it.serviceSupport.bookingService && it.serviceSupport.bookingService.enable) {
|
|
3875
|
+
it.btnType = 2;
|
|
3876
|
+
if (it.serviceSupport.bookingService && it.serviceSupport.bookingService.serviceType == 2) {
|
|
3877
|
+
it.btnType = 3;
|
|
3878
|
+
}
|
|
3879
|
+
} else if (it.serviceSupport && it.serviceSupport.washingService && it.serviceSupport.washingService.enable) {
|
|
3880
|
+
it.btnType = 4;
|
|
3881
|
+
}
|
|
3882
|
+
}
|
|
3883
|
+
});
|
|
3884
|
+
});
|
|
3885
|
+
},
|
|
3886
|
+
|
|
3887
|
+
|
|
3837
3888
|
// 对每一种设备按照consumables中余量从最少到多排列
|
|
3838
3889
|
// 排序函数 - 处理 remainingValueType=4的情况
|
|
3839
3890
|
sortByRemainingValue: function sortByRemainingValue(a, b) {
|
|
@@ -4094,6 +4145,8 @@ var MaterialEvent = {
|
|
|
4094
4145
|
// 合并三个数组
|
|
4095
4146
|
var sortedDeviceMaterialList = [].concat(_toConsumableArray(categorizedDeviceMaterialList.insufficient), _toConsumableArray(categorizedDeviceMaterialList.unknown), _toConsumableArray(categorizedDeviceMaterialList.sufficient));
|
|
4096
4147
|
|
|
4148
|
+
this.insufficientArr = categorizedDeviceMaterialList.insufficient;
|
|
4149
|
+
|
|
4097
4150
|
//记录每一种情况下的设备数量
|
|
4098
4151
|
this.deviceTotal = [categorizedDeviceMaterialList.insufficient.length, categorizedDeviceMaterialList.unknown.length, categorizedDeviceMaterialList.sufficient.length];
|
|
4099
4152
|
//记录每一种情况下的耗材数量
|