dolphin-weex-bc 0.0.25 → 0.0.27
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 +9 -0
- package/dist/index.native.js +61 -30
- package/dist/index.native.js.map +1 -1
- package/dist/index.web.js +61 -30
- package/dist/index.web.js.map +1 -1
- package/package.json +1 -1
- package/packages/dof-consumables/index.vue +27 -26
- package/packages/material-event/index.js +30 -0
package/CHANGELOG.md
CHANGED
package/dist/index.native.js
CHANGED
|
@@ -3414,6 +3414,10 @@ var MaterialEvent = {
|
|
|
3414
3414
|
tmpcodeList.push(it.serviceSupport.washingService.productCode);
|
|
3415
3415
|
}
|
|
3416
3416
|
it.chartData = _this15.setChartData(it);
|
|
3417
|
+
it.btnType = 0;
|
|
3418
|
+
it.btnText = '';
|
|
3419
|
+
it.goodsInfo = {};
|
|
3420
|
+
it.washingServiceGoodsInfo = {};
|
|
3417
3421
|
}
|
|
3418
3422
|
} catch (err) {
|
|
3419
3423
|
_didIteratorError = true;
|
|
@@ -3839,6 +3843,30 @@ var MaterialEvent = {
|
|
|
3839
3843
|
// 都有type=4的保持原顺序
|
|
3840
3844
|
return 0;
|
|
3841
3845
|
},
|
|
3846
|
+
|
|
3847
|
+
|
|
3848
|
+
//处理跳转到搜索列表的跳转逻辑
|
|
3849
|
+
handleSearchLinkUrlJump: function handleSearchLinkUrlJump(searchLinkUrl) {
|
|
3850
|
+
searchLinkUrl = decodeURIComponent(searchLinkUrl);
|
|
3851
|
+
var searchLinkUrlPart1 = searchLinkUrl.split('url=')[1];
|
|
3852
|
+
var searchLinkUrlPart0 = searchLinkUrl.split('url=')[0] + 'url=';
|
|
3853
|
+
searchLinkUrlPart1 = searchLinkUrlPart1.includes('?') ? searchLinkUrlPart1 + '&entrance=consumables' : searchLinkUrlPart1 + '?entrance=consumables';
|
|
3854
|
+
console.log('searchLinkUrlPart1' + searchLinkUrl);
|
|
3855
|
+
var url = searchLinkUrlPart0 + encodeURIComponent(searchLinkUrlPart1);
|
|
3856
|
+
console.log('最终的搜索列表链接:' + url);
|
|
3857
|
+
this.jumpElecBusinessWeex(url);
|
|
3858
|
+
},
|
|
3859
|
+
jumpElecBusinessWeex: function jumpElecBusinessWeex(url) {
|
|
3860
|
+
var _this22 = this;
|
|
3861
|
+
|
|
3862
|
+
_dolphinNativeBridge.Bridge.goToPage({
|
|
3863
|
+
url: url
|
|
3864
|
+
}).then(function (res) {
|
|
3865
|
+
// this.$alert(res)
|
|
3866
|
+
}).catch(function (err) {
|
|
3867
|
+
_this22.$toast(err.errorMessage || err.errorMsg || '跳转失败');
|
|
3868
|
+
});
|
|
3869
|
+
},
|
|
3842
3870
|
setChartData: function setChartData(it) {
|
|
3843
3871
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
3844
3872
|
|
|
@@ -3957,7 +3985,7 @@ var MaterialEvent = {
|
|
|
3957
3985
|
|
|
3958
3986
|
//分层排序
|
|
3959
3987
|
sortHierarchical: function sortHierarchical(data) {
|
|
3960
|
-
var
|
|
3988
|
+
var _this23 = this;
|
|
3961
3989
|
|
|
3962
3990
|
var categorizedDeviceMaterialList = {
|
|
3963
3991
|
insufficient: [],
|
|
@@ -3988,7 +4016,7 @@ var MaterialEvent = {
|
|
|
3988
4016
|
|
|
3989
4017
|
if (categorizedConsumables.insufficient.length > 0) {
|
|
3990
4018
|
categorizedDeviceMaterialList.insufficient.push(_extends({}, device, {
|
|
3991
|
-
consumables:
|
|
4019
|
+
consumables: _this23.sortConsumables(categorizedConsumables.insufficient)
|
|
3992
4020
|
}));
|
|
3993
4021
|
}
|
|
3994
4022
|
|
|
@@ -4000,7 +4028,7 @@ var MaterialEvent = {
|
|
|
4000
4028
|
|
|
4001
4029
|
if (categorizedConsumables.sufficient.length > 0) {
|
|
4002
4030
|
categorizedDeviceMaterialList.sufficient.push(_extends({}, device, {
|
|
4003
|
-
consumables:
|
|
4031
|
+
consumables: _this23.sortConsumables(categorizedConsumables.sufficient)
|
|
4004
4032
|
}));
|
|
4005
4033
|
}
|
|
4006
4034
|
});
|
|
@@ -65643,6 +65671,10 @@ exports.default = {
|
|
|
65643
65671
|
type: Boolean,
|
|
65644
65672
|
default: false
|
|
65645
65673
|
},
|
|
65674
|
+
needCustomGoToDetail: {
|
|
65675
|
+
type: Boolean,
|
|
65676
|
+
default: false
|
|
65677
|
+
},
|
|
65646
65678
|
isFilterShow: {
|
|
65647
65679
|
type: Boolean,
|
|
65648
65680
|
default: false // 是否是分层模式
|
|
@@ -65673,6 +65705,7 @@ exports.default = {
|
|
|
65673
65705
|
var _this = this;
|
|
65674
65706
|
|
|
65675
65707
|
console.log('传入的耗材' + JSON.stringify(val));
|
|
65708
|
+
|
|
65676
65709
|
if (val.length > 0) {
|
|
65677
65710
|
this.handleChartData(val);
|
|
65678
65711
|
setTimeout(function () {
|
|
@@ -65816,19 +65849,17 @@ exports.default = {
|
|
|
65816
65849
|
}))();
|
|
65817
65850
|
},
|
|
65818
65851
|
handleChartData: function handleChartData(val) {
|
|
65819
|
-
|
|
65820
|
-
|
|
65821
|
-
|
|
65822
|
-
|
|
65823
|
-
|
|
65824
|
-
|
|
65825
|
-
|
|
65826
|
-
|
|
65827
|
-
|
|
65828
|
-
|
|
65829
|
-
|
|
65830
|
-
});
|
|
65831
|
-
this.deviceMaterialList = tempVal;
|
|
65852
|
+
// let tempVal = JSON.parse(JSON.stringify(val))
|
|
65853
|
+
// tempVal.forEach(item => {
|
|
65854
|
+
// item.consumables.forEach(it => {
|
|
65855
|
+
// it.chartData = MaterialEvent.setChartData(it, {
|
|
65856
|
+
// isDiablo: this.isDiablo,
|
|
65857
|
+
// isScale: this.isScale,
|
|
65858
|
+
// needBackground: this.needBackground
|
|
65859
|
+
// })
|
|
65860
|
+
// })
|
|
65861
|
+
// })
|
|
65862
|
+
this.deviceMaterialList = val;
|
|
65832
65863
|
},
|
|
65833
65864
|
setWavePercent: function setWavePercent(item) {
|
|
65834
65865
|
return _index2.default.setWavePercent(item, this.isDiablo, this.needBackground);
|
|
@@ -65844,24 +65875,27 @@ exports.default = {
|
|
|
65844
65875
|
}, 2000, { leading: true, trailing: false }),
|
|
65845
65876
|
// 跳转耗材详情
|
|
65846
65877
|
goDetail: function goDetail(item, device) {
|
|
65878
|
+
if (this.needCustomGoToDetail) {
|
|
65879
|
+
this.$emit('customGoToDetail', { item: item, device: device });
|
|
65880
|
+
return;
|
|
65881
|
+
}
|
|
65847
65882
|
console.log('跳转前itemmmm===' + JSON.stringify(item));
|
|
65848
65883
|
console.log('跳转前device===' + JSON.stringify(device));
|
|
65849
65884
|
_utils2.default.setItem('previous_materialDetail', item);
|
|
65850
65885
|
_utils2.default.setItem('previous_deviceInfo', device.deviceInfo);
|
|
65851
65886
|
//如果是没有展示耗材不足等情况下跳转为该设备下所有耗材,如果区分了则跳转当前耗材
|
|
65852
|
-
|
|
65887
|
+
// let consumables = this.isFilterShow ? [item] : device.consumables
|
|
65888
|
+
var consumables = [item];
|
|
65853
65889
|
_utils2.default.setItem('previous_consumables', consumables);
|
|
65854
65890
|
// applianceCode: device.applianceCode,
|
|
65855
65891
|
// consumablesCode: item.consumablesCode,
|
|
65856
|
-
|
|
65857
|
-
|
|
65892
|
+
// let url = `customer-service/materialDetail.js?from=externalPage&applianceCode=${device.applianceCode}&consumablesCode=${item.consumablesCode}`
|
|
65893
|
+
var url = 'customer-service/materialDetail.js?from=externalPage';
|
|
65858
65894
|
var params = {
|
|
65859
65895
|
type: 'jumpWeex',
|
|
65860
65896
|
param: {
|
|
65861
65897
|
url: url,
|
|
65862
|
-
viewTag: 'maintenance'
|
|
65863
|
-
bgColor: this.isColmo ? '#000000' : '#ffffff',
|
|
65864
|
-
pageBackgroundColor: this.isColmo ? '#000000' : '#ffffff'
|
|
65898
|
+
viewTag: 'maintenance'
|
|
65865
65899
|
}
|
|
65866
65900
|
};
|
|
65867
65901
|
console.log('跳转前的参数:' + JSON.stringify(params));
|
|
@@ -65876,8 +65910,7 @@ exports.default = {
|
|
|
65876
65910
|
var activeUrl = it.purchaseInfo ? it.purchaseInfo.linkUrl : '';
|
|
65877
65911
|
var searchLinkUrl = it.purchaseInfo ? it.purchaseInfo.searchLinkUrl : '';
|
|
65878
65912
|
if (searchLinkUrl) {
|
|
65879
|
-
|
|
65880
|
-
this.goodsjumpWebViewNew(searchLinkUrl);
|
|
65913
|
+
_index2.default.handleSearchLinkUrlJump(searchLinkUrl);
|
|
65881
65914
|
} else if (it.purchaseInfo && it.purchaseInfo.skuId) {
|
|
65882
65915
|
this.goToGoodsDetail(it.purchaseInfo);
|
|
65883
65916
|
} else if (it.goodsInfo && (it.goodsInfo.skulink || it.goodsInfo.skuId)) {
|
|
@@ -65972,8 +66005,7 @@ exports.default = {
|
|
|
65972
66005
|
var activeUrl = it.serviceSupport.washingService.serviceUrl;
|
|
65973
66006
|
var searchLinkUrl = it.serviceSupport.washingService.searchLinkUrl;
|
|
65974
66007
|
if (searchLinkUrl) {
|
|
65975
|
-
|
|
65976
|
-
this.goodsjumpWebViewNew(searchLinkUrl);
|
|
66008
|
+
_index2.default.handleSearchLinkUrlJump(searchLinkUrl);
|
|
65977
66009
|
} else if (it.serviceSupport.washingService.skuId) {
|
|
65978
66010
|
this.goToGoodsDetail(it.serviceSupport.washingService);
|
|
65979
66011
|
} else if (it.washingServiceGoodsInfo && (it.washingServiceGoodsInfo.skulink || it.washingServiceGoodsInfo.skuId)) {
|
|
@@ -65984,12 +66016,11 @@ exports.default = {
|
|
|
65984
66016
|
}
|
|
65985
66017
|
},
|
|
65986
66018
|
handleRenderEnd: function handleRenderEnd() {
|
|
65987
|
-
var
|
|
66019
|
+
var _this5 = this;
|
|
65988
66020
|
|
|
65989
66021
|
setTimeout(function () {
|
|
65990
|
-
|
|
65991
|
-
|
|
65992
|
-
_this6.$emit('renderEnd', data.size.height);
|
|
66022
|
+
dom.getComponentRect(_this5.$refs.materialBox, function (data) {
|
|
66023
|
+
_this5.$emit('renderEnd', data.size.height);
|
|
65993
66024
|
});
|
|
65994
66025
|
}, 200);
|
|
65995
66026
|
}
|