dolphin-weex-bc 0.0.14 → 0.0.15

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,6 +1,11 @@
1
1
 
2
2
  # 升级日志
3
3
 
4
+ ## 0.0.15
5
+
6
+ - [ ! ] 耗材业务组件水波纹数据单独封装
7
+ - [ ! ] date: 2025/10/29
8
+
4
9
  ## 0.0.14
5
10
 
6
11
  - [ ! ] 耗材业务组件修复bug
@@ -3176,15 +3176,13 @@ var MaterialEvent = {
3176
3176
  var _this11 = this;
3177
3177
 
3178
3178
  return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8() {
3179
- var tmpcodeList, circleColorList, codeList, skuinfolist, groupNum, index, shopList;
3179
+ var tmpcodeList, codeList, skuinfolist, groupNum, index, shopList;
3180
3180
  return regeneratorRuntime.wrap(function _callee8$(_context8) {
3181
3181
  while (1) {
3182
3182
  switch (_context8.prev = _context8.next) {
3183
3183
  case 0:
3184
3184
  tmpcodeList = [];
3185
- circleColorList = _this11.isDiablo ? ['#D35936', '#BE8214', '#0490D3'] : ['#F56428', '#FFAA10', '#00A4F2'];
3186
3185
 
3187
- console.log('颜色集合:' + JSON.stringify(circleColorList));
3188
3186
  _this11.deviceMaterialList.forEach(function (item) {
3189
3187
  var device = deviceList.findIndex(function (it) {
3190
3188
  return item.applianceCode == it.deviceId;
@@ -3206,18 +3204,7 @@ var MaterialEvent = {
3206
3204
  if (it.serviceSupport && it.serviceSupport.washingService && it.serviceSupport.washingService.enable && it.serviceSupport.washingService.productCode) {
3207
3205
  tmpcodeList.push(it.serviceSupport.washingService.productCode);
3208
3206
  }
3209
- var percent = it.percent;
3210
- chartData.incompletedColor = _this11.isDiablo ? '#2b2f32' : _this11.needBackground ? '#F6F7F9' : '#ffffff';
3211
- it.chartData = _extends({}, chartData, {
3212
- progressCounter: percent < 1 && percent != 0 ? 1 : percent,
3213
- completedColor: circleColorList[it.remainingStatus],
3214
- textColor: circleColorList[it.remainingStatus]
3215
- }, {
3216
- text: percent + '%',
3217
- textSize: _this11.isScale ? 11 : 12,
3218
- cornerRadius: isIos ? 44 : 88,
3219
- thickness: isIos ? 3 : 6
3220
- });
3207
+ it.chartData = _this11.setChartData(it);
3221
3208
  });
3222
3209
  });
3223
3210
 
@@ -3227,7 +3214,7 @@ var MaterialEvent = {
3227
3214
  console.log('codeList9999===1' + JSON.stringify(codeList));
3228
3215
 
3229
3216
  if (codeList.length) {
3230
- _context8.next = 9;
3217
+ _context8.next = 7;
3231
3218
  break;
3232
3219
  }
3233
3220
 
@@ -3235,98 +3222,98 @@ var MaterialEvent = {
3235
3222
  _this11.handleMaterialSeviceType();
3236
3223
  return _context8.abrupt('return');
3237
3224
 
3238
- case 9:
3225
+ case 7:
3239
3226
  skuinfolist = [];
3240
3227
 
3241
3228
  if (!(codeList && codeList.length > 20)) {
3242
- _context8.next = 29;
3229
+ _context8.next = 27;
3243
3230
  break;
3244
3231
  }
3245
3232
 
3246
3233
  groupNum = Math.ceil(codeList.length / 20);
3247
3234
  index = 0;
3248
3235
 
3249
- case 13:
3236
+ case 11:
3250
3237
  if (!(index < groupNum)) {
3251
- _context8.next = 27;
3238
+ _context8.next = 25;
3252
3239
  break;
3253
3240
  }
3254
3241
 
3255
- _context8.prev = 14;
3256
- _context8.next = 17;
3242
+ _context8.prev = 12;
3243
+ _context8.next = 15;
3257
3244
  return _this11.getUpkeepShopInfo(codeList.slice(index * 20, (index + 1) * 20));
3258
3245
 
3259
- case 17:
3246
+ case 15:
3260
3247
  shopList = _context8.sent;
3261
3248
 
3262
3249
  skuinfolist = skuinfolist.concat(shopList);
3263
- _context8.next = 24;
3250
+ _context8.next = 22;
3264
3251
  break;
3265
3252
 
3266
- case 21:
3267
- _context8.prev = 21;
3268
- _context8.t0 = _context8['catch'](14);
3269
- return _context8.abrupt('continue', 24);
3253
+ case 19:
3254
+ _context8.prev = 19;
3255
+ _context8.t0 = _context8['catch'](12);
3256
+ return _context8.abrupt('continue', 22);
3270
3257
 
3271
- case 24:
3258
+ case 22:
3272
3259
  index++;
3273
- _context8.next = 13;
3260
+ _context8.next = 11;
3274
3261
  break;
3275
3262
 
3276
- case 27:
3277
- _context8.next = 37;
3263
+ case 25:
3264
+ _context8.next = 35;
3278
3265
  break;
3279
3266
 
3280
- case 29:
3281
- _context8.prev = 29;
3282
- _context8.next = 32;
3267
+ case 27:
3268
+ _context8.prev = 27;
3269
+ _context8.next = 30;
3283
3270
  return _this11.getUpkeepShopInfo(codeList);
3284
3271
 
3285
- case 32:
3272
+ case 30:
3286
3273
  skuinfolist = _context8.sent;
3287
- _context8.next = 37;
3274
+ _context8.next = 35;
3288
3275
  break;
3289
3276
 
3290
- case 35:
3291
- _context8.prev = 35;
3292
- _context8.t1 = _context8['catch'](29);
3277
+ case 33:
3278
+ _context8.prev = 33;
3279
+ _context8.t1 = _context8['catch'](27);
3293
3280
 
3294
- case 37:
3281
+ case 35:
3295
3282
 
3296
3283
  console.log('获取到的商品信息:' + JSON.stringify(skuinfolist));
3297
3284
 
3298
3285
  if (!(skuinfolist.length > 0)) {
3299
- _context8.next = 49;
3286
+ _context8.next = 47;
3300
3287
  break;
3301
3288
  }
3302
3289
 
3303
- _context8.prev = 39;
3304
- _context8.next = 42;
3290
+ _context8.prev = 37;
3291
+ _context8.next = 40;
3305
3292
  return _this11.handleGoodsInfoNewSkuId(skuinfolist);
3306
3293
 
3307
- case 42:
3308
- _context8.next = 46;
3294
+ case 40:
3295
+ _context8.next = 44;
3309
3296
  break;
3310
3297
 
3311
- case 44:
3312
- _context8.prev = 44;
3313
- _context8.t2 = _context8['catch'](39);
3298
+ case 42:
3299
+ _context8.prev = 42;
3300
+ _context8.t2 = _context8['catch'](37);
3314
3301
 
3315
- case 46:
3302
+ case 44:
3316
3303
  _this11.setMaterialGoodInfo(skuinfolist);
3317
- _context8.next = 50;
3304
+ _context8.next = 48;
3318
3305
  break;
3319
3306
 
3320
- case 49:
3307
+ case 47:
3321
3308
  //此时如果有活动链接就取活动链接
3322
3309
  _this11.handleMaterialSeviceType();
3323
3310
 
3324
- case 50:
3311
+ case 48:
3325
3312
  case 'end':
3326
3313
  return _context8.stop();
3327
3314
  }
3328
3315
  }
3329
- }, _callee8, _this11, [[14, 21], [29, 35], [39, 44]]);
3316
+ }, _callee8, _this11, [[12, 19], [27, 33], [37, 42]]);
3330
3317
  }))();
3331
3318
  },
3332
3319
 
@@ -3564,22 +3551,55 @@ var MaterialEvent = {
3564
3551
  });
3565
3552
  });
3566
3553
  },
3554
+ setChartData: function setChartData(it) {
3555
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
3556
+
3557
+ var isDiablo = this.isDiablo;
3558
+ var needBackground = this.needBackground;
3559
+ var isScale = this.isDisScaleiablo;
3560
+ console.log('chartdata数据变化:' + JSON.stringify(options));
3561
+
3562
+ if (options.hasOwnProperty('isDiablo')) {
3563
+ isDiablo = options.isDiablo;
3564
+ }
3565
+ if (options.hasOwnProperty('needBackground')) {
3566
+ needBackground = options.needBackground;
3567
+ }
3568
+ if (options.hasOwnProperty('isScale')) {
3569
+ isScale = options.isScale;
3570
+ }
3571
+ var newChartData = {};
3572
+ var circleColorList = isDiablo ? ['#D35936', '#BE8214', '#0490D3'] : ['#F56428', '#FFAA10', '#00A4F2'];
3573
+ var percent = it.percent;
3574
+ newChartData = _extends({}, chartData, {
3575
+ progressCounter: percent < 1 && percent != 0 ? 1 : percent,
3576
+ completedColor: circleColorList[it.remainingStatus],
3577
+ incompletedColor: isDiablo ? '#2b2f32' : needBackground ? '#F6F7F9' : '#ffffff',
3578
+ textColor: circleColorList[it.remainingStatus]
3579
+ }, {
3580
+ text: percent + '%',
3581
+ textSize: isScale ? 11 : 12,
3582
+ cornerRadius: isIos ? 44 : 88,
3583
+ thickness: isIos ? 3 : 6
3584
+ });
3585
+ return newChartData;
3586
+ },
3567
3587
 
3568
3588
 
3569
3589
  // 设置波浪百分比
3570
- setWavePercent: function setWavePercent(item) {
3590
+ setWavePercent: function setWavePercent(item, isDiablo) {
3571
3591
  // remainingStatus 0-已耗尽,1-余量不足,2-余量充足
3572
3592
  var type = item.remainingStatus;
3573
3593
  var percent = type == 2 ? 0.4 : 0.05;
3574
3594
  var percentTxt = type == 2 ? '充足' : '不足';
3575
- var textColorList = this.isDiablo ? ['#D35926', '#D35926', '#0490D3'] : ['#F56428', '#F56428', '#00A4F2'];
3576
- var frontColorList = this.isDiablo ? ['#D35926', '#D35926', '#ADE0F6'] : ['#F56428', '#F56428', '#9fdaf5'];
3577
- var backColorList = this.isDiablo ? ['#FCA6A1', '#FCA6A1', '#CFEBF8'] : ['#fc9791', '#fc9791', '#c7e8f7'];
3595
+ var textColorList = isDiablo ? ['#D35926', '#D35926', '#0490D3'] : ['#F56428', '#F56428', '#00A4F2'];
3596
+ var frontColorList = isDiablo ? ['#D35926', '#D35926', '#ADE0F6'] : ['#F56428', '#F56428', '#9fdaf5'];
3597
+ var backColorList = isDiablo ? ['#FCA6A1', '#FCA6A1', '#CFEBF8'] : ['#fc9791', '#fc9791', '#c7e8f7'];
3578
3598
  return {
3579
3599
  frontWaveColor: frontColorList[type], //已完成后的颜色默认#FFFFFF
3580
3600
  backWaveColor: backColorList[type],
3581
3601
  animate: true,
3582
- backgroundColor: this.isDiablo ? '#1E2326' : '#FFFFFF', //背景色 默认为#000000
3602
+ backgroundColor: isDiablo ? '#1E2326' : '#FFFFFF', //背景色 默认为#000000
3583
3603
  progress: percent, // 进度 [0 ... 1]
3584
3604
  textFont: 11, //字体大小,默认为14
3585
3605
  text: percentTxt, //文本 默认为空
@@ -62680,7 +62700,7 @@ exports.default = {
62680
62700
  },
62681
62701
  data: function data() {
62682
62702
  return {
62683
- deviceMaterialList: this.data,
62703
+ deviceMaterialList: [],
62684
62704
  arrowIcon: _icon2.default.icon_arrow
62685
62705
  };
62686
62706
  },
@@ -62691,13 +62711,20 @@ exports.default = {
62691
62711
  }
62692
62712
  },
62693
62713
  watch: {
62714
+ isDiablo: {
62715
+ handler: function handler(val) {
62716
+ if (this.deviceMaterialList.length > 0) {
62717
+ this.handleChartData(this.deviceMaterialList);
62718
+ }
62719
+ }
62720
+ },
62694
62721
  data: {
62695
62722
  handler: function handler(val) {
62696
62723
  var _this = this;
62697
62724
 
62698
62725
  console.log('传入的耗材' + JSON.stringify(val));
62699
62726
  if (val.length > 0) {
62700
- this.deviceMaterialList = val;
62727
+ this.handleChartData(val);
62701
62728
  setTimeout(function () {
62702
62729
  _this.handleRenderEnd();
62703
62730
  }, 200);
@@ -62838,8 +62865,23 @@ exports.default = {
62838
62865
  }, _callee3, _this4, [[0, 7, 10, 13]]);
62839
62866
  }))();
62840
62867
  },
62868
+ handleChartData: function handleChartData(val) {
62869
+ var _this5 = this;
62870
+
62871
+ var tempVal = JSON.parse(JSON.stringify(val));
62872
+ tempVal.forEach(function (item) {
62873
+ item.consumables.forEach(function (it) {
62874
+ it.chartData = _index2.default.setChartData(it, {
62875
+ isDiablo: _this5.isDiablo,
62876
+ isScale: _this5.isScale,
62877
+ needBackground: _this5.needBackground
62878
+ });
62879
+ });
62880
+ });
62881
+ this.deviceMaterialList = tempVal;
62882
+ },
62841
62883
  setWavePercent: function setWavePercent(item) {
62842
- return _index2.default.setWavePercent(item);
62884
+ return _index2.default.setWavePercent(item, this.isDiablo);
62843
62885
  },
62844
62886
 
62845
62887
 
@@ -62983,12 +63025,12 @@ exports.default = {
62983
63025
  }
62984
63026
  },
62985
63027
  handleRenderEnd: function handleRenderEnd() {
62986
- var _this5 = this;
63028
+ var _this6 = this;
62987
63029
 
62988
63030
  setTimeout(function () {
62989
- _this5.$emit('consumablesInfo', { deviceMaterialList: deviceMaterialList });
62990
- dom.getComponentRect(_this5.$refs.materialBox, function (data) {
62991
- _this5.$emit('renderEnd', data.size.height);
63031
+ _this6.$emit('consumablesInfo', { deviceMaterialList: deviceMaterialList });
63032
+ dom.getComponentRect(_this6.$refs.materialBox, function (data) {
63033
+ _this6.$emit('renderEnd', data.size.height);
62992
63034
  });
62993
63035
  }, 200);
62994
63036
  }
@@ -67778,12 +67820,12 @@ module.exports = {
67778
67820
  "width": "88",
67779
67821
  "height": "88",
67780
67822
  "marginRight": "28",
67823
+ "borderRadius": 50,
67781
67824
  "backgroundColor": "#FFFFFF",
67782
67825
  "textAlign": "center",
67783
67826
  "display": "flex",
67784
67827
  "justifyContent": "center",
67785
67828
  "alignItems": "center",
67786
- "borderRadius": "12",
67787
67829
  "overflow": "hidden"
67788
67830
  },
67789
67831
  "noData-txt": {
@@ -68115,7 +68157,7 @@ module.exports = {
68115
68157
 
68116
68158
  module.exports = {
68117
68159
  "material-title-isDiablo": {
68118
- "backgroundImage": "linear-gradient(to bottom, #64747E, #171C1F)",
68160
+ "backgroundImage": "linear-gradient(to bottom, #3C474D, #171C1F)",
68119
68161
  "borderBottom": "1px solid #23282b"
68120
68162
  },
68121
68163
  "material-title-isScale": {