@fonixtree/magic-design 0.1.86 → 0.1.88

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.
Files changed (129) hide show
  1. package/es/common/CountDown/index.js +20 -11
  2. package/es/common/CropperModal/index.js +126 -0
  3. package/es/common/CropperModal/index.less +29 -0
  4. package/es/common/LinkModal/AffiliateStore/index.js +332 -0
  5. package/es/common/LinkModal/SelectVideoModal/index.js +3 -2
  6. package/es/common/LinkModal/index.js +14 -5
  7. package/es/common/UrlPicker/index.js +1 -10
  8. package/es/common/Video/QualityComponent/index.js +169 -0
  9. package/es/common/Video/QualityComponent/index.less +78 -0
  10. package/es/common/Video/index.js +142 -86
  11. package/es/common/VideoUpload/index.js +1 -1
  12. package/es/common/index.js +8 -0
  13. package/es/composite-comp/bol/components/Banner/mobile/index.js +4 -2
  14. package/es/composite-comp/bol/second-config-panels/VideoSecondConfig/index.js +3 -1
  15. package/es/composite-comp/common/components/AffiliateProductItem/imgs/icon-cashback.svg +9 -0
  16. package/es/composite-comp/common/components/AffiliateProductItem/index.js +25 -14
  17. package/es/composite-comp/common/components/AffiliateProductItem/index.less +31 -1
  18. package/es/composite-comp/dito/components/CommonFunctions/defaultJSON.js +1 -1
  19. package/es/composite-comp/dito/components/CommonFunctions/mobile/index.js +8 -2
  20. package/es/composite-comp/dito/components/CommonFunctions/mobile/index.less +5 -5
  21. package/es/composite-comp/dito/components/FlashDeal/mobile/index.js +8 -1
  22. package/es/composite-comp/dito/components/MobileNavigation/mobile/index.js +11 -0
  23. package/es/composite-comp/dito/components/Orders/mobile/index.js +8 -3
  24. package/es/composite-comp/dito/components/Orders/mobile/index.less +6 -7
  25. package/es/composite-comp/dito/components/PersonalInformation/mobile/index.js +142 -17
  26. package/es/composite-comp/dito/components/PersonalInformation/mobile/index.less +10 -7
  27. package/es/composite-comp/dito/components/Recommend/mobile/index.js +4 -2
  28. package/es/composite-comp/dito/components/SearchBar/mobile/index.js +13 -1
  29. package/es/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.js +1 -2
  30. package/es/composite-comp/dito/second-config-panels/HeadNavigationSecondConfig/index.js +1 -1
  31. package/es/composite-comp/dito/second-config-panels/MenuNavigationSecondConfig/index.js +1 -1
  32. package/es/composite-comp/{dito → nuri}/components/AffiliateRecommend/mobile/index.js +12 -10
  33. package/{lib/composite-comp/dito → es/composite-comp/nuri}/components/AffiliateRecommend/pc/index.js +12 -10
  34. package/{lib/composite-comp/dito → es/composite-comp/nuri}/config-panels/AffiliateRecommendConfig/RecommendConfigGroup/index.js +1 -1
  35. package/es/constants/component-types.js +3 -3
  36. package/es/constants/index.js +1 -0
  37. package/es/core/Designer/ToolBarModal/index.js +5 -1
  38. package/es/core/Renderer/index.js +6 -2
  39. package/es/decorator/compositeDecorator.js +9 -5
  40. package/es/decorator/index.js +4 -1
  41. package/es/decorator/metaDecorator.js +6 -2
  42. package/es/locale/en/en.json +1 -1
  43. package/es/locale/es/es.json +2 -2
  44. package/es/locale/id/id.json +1 -1
  45. package/es/meta-comp/config-panels/TextConfig/index.js +1 -1
  46. package/es/utils/androidUtil.js +4 -0
  47. package/es/utils/businessUtil.js +17 -3
  48. package/es/utils/commonUtil.js +22 -6
  49. package/es/utils/coreUtil.js +67 -38
  50. package/lib/common/CountDown/index.js +20 -11
  51. package/lib/common/CropperModal/index.js +126 -0
  52. package/lib/common/CropperModal/index.less +29 -0
  53. package/lib/common/LinkModal/AffiliateStore/index.js +332 -0
  54. package/lib/common/LinkModal/SelectVideoModal/index.js +3 -2
  55. package/lib/common/LinkModal/index.js +14 -5
  56. package/lib/common/UrlPicker/index.js +1 -10
  57. package/lib/common/Video/QualityComponent/index.js +169 -0
  58. package/lib/common/Video/QualityComponent/index.less +78 -0
  59. package/lib/common/Video/index.js +142 -86
  60. package/lib/common/VideoUpload/index.js +1 -1
  61. package/lib/common/index.js +8 -0
  62. package/lib/composite-comp/bol/components/Banner/mobile/index.js +4 -2
  63. package/lib/composite-comp/bol/second-config-panels/VideoSecondConfig/index.js +3 -1
  64. package/lib/composite-comp/common/components/AffiliateProductItem/imgs/icon-cashback.svg +9 -0
  65. package/lib/composite-comp/common/components/AffiliateProductItem/index.js +25 -14
  66. package/lib/composite-comp/common/components/AffiliateProductItem/index.less +31 -1
  67. package/lib/composite-comp/dito/components/CommonFunctions/defaultJSON.js +1 -1
  68. package/lib/composite-comp/dito/components/CommonFunctions/mobile/index.js +8 -2
  69. package/lib/composite-comp/dito/components/CommonFunctions/mobile/index.less +5 -5
  70. package/lib/composite-comp/dito/components/FlashDeal/mobile/index.js +8 -1
  71. package/lib/composite-comp/dito/components/MobileNavigation/mobile/index.js +11 -0
  72. package/lib/composite-comp/dito/components/Orders/mobile/index.js +8 -3
  73. package/lib/composite-comp/dito/components/Orders/mobile/index.less +6 -7
  74. package/lib/composite-comp/dito/components/PersonalInformation/mobile/index.js +142 -17
  75. package/lib/composite-comp/dito/components/PersonalInformation/mobile/index.less +10 -7
  76. package/lib/composite-comp/dito/components/Recommend/mobile/index.js +4 -2
  77. package/lib/composite-comp/dito/components/SearchBar/mobile/index.js +13 -1
  78. package/lib/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.js +1 -2
  79. package/lib/composite-comp/dito/second-config-panels/HeadNavigationSecondConfig/index.js +1 -1
  80. package/lib/composite-comp/dito/second-config-panels/MenuNavigationSecondConfig/index.js +1 -1
  81. package/lib/composite-comp/{dito → nuri}/components/AffiliateRecommend/mobile/index.js +12 -10
  82. package/{es/composite-comp/dito → lib/composite-comp/nuri}/components/AffiliateRecommend/pc/index.js +12 -10
  83. package/{es/composite-comp/dito → lib/composite-comp/nuri}/config-panels/AffiliateRecommendConfig/RecommendConfigGroup/index.js +1 -1
  84. package/lib/constants/component-types.js +3 -3
  85. package/lib/constants/index.js +1 -0
  86. package/lib/core/Designer/ToolBarModal/index.js +5 -1
  87. package/lib/core/Renderer/index.js +6 -2
  88. package/lib/decorator/compositeDecorator.js +9 -5
  89. package/lib/decorator/index.js +4 -1
  90. package/lib/decorator/metaDecorator.js +6 -2
  91. package/lib/locale/en/en.json +1 -1
  92. package/lib/locale/es/es.json +2 -2
  93. package/lib/locale/id/id.json +1 -1
  94. package/lib/meta-comp/config-panels/TextConfig/index.js +1 -1
  95. package/lib/utils/androidUtil.js +4 -0
  96. package/lib/utils/businessUtil.js +17 -3
  97. package/lib/utils/commonUtil.js +22 -6
  98. package/lib/utils/coreUtil.js +67 -38
  99. package/package.json +2 -1
  100. package/es/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.less +0 -1
  101. package/lib/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.less +0 -1
  102. /package/es/common/Video/{components → RateComponent}/index.js +0 -0
  103. /package/es/common/Video/{components → RateComponent}/index.less +0 -0
  104. /package/es/composite-comp/{dito → nuri}/components/AffiliateRecommend/defaultJSON.js +0 -0
  105. /package/es/composite-comp/{dito → nuri}/components/AffiliateRecommend/index.js +0 -0
  106. /package/es/composite-comp/{dito → nuri}/components/AffiliateRecommend/mobile/index.less +0 -0
  107. /package/es/composite-comp/{dito → nuri}/components/AffiliateRecommend/pc/index.less +0 -0
  108. /package/es/composite-comp/{dito → nuri}/config-panels/AffiliateRecommendConfig/RecommendConfigContent/index.js +0 -0
  109. /package/es/composite-comp/{dito → nuri}/config-panels/AffiliateRecommendConfig/RecommendConfigContent/index.less +0 -0
  110. /package/es/composite-comp/{dito → nuri}/config-panels/AffiliateRecommendConfig/RecommendConfigGroup/index.less +0 -0
  111. /package/es/composite-comp/{dito → nuri}/config-panels/AffiliateRecommendConfig/imgs/defaultImg.png +0 -0
  112. /package/es/composite-comp/{dito → nuri}/config-panels/AffiliateRecommendConfig/index.js +0 -0
  113. /package/es/composite-comp/{dito → nuri}/second-config-panels/AffiliateRecommendSecondConfig/AIRecommendation/index.js +0 -0
  114. /package/es/composite-comp/{dito → nuri}/second-config-panels/AffiliateRecommendSecondConfig/index.js +0 -0
  115. /package/es/composite-comp/{dito → nuri}/second-config-panels/AffiliateRecommendSecondConfig/index.less +0 -0
  116. /package/lib/common/Video/{components → RateComponent}/index.js +0 -0
  117. /package/lib/common/Video/{components → RateComponent}/index.less +0 -0
  118. /package/lib/composite-comp/{dito → nuri}/components/AffiliateRecommend/defaultJSON.js +0 -0
  119. /package/lib/composite-comp/{dito → nuri}/components/AffiliateRecommend/index.js +0 -0
  120. /package/lib/composite-comp/{dito → nuri}/components/AffiliateRecommend/mobile/index.less +0 -0
  121. /package/lib/composite-comp/{dito → nuri}/components/AffiliateRecommend/pc/index.less +0 -0
  122. /package/lib/composite-comp/{dito → nuri}/config-panels/AffiliateRecommendConfig/RecommendConfigContent/index.js +0 -0
  123. /package/lib/composite-comp/{dito → nuri}/config-panels/AffiliateRecommendConfig/RecommendConfigContent/index.less +0 -0
  124. /package/lib/composite-comp/{dito → nuri}/config-panels/AffiliateRecommendConfig/RecommendConfigGroup/index.less +0 -0
  125. /package/lib/composite-comp/{dito → nuri}/config-panels/AffiliateRecommendConfig/imgs/defaultImg.png +0 -0
  126. /package/lib/composite-comp/{dito → nuri}/config-panels/AffiliateRecommendConfig/index.js +0 -0
  127. /package/lib/composite-comp/{dito → nuri}/second-config-panels/AffiliateRecommendSecondConfig/AIRecommendation/index.js +0 -0
  128. /package/lib/composite-comp/{dito → nuri}/second-config-panels/AffiliateRecommendSecondConfig/index.js +0 -0
  129. /package/lib/composite-comp/{dito → nuri}/second-config-panels/AffiliateRecommendSecondConfig/index.less +0 -0
@@ -1,5 +1,5 @@
1
1
  .orders-mobile {
2
- height: 1.4rem;
2
+ padding: 0 0.32rem;
3
3
  }
4
4
  .orders-mobile .fixed-wrap {
5
5
  display: flex;
@@ -8,11 +8,6 @@
8
8
  box-shadow: 0 0.06rem 0.12rem rgba(0, 0, 0, 0.16);
9
9
  border-radius: 0.32rem;
10
10
  width: auto;
11
- position: absolute;
12
- z-index: 3;
13
- left: 0.32rem;
14
- right: 0.32rem;
15
- top: -1.4rem;
16
11
  padding: 0.32rem;
17
12
  }
18
13
  .orders-mobile .fixed-wrap .top {
@@ -49,11 +44,15 @@
49
44
  margin-bottom: 0.02rem;
50
45
  }
51
46
  .orders-mobile .fixed-wrap .list .item {
47
+ display: flex;
48
+ flex: 1 1;
49
+ }
50
+ .orders-mobile .fixed-wrap .list .item .content-wrap {
51
+ width: 100%;
52
52
  display: flex;
53
53
  flex-direction: column;
54
54
  justify-content: center;
55
55
  align-items: center;
56
- flex: 1;
57
56
  }
58
57
  .orders-mobile .fixed-wrap .list .item .img-wrap {
59
58
  position: relative;
@@ -11,6 +11,8 @@ var _classnames = _interopRequireDefault(require("classnames"));
11
11
 
12
12
  var _lodash = require("lodash");
13
13
 
14
+ var _antd = require("antd");
15
+
14
16
  var _avatar = _interopRequireDefault(require("./images/avatar.png"));
15
17
 
16
18
  var _components = require("../../../../../meta-comp/components");
@@ -27,6 +29,8 @@ var _index = require("../../../../../constants/index");
27
29
 
28
30
  var _storeUtil = require("../../../../../utils/storeUtil");
29
31
 
32
+ var _common = require("../../../../../common");
33
+
30
34
  require("./index.less");
31
35
 
32
36
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -251,7 +255,10 @@ function (_super) {
251
255
 
252
256
  _this.state = {
253
257
  messageNum: '',
254
- userInfo: currentUser
258
+ userInfo: currentUser,
259
+ loading: false,
260
+ selectedImgFile: {},
261
+ editImgModalVisible: false
255
262
  };
256
263
 
257
264
  _this.getNum = function (v) {
@@ -266,19 +273,28 @@ function (_super) {
266
273
  } else if (v === _index.personalInfoType.VIEWED) {
267
274
  return userInfo.recentViewNum || 0;
268
275
  }
269
- }; // handleFileChange = e => {
270
- // const file = e.target.files[0];
271
- // if (file) {
272
- // if (file.name.length > 120) {
273
- // message.error(i18n('IMAGE_NAME_IS_TOO_LONG'));
274
- // return;
275
- // }
276
- // setSelectedImgFile(file);
277
- // setEditImgModalVisible(true);
278
- // }
279
- // e.target.value = '';
280
- // };
276
+ };
277
+
278
+ _this.handleFileChange = function (e) {
279
+ var file = e.target.files[0];
280
+
281
+ if (file) {
282
+ if (file.name.length > 120) {
283
+ _antd.message.error((0, _locale.i18n)('IMAGE_NAME_IS_TOO_LONG'));
284
+
285
+ return;
286
+ }
281
287
 
288
+ _this.hideBottomBar();
289
+
290
+ _this.setState({
291
+ editImgModalVisible: true,
292
+ selectedImgFile: file
293
+ });
294
+ }
295
+
296
+ e.target.value = '';
297
+ };
282
298
 
283
299
  _this.goSettings = function () {
284
300
  if ((0, _commonUtil.checkLogin)()) {
@@ -358,6 +374,91 @@ function (_super) {
358
374
  });
359
375
  };
360
376
 
377
+ _this.modifyPhoto = function (params) {
378
+ return __awaiter(_this, void 0, void 0, function () {
379
+ return __generator(this, function (_a) {
380
+ switch (_a.label) {
381
+ case 0:
382
+ return [4
383
+ /*yield*/
384
+ , (0, _commonUtil.commonFetch)('/designer/v1/h5/users/modify', params, 'POST')];
385
+
386
+ case 1:
387
+ _a.sent();
388
+
389
+ this.showBottomBar();
390
+ this.setState(function (preState, props) {
391
+ return {
392
+ userInfo: __assign(__assign({}, preState.userInfo), {
393
+ photo: params.photo
394
+ }),
395
+ loading: false,
396
+ editImgModalVisible: false
397
+ };
398
+ });
399
+ return [2
400
+ /*return*/
401
+ ];
402
+ }
403
+ });
404
+ });
405
+ };
406
+
407
+ _this.hideBottomBar = function () {
408
+ var homeNavBar = document.querySelector('.home-navigation');
409
+ console.log('homeNavBar', homeNavBar);
410
+ if (homeNavBar) homeNavBar.style.visibility = 'hidden';
411
+ };
412
+
413
+ _this.showBottomBar = function () {
414
+ var homeNavBar = document.querySelector('.home-navigation');
415
+ if (homeNavBar) homeNavBar.style.visibility = 'visible';
416
+ };
417
+
418
+ _this.onUploadImg = function (formData) {
419
+ if (_this.state.loading) return;
420
+
421
+ _this.setState({
422
+ loading: true
423
+ });
424
+
425
+ fetch('/designer/v1/h5/image', {
426
+ method: 'POST',
427
+ body: formData
428
+ }).then(function (response) {
429
+ return response.json();
430
+ }).then(function (responseData) {
431
+ var _a;
432
+
433
+ if (((_a = responseData === null || responseData === void 0 ? void 0 : responseData.fileUrl) === null || _a === void 0 ? void 0 : _a.length) > 120) {
434
+ _antd.message.toast({
435
+ type: 'error',
436
+ message: (0, _locale.i18n)('IMAGE_NAME_IS_TOO_LONG'),
437
+ duration: 3000
438
+ });
439
+
440
+ return;
441
+ }
442
+
443
+ _this.modifyPhoto({
444
+ photo: responseData.fileUrl
445
+ });
446
+ })["catch"](function (err) {
447
+ _antd.message.toast({
448
+ type: 'error',
449
+ message: err === null || err === void 0 ? void 0 : err.data,
450
+ duration: 5000
451
+ });
452
+
453
+ _this.showBottomBar();
454
+
455
+ _this.setState({
456
+ editImgModalVisible: false,
457
+ loading: false
458
+ });
459
+ });
460
+ };
461
+
361
462
  _this.onItemClick = function (v) {
362
463
  var _a;
363
464
 
@@ -385,7 +486,9 @@ function (_super) {
385
486
  var data = this.props.data;
386
487
  var _a = this.state,
387
488
  messageNum = _a.messageNum,
388
- userInfo = _a.userInfo;
489
+ userInfo = _a.userInfo,
490
+ editImgModalVisible = _a.editImgModalVisible,
491
+ selectedImgFile = _a.selectedImgFile;
389
492
  return /*#__PURE__*/_react["default"].createElement("div", {
390
493
  className: (0, _classnames["default"])('personal-information-mobile')
391
494
  }, /*#__PURE__*/_react["default"].createElement("div", {
@@ -403,12 +506,19 @@ function (_super) {
403
506
  width: 44,
404
507
  background: userInfo.photo ? '#fff' : 'unset'
405
508
  }
509
+ }), /*#__PURE__*/_react["default"].createElement("input", {
510
+ accept: "image/*",
511
+ id: "userPhoto",
512
+ onChange: this.handleFileChange,
513
+ type: "file"
406
514
  })), /*#__PURE__*/_react["default"].createElement("div", {
407
515
  className: "userInfo"
408
516
  }, /*#__PURE__*/_react["default"].createElement("p", {
409
517
  className: "name",
410
518
  onClick: this.clickName
411
- }, userInfo.firstName || userInfo.nickName))) : /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
519
+ }, userInfo.firstName || userInfo.nickName), /*#__PURE__*/_react["default"].createElement("p", {
520
+ className: "phone"
521
+ }, userInfo.mobilePhone))) : /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
412
522
  className: "photo"
413
523
  }, /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
414
524
  color: "#fff",
@@ -441,6 +551,11 @@ function (_super) {
441
551
  onClick: function onClick() {
442
552
  return _this.onItemClick(item.sourceType);
443
553
  }
554
+ }, /*#__PURE__*/_react["default"].createElement("div", {
555
+ className: "content-wrap",
556
+ style: {
557
+ pointerEvents: window.magicDesign.mode == 'designer' ? 'auto' : 'none'
558
+ }
444
559
  }, item.number.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
445
560
  className: "number",
446
561
  data: __assign(__assign({}, item.number), {
@@ -453,8 +568,18 @@ function (_super) {
453
568
  onTextInput: function onTextInput(text) {
454
569
  item.title.text = text;
455
570
  }
456
- }));
457
- })));
571
+ })));
572
+ })), editImgModalVisible && /*#__PURE__*/_react["default"].createElement(_common.CropperModal, {
573
+ onClose: function onClose() {
574
+ _this.setState({
575
+ editImgModalVisible: false
576
+ });
577
+
578
+ _this.showBottomBar();
579
+ },
580
+ onSubmit: this.onUploadImg,
581
+ uploadedImageFile: selectedImgFile
582
+ }));
458
583
  };
459
584
 
460
585
  PersonalInfoMobile.defaultProps = {
@@ -1,12 +1,12 @@
1
1
  .personal-information-mobile {
2
- height: 4.6rem;
2
+ height: 3.24rem;
3
3
  padding: 0.32rem;
4
4
  box-sizing: border-box;
5
5
  }
6
6
  .personal-information-mobile .top {
7
7
  display: flex;
8
8
  justify-content: space-between;
9
- align-items: start;
9
+ align-items: flex-start;
10
10
  }
11
11
  .personal-information-mobile .top .pInfoWrap {
12
12
  display: flex;
@@ -16,6 +16,7 @@
16
16
  position: relative;
17
17
  display: inline-block;
18
18
  vertical-align: middle;
19
+ margin-right: 0.3rem;
19
20
  height: 0.88rem;
20
21
  width: 0.88rem;
21
22
  }
@@ -95,11 +96,6 @@
95
96
  margin-top: 0.48rem;
96
97
  }
97
98
  .personal-information-mobile .bottom .item {
98
- display: flex;
99
- flex-direction: column;
100
- justify-content: flex-start;
101
- align-items: center;
102
- flex: 1;
103
99
  position: relative;
104
100
  }
105
101
  .personal-information-mobile .bottom .item:after {
@@ -115,6 +111,13 @@
115
111
  .personal-information-mobile .bottom .item:last-child:after {
116
112
  display: none;
117
113
  }
114
+ .personal-information-mobile .bottom .item .content-wrap {
115
+ display: flex;
116
+ flex-direction: column;
117
+ justify-content: flex-start;
118
+ align-items: center;
119
+ flex: 1;
120
+ }
118
121
  .personal-information-mobile .bottom .item .number {
119
122
  width: 70% !important;
120
123
  font-size: 0.36rem;
@@ -641,8 +641,10 @@ function (_super) {
641
641
  onItemClick: function onItemClick() {
642
642
  /** PTO 定制GA */
643
643
  if (window.magicDesign.pushGA) {
644
- window.magicDesign.pushGA(item, 'select_item', {
645
- event_action: 'Select Item'
644
+ window.magicDesign.pushGA(item, 'GA_SENSOR_select_item', {
645
+ event_action: 'Select Item',
646
+ event_section: data.type,
647
+ promotion_name: item === null || item === void 0 ? void 0 : item.offerName
646
648
  });
647
649
  }
648
650
 
@@ -344,7 +344,19 @@ function (_super) {
344
344
  }), !!messageNum && /*#__PURE__*/_react["default"].createElement("span", {
345
345
  className: "num"
346
346
  }, messageNum))), data.content && ((_p = data.content.logo) === null || _p === void 0 ? void 0 : _p.open) && /*#__PURE__*/_react["default"].createElement("div", {
347
- className: "logo"
347
+ className: "logo",
348
+ onClick: function onClick() {
349
+ var _a, _b;
350
+ /** PTO 定制GA */
351
+
352
+
353
+ if (window.magicDesign.pushGA) {
354
+ window.magicDesign.pushGA({}, 'select_promotion', {
355
+ event_section: data.type,
356
+ promotion_name: (_b = (_a = data.content.logo) === null || _a === void 0 ? void 0 : _a.content) === null || _b === void 0 ? void 0 : _b.h5Name
357
+ });
358
+ }
359
+ }
348
360
  }, /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
349
361
  data: data.content.logo,
350
362
  style: {
@@ -17,8 +17,6 @@ var _coreUtil = require("../../../../utils/coreUtil");
17
17
 
18
18
  var _locale = require("../../../../locale");
19
19
 
20
- require("./index.less");
21
-
22
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
23
21
 
24
22
  var __extends = void 0 && (void 0).__extends || function () {
@@ -47,6 +45,7 @@ var __extends = void 0 && (void 0).__extends || function () {
47
45
  };
48
46
  }();
49
47
 
48
+ // import './index.less';
50
49
  var CommonFunctionsSecondConfig =
51
50
  /** @class */
52
51
  function (_super) {
@@ -71,7 +71,7 @@ function (_super) {
71
71
  value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
72
72
  data: panelProps.image,
73
73
  needHover: false,
74
- onlySpecificCode: "FunctionPage"
74
+ onlySpecificCode: ['CustomizedPage', 'FunctionPage']
75
75
  }),
76
76
  metaOption: panelProps.image
77
77
  }];
@@ -71,7 +71,7 @@ function (_super) {
71
71
  value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
72
72
  data: panelProps.image,
73
73
  needClickArea: false,
74
- onlySpecificCode: "FunctionPage"
74
+ onlySpecificCode: ['CustomizedPage', 'FunctionPage']
75
75
  }),
76
76
  metaOption: panelProps.image
77
77
  }];
@@ -314,8 +314,10 @@ function (_super) {
314
314
 
315
315
  var _this = this;
316
316
 
317
- return __generator(this, function (_e) {
318
- switch (_e.label) {
317
+ var _e;
318
+
319
+ return __generator(this, function (_f) {
320
+ switch (_f.label) {
319
321
  case 0:
320
322
  panelProps = this.props.panelProps;
321
323
  groupSource = this.state.groupSource;
@@ -341,10 +343,10 @@ function (_super) {
341
343
 
342
344
  _a = (groupSource[index] || {}).prodIds, prodIds = _a === void 0 ? '' : _a;
343
345
  newData = [];
344
- _e.label = 1;
346
+ _f.label = 1;
345
347
 
346
348
  case 1:
347
- _e.trys.push([1, 5,, 6]);
349
+ _f.trys.push([1, 5,, 6]);
348
350
 
349
351
  if (!(groupSource.length > 0)) return [3
350
352
  /*break*/
@@ -358,22 +360,22 @@ function (_super) {
358
360
 
359
361
  return [4
360
362
  /*yield*/
361
- , (0, _commonUtil.commonFetch)('/designer/v1/h5/nuri/distribute/product', {
363
+ , (0, _commonUtil.commonFetch)('/designer/v1/h5/nuri/distribute/product/es/page', {
362
364
  affiliateProductIds: prodIds,
363
365
  pageIndex: 1,
364
366
  pageSize: prodIds.split(',').length || 20
365
- }, 'GET')];
367
+ }, 'POST')];
366
368
 
367
369
  case 2:
368
- res = _e.sent();
369
- newData = __spreadArrays(res.list);
370
+ res = _f.sent();
371
+ newData = __spreadArrays((_e = res.pageInfo) === null || _e === void 0 ? void 0 : _e.list);
370
372
  return [3
371
373
  /*break*/
372
374
  , 4];
373
375
 
374
376
  case 3:
375
377
  newData = [];
376
- _e.label = 4;
378
+ _f.label = 4;
377
379
 
378
380
  case 4:
379
381
  return [3
@@ -381,7 +383,7 @@ function (_super) {
381
383
  , 6];
382
384
 
383
385
  case 5:
384
- e_1 = _e.sent();
386
+ e_1 = _f.sent();
385
387
  newData = [];
386
388
  return [3
387
389
  /*break*/
@@ -309,8 +309,10 @@ function (_super) {
309
309
 
310
310
  var _this = this;
311
311
 
312
- return __generator(this, function (_e) {
313
- switch (_e.label) {
312
+ var _e;
313
+
314
+ return __generator(this, function (_f) {
315
+ switch (_f.label) {
314
316
  case 0:
315
317
  panelProps = this.props.panelProps;
316
318
  groupSource = this.state.groupSource;
@@ -336,10 +338,10 @@ function (_super) {
336
338
 
337
339
  _a = (groupSource[index] || {}).prodIds, prodIds = _a === void 0 ? '' : _a;
338
340
  newData = [];
339
- _e.label = 1;
341
+ _f.label = 1;
340
342
 
341
343
  case 1:
342
- _e.trys.push([1, 5,, 6]);
344
+ _f.trys.push([1, 5,, 6]);
343
345
 
344
346
  if (!(groupSource.length > 0)) return [3
345
347
  /*break*/
@@ -353,22 +355,22 @@ function (_super) {
353
355
 
354
356
  return [4
355
357
  /*yield*/
356
- , (0, _commonUtil.commonFetch)('/designer/v1/h5/nuri/distribute/product', {
358
+ , (0, _commonUtil.commonFetch)('/designer/v1/h5/nuri/distribute/product/es/page', {
357
359
  affiliateProductIds: prodIds,
358
360
  pageIndex: 1,
359
361
  pageSize: prodIds.split(',').length || 20
360
- }, 'GET')];
362
+ }, 'POST')];
361
363
 
362
364
  case 2:
363
- res = _e.sent();
364
- newData = __spreadArrays(res.list);
365
+ res = _f.sent();
366
+ newData = __spreadArrays((_e = res.pageInfo) === null || _e === void 0 ? void 0 : _e.list);
365
367
  return [3
366
368
  /*break*/
367
369
  , 4];
368
370
 
369
371
  case 3:
370
372
  newData = [];
371
- _e.label = 4;
373
+ _f.label = 4;
372
374
 
373
375
  case 4:
374
376
  return [3
@@ -376,7 +378,7 @@ function (_super) {
376
378
  , 6];
377
379
 
378
380
  case 5:
379
- e_1 = _e.sent();
381
+ e_1 = _f.sent();
380
382
  newData = [];
381
383
  return [3
382
384
  /*break*/
@@ -15,7 +15,7 @@ var _Button = _interopRequireDefault(require("../../../../../common/Button"));
15
15
 
16
16
  var _GroupList = _interopRequireDefault(require("../../../../../common/GroupList"));
17
17
 
18
- var _defaultJSON = require("../../../components/Recommend/defaultJSON");
18
+ var _defaultJSON = require("../../../../dito/components/Recommend/defaultJSON");
19
19
 
20
20
  var _coreUtil = require("../../../../../utils/coreUtil");
21
21
 
@@ -41,7 +41,7 @@ var _SignBoard = _interopRequireDefault(require("../composite-comp/dito/componen
41
41
 
42
42
  var _Recommend = _interopRequireDefault(require("../composite-comp/dito/components/Recommend"));
43
43
 
44
- var _AffiliateRecommend = _interopRequireDefault(require("../composite-comp/dito/components/AffiliateRecommend"));
44
+ var _AffiliateRecommend = _interopRequireDefault(require("../composite-comp/nuri/components/AffiliateRecommend"));
45
45
 
46
46
  var _MobileNavigation = _interopRequireDefault(require("../composite-comp/dito/components/MobileNavigation"));
47
47
 
@@ -93,7 +93,7 @@ var _SignBoardConfig = _interopRequireDefault(require("../composite-comp/dito/co
93
93
 
94
94
  var _RecommendConfig = _interopRequireDefault(require("../composite-comp/dito/config-panels/RecommendConfig"));
95
95
 
96
- var _AffiliateRecommendConfig = _interopRequireDefault(require("../composite-comp/dito/config-panels/AffiliateRecommendConfig"));
96
+ var _AffiliateRecommendConfig = _interopRequireDefault(require("../composite-comp/nuri/config-panels/AffiliateRecommendConfig"));
97
97
 
98
98
  var _MobileNavigationConfig = _interopRequireDefault(require("../composite-comp/dito/config-panels/MobileNavigationConfig"));
99
99
 
@@ -131,7 +131,7 @@ var _WalletNuriSecondConfig = _interopRequireDefault(require("../composite-comp/
131
131
 
132
132
  var _RecommendSecondConfig = _interopRequireDefault(require("../composite-comp/dito/second-config-panels/RecommendSecondConfig"));
133
133
 
134
- var _AffiliateRecommendSecondConfig = _interopRequireDefault(require("../composite-comp/dito/second-config-panels/AffiliateRecommendSecondConfig"));
134
+ var _AffiliateRecommendSecondConfig = _interopRequireDefault(require("../composite-comp/nuri/second-config-panels/AffiliateRecommendSecondConfig"));
135
135
 
136
136
  var _MobileNavigationSecondConfig = _interopRequireDefault(require("../composite-comp/dito/second-config-panels/MobileNavigationSecondConfig"));
137
137
 
@@ -84,6 +84,7 @@ var urlTypeMap = {
84
84
  MINI_APP: 'MiniApp',
85
85
  STORE: 'Store',
86
86
  AFFILIATE_PRODUCT: 'AffiliateProduct',
87
+ AFFILIATE_STORE: 'AffiliateStore',
87
88
  ANCHOR: 'Anchor'
88
89
  };
89
90
  exports.urlTypeMap = urlTypeMap;
@@ -153,7 +153,11 @@ function (_super) {
153
153
 
154
154
  _this.props.quillRef.format('list', currentListType == 'bullet' ? '' : 'bullet');
155
155
  } else if (type == 'link') {
156
- _this.props.quillRef.format('link', JSON.stringify(value));
156
+ if (window.magicDesign.outputType === 'html') {
157
+ _this.props.quillRef.format('link', value.name);
158
+ } else {
159
+ _this.props.quillRef.format('link', JSON.stringify(value));
160
+ }
157
161
  } else if (type == 'size') {
158
162
  _this.props.quillRef.format('size', value + 'px');
159
163
  } else if (type == 'font') {
@@ -44,7 +44,8 @@ var __assign = void 0 && (void 0).__assign || function () {
44
44
  var setDesignConfig = function setDesignConfig(props) {
45
45
  var config = props.config,
46
46
  device = props.device,
47
- isPreview = props.isPreview;
47
+ isPreview = props.isPreview,
48
+ projectCode = props.projectCode;
48
49
  window.magicDesign = __assign(__assign({
49
50
  pageBackground: '#f2f2f2',
50
51
  mode: 'renderer',
@@ -52,6 +53,7 @@ var setDesignConfig = function setDesignConfig(props) {
52
53
  designMode: isPreview,
53
54
  navigatePreUrl: ''
54
55
  }, config), {
56
+ projectCode: projectCode,
55
57
  compSpacing: Number(config.compSpacing),
56
58
  compWidth: Number(config.compWidth)
57
59
  });
@@ -137,7 +139,9 @@ var Renderer = function Renderer(props) {
137
139
  };
138
140
  }
139
141
 
140
- return {};
142
+ return {
143
+ overflow: 'auto'
144
+ };
141
145
  };
142
146
 
143
147
  return /*#__PURE__*/_react["default"].createElement("div", {
@@ -87,7 +87,11 @@ function compositeDecorator(WrappedComponent) {
87
87
  }; // 复合组件点击事件
88
88
 
89
89
  _this.onCompositeCompClick = function (event) {
90
- // 触发左侧楼层的滚动
90
+ if (window.magicDesign.mode === 'renderer') {
91
+ return;
92
+ } // 触发左侧楼层的滚动
93
+
94
+
91
95
  if (document.getElementById("card" + _this.props.nodeData.id)) {
92
96
  document.getElementById("card" + _this.props.nodeData.id).scrollIntoView({
93
97
  behavior: 'smooth'
@@ -115,19 +119,20 @@ function compositeDecorator(WrappedComponent) {
115
119
  device = _b.device,
116
120
  compWidth = _b.compWidth;
117
121
  var zIndex = '0';
122
+ var position = 'relative';
118
123
 
119
124
  if (nodeData.type === 'CAROUSEL' || nodeData.type === 'IMAGE_GALLERY' || nodeData.type === 'ORDERS') {
120
125
  zIndex = '1';
121
126
  } // 解决pc导航hover上去,类目被下面组件遮罩的问题
122
127
 
123
128
 
124
- if (nodeData.type === 'PC_NAVIGATION') {
129
+ if (nodeData.type === 'PC_NAVIGATION' || nodeData.type === 'PERSONAL_INFOMATION') {
125
130
  zIndex = '2';
126
131
  }
127
132
 
128
133
  var wrapStyle = {
129
134
  border: 'none',
130
- position: 'relative',
135
+ position: position,
131
136
  zIndex: zIndex,
132
137
  margin: '0 auto'
133
138
  }; // 复合组件内边距
@@ -205,8 +210,7 @@ function compositeDecorator(WrappedComponent) {
205
210
  };
206
211
 
207
212
  _this.getWrapStyle = function () {
208
- var mode = window.magicDesign.mode; // const { nodeData } = this.props;
209
-
213
+ var mode = window.magicDesign.mode;
210
214
  var style = {
211
215
  position: 'relative',
212
216
  zIndex: '1'
@@ -55,11 +55,14 @@ function shouldUpdate() {
55
55
  descriptor.value = function (nextProps, nextState) {
56
56
  var nowPropsJson = JSON.stringify(nextProps);
57
57
  var nowStateJson = JSON.stringify(nextState);
58
+ var nowDevice = window.magicDesign.device;
58
59
  var should1 = nowPropsJson != this.preProps;
59
60
  var should2 = nowStateJson != this.preState;
61
+ var should3 = nowDevice != this.preDevice;
60
62
  this.preProps = nowPropsJson;
61
63
  this.preState = nowStateJson;
62
- var result = should1 || should2;
64
+ this.preDevice = nowDevice;
65
+ var result = should1 || should2 || should3;
63
66
  return result && fn.apply(this, {
64
67
  nextProps: nextProps
65
68
  });