@fonixtree/magic-design 2.0.31 → 2.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.
Files changed (133) hide show
  1. package/es/assets/less/modal.less +1 -1
  2. package/es/common/LinkModal/FilteredProductModal/index.js +7 -3
  3. package/es/common/LinkModal/FilteredProductModal/index.less +1 -1
  4. package/es/common/LinkModal/index.js +1 -1
  5. package/es/common/ProductModal/index.js +23 -30
  6. package/es/composite-comp/bol/components/Banner/mobile/index.js +6 -0
  7. package/es/composite-comp/bol/components/Video/defaultJSON.js +24 -0
  8. package/es/composite-comp/bol/config-panels/TagCompConfig/imgs/layout1.png +0 -0
  9. package/es/composite-comp/bol/second-config-panels/VideoSecondConfig/index.js +0 -1
  10. package/es/composite-comp/common/components/ProductItem/index.js +8 -4
  11. package/es/composite-comp/common/components/ProductItem/index.less +30 -15
  12. package/es/composite-comp/dito/components/Recommend/defaultJSON.js +1 -1
  13. package/es/composite-comp/dito/components/Recommend/mobile/index.js +14 -2
  14. package/es/composite-comp/dito/components/SignBoard/defaultJSON.js +41 -37
  15. package/es/composite-comp/dito/components/SignBoard/mobile/index.js +33 -28
  16. package/es/composite-comp/dito/components/SignBoard/mobile/index.less +0 -14
  17. package/es/composite-comp/dito/components/SignBoard/pc/index.js +8 -11
  18. package/es/composite-comp/dito/config-panels/SignBoardConfig/SignBoardConfigContent/index.js +9 -47
  19. package/es/composite-comp/dito/config-panels/SignBoardConfig/index.js +9 -2
  20. package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +3 -3
  21. package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +14 -2
  22. package/es/core/Designer/LeftTitle/index.js +1 -1
  23. package/es/core/Designer/ToolBarModal/index.js +16 -4
  24. package/es/core/Designer/index.js +3 -0
  25. package/es/core/Renderer/index.js +4 -12
  26. package/es/decorator/index.js +24 -1
  27. package/es/locale/en/en.json +1 -1
  28. package/es/locale/es/es.json +1 -1
  29. package/es/locale/id/id.json +1 -1
  30. package/es/meta-comp/components/Button/index.js +7 -0
  31. package/es/meta-comp/components/Text/formats/fontStyle.js +58 -0
  32. package/es/meta-comp/components/Text/index.js +9 -0
  33. package/es/meta-comp/config-panels/ButtonConfig/index.js +30 -28
  34. package/es/utils/commonUtil.js +17 -3
  35. package/es/utils/currencyUtil.js +29 -10
  36. package/lib/assets/less/modal.less +1 -1
  37. package/lib/common/LinkModal/FilteredProductModal/index.js +7 -3
  38. package/lib/common/LinkModal/FilteredProductModal/index.less +1 -1
  39. package/lib/common/LinkModal/index.js +1 -1
  40. package/lib/common/ProductModal/index.js +23 -30
  41. package/lib/composite-comp/bol/components/Banner/mobile/index.js +6 -0
  42. package/lib/composite-comp/bol/components/Video/defaultJSON.js +24 -0
  43. package/lib/composite-comp/bol/config-panels/TagCompConfig/imgs/layout1.png +0 -0
  44. package/lib/composite-comp/bol/second-config-panels/VideoSecondConfig/index.js +0 -1
  45. package/lib/composite-comp/common/components/ProductItem/index.js +8 -4
  46. package/lib/composite-comp/common/components/ProductItem/index.less +30 -15
  47. package/lib/composite-comp/dito/components/Recommend/defaultJSON.js +1 -1
  48. package/lib/composite-comp/dito/components/Recommend/mobile/index.js +14 -2
  49. package/lib/composite-comp/dito/components/SignBoard/defaultJSON.js +41 -37
  50. package/lib/composite-comp/dito/components/SignBoard/mobile/index.js +33 -28
  51. package/lib/composite-comp/dito/components/SignBoard/mobile/index.less +0 -14
  52. package/lib/composite-comp/dito/components/SignBoard/pc/index.js +8 -11
  53. package/lib/composite-comp/dito/config-panels/SignBoardConfig/SignBoardConfigContent/index.js +9 -47
  54. package/lib/composite-comp/dito/config-panels/SignBoardConfig/index.js +9 -2
  55. package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +3 -3
  56. package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +14 -2
  57. package/lib/core/Designer/LeftTitle/index.js +1 -1
  58. package/lib/core/Designer/ToolBarModal/index.js +16 -4
  59. package/lib/core/Designer/index.js +3 -0
  60. package/lib/core/Renderer/index.js +4 -12
  61. package/lib/decorator/index.js +24 -1
  62. package/lib/locale/en/en.json +1 -1
  63. package/lib/locale/es/es.json +1 -1
  64. package/lib/locale/id/id.json +1 -1
  65. package/lib/meta-comp/components/Button/index.js +7 -0
  66. package/lib/meta-comp/components/Text/formats/fontStyle.js +58 -0
  67. package/lib/meta-comp/components/Text/index.js +9 -0
  68. package/lib/meta-comp/config-panels/ButtonConfig/index.js +30 -28
  69. package/lib/utils/commonUtil.js +17 -3
  70. package/lib/utils/currencyUtil.js +29 -10
  71. package/package.json +1 -1
  72. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/AlignSelectPicker/index.js +0 -99
  73. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/AlignSelectPicker/index.less +0 -54
  74. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/images/AlignCenterSVG.js +0 -27
  75. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/images/AlignLeftSVG.js +0 -27
  76. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/images/AlignRightSVG.js +0 -27
  77. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/index.js +0 -96
  78. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/index.less +0 -26
  79. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/ColorPickerBtn/index.js +0 -101
  80. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/ColorPickerBtn/index.less +0 -26
  81. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/LinkInputPicker/index.js +0 -99
  82. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/LinkInputPicker/index.less +0 -39
  83. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/index.js +0 -93
  84. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/index.less +0 -26
  85. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/BackgroundSVG.js +0 -27
  86. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/BoldSVG.js +0 -29
  87. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/FontColorSVG.js +0 -49
  88. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/ItalicSVG.js +0 -29
  89. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/LinkSVG.js +0 -26
  90. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/OrderSVG.js +0 -27
  91. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/StrikeSVG.js +0 -31
  92. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/UnderlineSVG.js +0 -34
  93. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/images/UnorderSVG.js +0 -41
  94. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/index.js +0 -136
  95. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/index.less +0 -25
  96. package/es/core/Designer/TextEditModal/ToolBar/ToolBtn/type.js +0 -1
  97. package/es/core/Designer/TextEditModal/ToolBar/index.js +0 -219
  98. package/es/core/Designer/TextEditModal/ToolBar/index.less +0 -19
  99. package/es/core/Designer/TextEditModal/index.js +0 -100
  100. package/es/core/Designer/TextEditModal/index.less +0 -4
  101. package/es/core/Designer/TextEditModal_old/index.js +0 -142
  102. package/es/core/Designer/TextEditModal_old/index.less +0 -25
  103. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/AlignSelectPicker/index.js +0 -99
  104. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/AlignSelectPicker/index.less +0 -54
  105. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/images/AlignCenterSVG.js +0 -27
  106. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/images/AlignLeftSVG.js +0 -27
  107. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/images/AlignRightSVG.js +0 -27
  108. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/index.js +0 -96
  109. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/AlignPicker/index.less +0 -26
  110. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/ColorPickerBtn/index.js +0 -101
  111. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/ColorPickerBtn/index.less +0 -26
  112. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/LinkInputPicker/index.js +0 -99
  113. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/LinkInputPicker/index.less +0 -39
  114. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/index.js +0 -93
  115. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/components/LinkBtn/index.less +0 -26
  116. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/BackgroundSVG.js +0 -27
  117. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/BoldSVG.js +0 -29
  118. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/FontColorSVG.js +0 -49
  119. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/ItalicSVG.js +0 -29
  120. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/LinkSVG.js +0 -26
  121. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/OrderSVG.js +0 -27
  122. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/StrikeSVG.js +0 -31
  123. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/UnderlineSVG.js +0 -34
  124. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/images/UnorderSVG.js +0 -41
  125. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/index.js +0 -136
  126. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/index.less +0 -25
  127. package/lib/core/Designer/TextEditModal/ToolBar/ToolBtn/type.js +0 -1
  128. package/lib/core/Designer/TextEditModal/ToolBar/index.js +0 -219
  129. package/lib/core/Designer/TextEditModal/ToolBar/index.less +0 -19
  130. package/lib/core/Designer/TextEditModal/index.js +0 -100
  131. package/lib/core/Designer/TextEditModal/index.less +0 -4
  132. package/lib/core/Designer/TextEditModal_old/index.js +0 -142
  133. package/lib/core/Designer/TextEditModal_old/index.less +0 -25
@@ -18,7 +18,7 @@
18
18
  .cylon-modal-body {
19
19
  padding: 16px 16px 12px 16px !important;
20
20
  max-height: 800px !important;
21
- overflow: scroll;
21
+ // overflow: scroll;
22
22
  }
23
23
  }
24
24
  }
@@ -447,7 +447,7 @@ var FilteredProductModal = function FilteredProductModal(props) {
447
447
  switch (_a.label) {
448
448
  case 0:
449
449
  precision = Math.pow(10, (0, _commonUtil.ensure)(function () {
450
- return window.ecommerce.precision;
450
+ return window.systemParams.precision;
451
451
  }, '0'));
452
452
  params = {
453
453
  catgIds: tValue.join(','),
@@ -532,12 +532,14 @@ var FilteredProductModal = function FilteredProductModal(props) {
532
532
  layout: "vertical"
533
533
  }, /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
534
534
  label: "Category"
535
- }, /*#__PURE__*/_react["default"].createElement(_antd.TreeSelect, {
536
- allowClear: true,
535
+ }, /*#__PURE__*/_react["default"].createElement(_antd.TreeSelect // allowClear
536
+ , {
537
537
  dropdownStyle: {
538
538
  maxHeight: 400,
539
539
  overflow: 'auto'
540
540
  },
541
+ maxTagCount: 2,
542
+ maxTagTextLength: 5,
541
543
  multiple: true,
542
544
  onChange: onChange,
543
545
  placeholder: (0, _locale.i18n)('PLEASE_SELECT'),
@@ -549,6 +551,8 @@ var FilteredProductModal = function FilteredProductModal(props) {
549
551
  label: "Brand"
550
552
  }, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
551
553
  defaultValue: [],
554
+ maxTagCount: 2,
555
+ maxTagTextLength: 5,
552
556
  mode: "multiple",
553
557
  onChange: handleBrandChange,
554
558
  placeholder: (0, _locale.i18n)('PLEASE_SELECT'),
@@ -84,7 +84,7 @@
84
84
  }
85
85
 
86
86
  .leftCot {
87
- width: 230px;
87
+ width: 280px;
88
88
  // height: 400px;
89
89
  box-sizing: border-box;
90
90
  border-right: 1px solid #e0e0e0;
@@ -285,7 +285,7 @@ var LinkModal = function LinkModal(props) {
285
285
  ,
286
286
  title: (0, _locale.i18n)('URL_SETUP'),
287
287
  visible: visible,
288
- width: "900px",
288
+ width: "1000px",
289
289
  wrapClassName: "magicLinkModal"
290
290
  }, /*#__PURE__*/_react["default"].createElement(_antd.Tabs, {
291
291
  activeKey: selected,
@@ -204,8 +204,6 @@ var __spreadArrays = void 0 && (void 0).__spreadArrays || function () {
204
204
  return r;
205
205
  };
206
206
 
207
- var precision = (0, _currencyUtil.getPrecision)();
208
-
209
207
  var formatData = function formatData(list) {
210
208
  list.map(function (item) {
211
209
  item.preSalesPrice = (0, _currencyUtil.formatCurrencyWithSymbol)(item.salesPrice);
@@ -377,21 +375,18 @@ var ProductModal = function ProductModal(props) {
377
375
 
378
376
  var queryOfferCatgs = function queryOfferCatgs() {
379
377
  return __awaiter(void 0, void 0, void 0, function () {
380
- var res, arr;
378
+ var res, tree;
381
379
  return __generator(this, function (_a) {
382
380
  switch (_a.label) {
383
381
  case 0:
384
382
  return [4
385
383
  /*yield*/
386
- , (0, _commonUtil.commonFetch)('/designer/v1/h5/offers/catgs', {}, 'GET')];
384
+ , (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/designer/resource/offercatgs/list", {}, 'GET')];
387
385
 
388
386
  case 1:
389
387
  res = _a.sent();
390
- arr = [];
391
- res.forEach(function (f) {
392
- if (f.children) arr.push.apply(arr, f.children);
393
- });
394
- setCatgsList(arr);
388
+ tree = (0, _businessUtil.listToTree)(res);
389
+ setCatgsList(tree);
395
390
  return [2
396
391
  /*return*/
397
392
  ];
@@ -409,7 +404,7 @@ var ProductModal = function ProductModal(props) {
409
404
  case 0:
410
405
  return [4
411
406
  /*yield*/
412
- , (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/offerdiscatgs/brands", {}, 'GET')];
407
+ , (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/designer/resource/brand/list", {}, 'GET')];
413
408
 
414
409
  case 1:
415
410
  res = _a.sent();
@@ -565,35 +560,33 @@ var ProductModal = function ProductModal(props) {
565
560
  layout: "vertical"
566
561
  }, /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
567
562
  label: "Category"
568
- }, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
569
- mode: "multiple",
570
- onChange: function onChange(value, option) {
563
+ }, /*#__PURE__*/_react["default"].createElement(_antd.TreeSelect, {
564
+ dropdownStyle: {
565
+ maxHeight: 400,
566
+ overflow: 'auto'
567
+ },
568
+ maxTagCount: 2,
569
+ maxTagTextLength: 5,
570
+ multiple: true,
571
+ onChange: function onChange(value) {
571
572
  setSelCatgsList(value);
572
573
  },
573
574
  placeholder: (0, _locale.i18n)('PLEASE_SELECT'),
574
575
  size: "small",
576
+ treeData: catgsList,
577
+ treeDefaultExpandAll: true,
575
578
  value: selCatgsList
576
- }, catgsList.map(function (item) {
577
- return /*#__PURE__*/_react["default"].createElement(OptGroup, {
578
- key: item.model.catgId,
579
- label: item.model.catgName
580
- }, (item.children || []).map(function (i) {
581
- return /*#__PURE__*/_react["default"].createElement(Option, {
582
- key: i.model.catgId,
583
- value: i.model.catgId
584
- }, i.model.catgName);
585
- }));
586
- }))), /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
579
+ })), /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
587
580
  label: "Brand"
588
581
  }, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
589
582
  mode: "multiple",
590
- onChange: function onChange(value, option) {
583
+ onChange: function onChange(value) {
591
584
  setSelBrandsList(value);
592
585
  },
593
586
  placeholder: (0, _locale.i18n)('PLEASE_SELECT'),
594
587
  size: "small",
595
588
  value: selBrandsList
596
- }, brandsList.map(function (item, index) {
589
+ }, brandsList.map(function (item) {
597
590
  return /*#__PURE__*/_react["default"].createElement(Option, {
598
591
  key: item.catgId,
599
592
  value: item.brandId
@@ -706,8 +699,8 @@ var ProductModal = function ProductModal(props) {
706
699
  productCode: productCode,
707
700
  storeId: storeId,
708
701
  cmpTypeId: promotions || '',
709
- minPrice: minPrice === '' ? '' : minPrice * Math.pow(10, precision),
710
- maxPrice: maxPrice === '' ? '' : maxPrice * Math.pow(10, precision),
702
+ minPrice: (0, _currencyUtil.formatBackendCurrency)(minPrice),
703
+ maxPrice: (0, _currencyUtil.formatBackendCurrency)(maxPrice),
711
704
  catgIds: selCatgsList.join(','),
712
705
  brandIds: selBrandsList.join(','),
713
706
  labelIds: selLabelData.value || '',
@@ -736,8 +729,8 @@ var ProductModal = function ProductModal(props) {
736
729
  productName: productName,
737
730
  productCode: productCode,
738
731
  cmpTypeId: promotions || '',
739
- minPrice: minPrice === '' ? '' : minPrice * Math.pow(10, precision),
740
- maxPrice: maxPrice === '' ? '' : maxPrice * Math.pow(10, precision),
732
+ minPrice: (0, _currencyUtil.formatBackendCurrency)(minPrice),
733
+ maxPrice: (0, _currencyUtil.formatBackendCurrency)(maxPrice),
741
734
  catgIds: selCatgsList.join(','),
742
735
  brandIds: selBrandsList.join(','),
743
736
  labelIds: selLabelData.value || '',
@@ -208,6 +208,12 @@ function (_super) {
208
208
  style: _this.getBackgroundStyle(item)
209
209
  }, /*#__PURE__*/_react["default"].createElement("div", {
210
210
  className: "carouselItem",
211
+ onClick: function onClick() {
212
+ /** PTO 定制GA */
213
+ if (window.magicDesign.pushGA) {
214
+ window.magicDesign.pushGA({}, 'select_promotion');
215
+ }
216
+ },
211
217
  onMouseEnter: _this.mouseEnterWrap,
212
218
  onMouseLeave: _this.mouseLeaveWrap,
213
219
  style: _this.getItemStyle(item)
@@ -101,6 +101,18 @@ var videoGroupSourceJSON = function videoGroupSourceJSON(parentId) {
101
101
  iconUrl: '',
102
102
  layout: 'right'
103
103
  },
104
+ spacing: {
105
+ pc: {
106
+ paddingTop: 0,
107
+ paddingBottom: 0,
108
+ marginBottom: 0
109
+ },
110
+ mobile: {
111
+ paddingTop: 0,
112
+ paddingBottom: 0,
113
+ marginBottom: 0
114
+ }
115
+ },
104
116
  text: 'Button Tag'
105
117
  },
106
118
  secondButtonTag: {
@@ -126,6 +138,18 @@ var videoGroupSourceJSON = function videoGroupSourceJSON(parentId) {
126
138
  borderColor: '',
127
139
  borderRadius: 4
128
140
  },
141
+ spacing: {
142
+ pc: {
143
+ paddingTop: 0,
144
+ paddingBottom: 0,
145
+ marginBottom: 0
146
+ },
147
+ mobile: {
148
+ paddingTop: 0,
149
+ paddingBottom: 0,
150
+ marginBottom: 0
151
+ }
152
+ },
129
153
  buttonIcon: {
130
154
  iconUrl: '',
131
155
  layout: 'right'
@@ -79,7 +79,6 @@ function (_super) {
79
79
  var _a;
80
80
 
81
81
  var obj = null;
82
- console.log(customize);
83
82
 
84
83
  if ((0, _coreUtil.isPc)()) {
85
84
  switch ((_a = customize === null || customize === void 0 ? void 0 : customize.layout) === null || _a === void 0 ? void 0 : _a.pcLayout) {
@@ -133,7 +133,7 @@ function (_super) {
133
133
  }
134
134
 
135
135
  var pricePrefix = (0, _commonUtil.ensure)(function () {
136
- return window.ecommerce.prefix;
136
+ return window.systemParams.prefix;
137
137
  }, 'Rp');
138
138
 
139
139
  var _price = pricePrefix + " " + integerPart + " " + (decimalPart ? '.' + decimalPart : '');
@@ -202,11 +202,13 @@ function (_super) {
202
202
  text: _price
203
203
  }),
204
204
  readonly: true
205
- }), oldPrice && panelProps.salesPrice.open && /*#__PURE__*/_react["default"].createElement("div", {
205
+ }), panelProps.salesPrice.open && /*#__PURE__*/_react["default"].createElement("div", {
206
+ className: "price-sold-wrap"
207
+ }, /*#__PURE__*/_react["default"].createElement("div", {
206
208
  className: "old-price-wrap"
207
209
  }, !!discount && /*#__PURE__*/_react["default"].createElement("span", {
208
210
  className: "discount"
209
- }, "-", discount, "%"), /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
211
+ }, "-", discount, "%"), oldPrice && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
210
212
  className: "old-price",
211
213
  data: __assign(__assign({}, panelProps.salesPrice), {
212
214
  text: oldPrice
@@ -215,7 +217,9 @@ function (_super) {
215
217
  style: {
216
218
  color: panelProps.salesPrice.content.color
217
219
  }
218
- })), showProgress && panelProps.salesProgressVisible.open && /*#__PURE__*/_react["default"].createElement("div", {
220
+ })), !showProgress && data.salesCnt > 0 && /*#__PURE__*/_react["default"].createElement("div", {
221
+ className: "sold-count"
222
+ }, (0, _commonUtil.convertCount)(data.salesCnt), " sold")), showProgress && panelProps.salesProgressVisible.open && /*#__PURE__*/_react["default"].createElement("div", {
219
223
  className: "progress-wrap"
220
224
  }, /*#__PURE__*/_react["default"].createElement("span", {
221
225
  className: "text"
@@ -5,6 +5,9 @@
5
5
  border: 1px solid #D2D9E5;
6
6
  width: 142px;
7
7
  cursor: pointer;
8
+ position: relative;
9
+
10
+
8
11
 
9
12
  .img-wrap {
10
13
  position: relative;
@@ -50,28 +53,40 @@
50
53
  text-overflow: ellipsis;
51
54
  }
52
55
 
53
- .old-price-wrap {
56
+ .price-sold-wrap {
54
57
  display: flex;
55
58
  margin-top: 0px;
56
- align-items: baseline;
59
+ align-items: center;
57
60
  white-space: nowrap;
58
61
  overflow: hidden;
59
62
  text-overflow: ellipsis;
60
-
61
- .discount {
62
- margin-right: 3px;
63
- font-family: 'Montserrat';
64
- font-style: normal;
65
- font-weight: 700;
66
- font-size: 8px;
67
- line-height: 15px;
68
- color: #fff;
69
- padding: 0 4px;
70
- background-color: #CE1126;
63
+ flex-wrap: wrap;
64
+ line-height: 15px;
65
+ .old-price-wrap {
66
+ display: flex;
67
+ line-height: 13px;
68
+ .discount {
69
+ margin-right: 3px;
70
+ font-family: 'Montserrat';
71
+ font-style: normal;
72
+ font-weight: 700;
73
+ font-size: 8px;
74
+ line-height: 15px;
75
+ color: #fff;
76
+ padding: 0 4px;
77
+ background-color: #CE1126;
78
+ }
79
+ .old-price {
80
+ text-decoration: line-through;
81
+ width: fit-content;
82
+ }
71
83
  }
72
84
 
73
- .old-price {
74
- text-decoration: line-through;
85
+ .sold-count {
86
+ color: #7b7b7b;
87
+ font-size: 12px;
88
+ text-align: right ;
89
+ flex-grow: 1;
75
90
  }
76
91
  }
77
92
 
@@ -98,7 +98,7 @@ var recommendGroupSourceJSON = function recommendGroupSourceJSON(parentId, logo,
98
98
  },
99
99
  hover: null
100
100
  },
101
- sourceType: 'recommend',
101
+ sourceType: 'select',
102
102
  prodIds: '',
103
103
  intelligentType: 'Hot',
104
104
  intelligentValue: [],
@@ -635,7 +635,14 @@ function (_super) {
635
635
  layout: layout === 'layout2' ? 'horizontal' : 'vertical' // onItemClick={() => clickUrl(`/product/detail/${item.offerId}?productId=${item.sppProductId || item.productId || ''}`)}
636
636
  ,
637
637
  onItemClick: function onItemClick() {
638
- return (0, _coreUtil.clickUrl)("proDetail-" + item.offerId + "-" + (item.sppProductId || item.productId || ''));
638
+ /** PTO 定制GA */
639
+ if (window.magicDesign.pushGA) {
640
+ window.magicDesign.pushGA(item, 'select_item', {
641
+ event_action: 'Select Item'
642
+ });
643
+ }
644
+
645
+ (0, _coreUtil.clickUrl)("proDetail-" + item.offerId + "-" + (item.sppProductId || item.productId || ''));
639
646
  },
640
647
  panelProps: panelProps.content,
641
648
  showProgress: false
@@ -661,7 +668,12 @@ function (_super) {
661
668
  imgWidth: imgWidth // onItemClick={() => clickUrl(`/product/detail/${item.offerId}?productId=${item.sppProductId || item.productId || ''}`)}
662
669
  ,
663
670
  onItemClick: function onItemClick() {
664
- return (0, _coreUtil.clickUrl)("proDetail-" + item.offerId + "-" + (item.sppProductId || item.productId || ''));
671
+ /** PTO 定制GA */
672
+ if (window.magicDesign.pushGA) {
673
+ window.magicDesign.pushGA({}, 'select_item', item);
674
+ }
675
+
676
+ (0, _coreUtil.clickUrl)("proDetail-" + item.offerId + "-" + (item.sppProductId || item.productId || ''));
665
677
  },
666
678
  panelProps: panelProps.content,
667
679
  showProgress: false
@@ -11,43 +11,47 @@ var getDefaultJSON = function getDefaultJSON() {
11
11
  return {
12
12
  id: (0, _uuid.v4)(),
13
13
  type: 'SIGN_BOARD',
14
- // content: {
15
- // logo: {
16
- // id: uuidv4(),
17
- // open: true,
18
- // type: 'IMAGE',
19
- // content: {
20
- // h5Name: 'name2',
21
- // pcName: 'name2',
22
- // h5ImgSrc: '',
23
- // pcImgSrc: '',
24
- // clickUrl: '',
25
- // },
26
- // hover: {
27
- // open: false,
28
- // backgroundType: 'enlarge',
29
- // magnification: 1.5,
30
- // pcImgHoverUrl: '',
31
- // h5ImgHoverUrl: '',
32
- // },
33
- // },
34
- // box: {
35
- // id: uuidv4(),
36
- // open: true,
37
- // color: {
38
- // pc: '#D92929',
39
- // mobile: '#8493AF',
40
- // },
41
- // },
42
- // icon: {
43
- // id: uuidv4(),
44
- // open: true,
45
- // color: {
46
- // pc: '#D92929',
47
- // mobile: '#232F46',
48
- // },
49
- // },
50
- // },
14
+ content: {
15
+ logo: {
16
+ id: (0, _uuid.v4)(),
17
+ open: true,
18
+ type: 'IMAGE',
19
+ content: {
20
+ h5Name: 'name2',
21
+ pcName: 'name2',
22
+ h5ImgSrc: '',
23
+ pcImgSrc: '',
24
+ clickUrl: ''
25
+ },
26
+ hover: {
27
+ open: false,
28
+ backgroundType: 'enlarge',
29
+ magnification: 1.5,
30
+ pcImgHoverUrl: '',
31
+ h5ImgHoverUrl: ''
32
+ }
33
+ },
34
+ title: {
35
+ id: (0, _uuid.v4)(),
36
+ open: true,
37
+ type: 'TEXT',
38
+ specialContent: [],
39
+ text: 'Title',
40
+ content: {
41
+ sizeType: 'Customize font styles',
42
+ fontFamily: 'Open Sans',
43
+ fontWeight: 600,
44
+ fontSize: 16,
45
+ color: '#070707'
46
+ },
47
+ underline: {
48
+ open: false,
49
+ textDecorationColor: '',
50
+ textDecorationStyle: 'solid'
51
+ },
52
+ vertical: {}
53
+ }
54
+ },
51
55
  spacing: {
52
56
  pc: {
53
57
  paddingTop: 20,
@@ -13,8 +13,6 @@ var _antd = require("antd");
13
13
 
14
14
  var _common = require("../../../../../common");
15
15
 
16
- var _storeLogo = _interopRequireDefault(require("../imgs/storeLogo.png"));
17
-
18
16
  var _coreUtil = require("../../../../../utils/coreUtil");
19
17
 
20
18
  var _star = _interopRequireDefault(require("../imgs/star.svg"));
@@ -23,6 +21,8 @@ var _commonUtil = require("../../../../../utils/commonUtil");
23
21
 
24
22
  var _locale = require("../../../../../locale");
25
23
 
24
+ var _components = require("../../../../../meta-comp/components");
25
+
26
26
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
27
27
 
28
28
  var __extends = void 0 && (void 0).__extends || function () {
@@ -210,10 +210,9 @@ function (_super) {
210
210
 
211
211
  _this.getStoreInfo = function () {
212
212
  return __awaiter(_this, void 0, void 0, function () {
213
- var storeId, _a, res, isFollow;
214
-
215
- return __generator(this, function (_b) {
216
- switch (_b.label) {
213
+ var storeId, storeDetailInfo;
214
+ return __generator(this, function (_a) {
215
+ switch (_a.label) {
217
216
  case 0:
218
217
  storeId = window.magicDesign.storeId;
219
218
  if (!storeId) return [3
@@ -221,17 +220,15 @@ function (_super) {
221
220
  , 2];
222
221
  return [4
223
222
  /*yield*/
224
- , Promise.all([(0, _commonUtil.commonFetch)("/designer/v1/h5/store/detail/" + storeId, {}, 'GET'), (0, _commonUtil.commonFetch)('/designer/v1/h5/collection/store/check', {
225
- storeId: storeId
226
- })])];
223
+ , (0, _commonUtil.commonFetch)("/designer/v1/h5/store/detail/" + storeId, {}, 'GET')];
227
224
 
228
225
  case 1:
229
- _a = _b.sent(), res = _a[0], isFollow = _a[1];
226
+ storeDetailInfo = _a.sent();
230
227
  this.setState({
231
- storeInfo: res,
232
- isFollow: isFollow == 'Y'
228
+ storeInfo: storeDetailInfo,
229
+ isFollow: storeDetailInfo.userHasFollowed == 'Y'
233
230
  });
234
- _b.label = 2;
231
+ _a.label = 2;
235
232
 
236
233
  case 2:
237
234
  return [2
@@ -320,8 +317,8 @@ function (_super) {
320
317
  action: 'operation',
321
318
  params: {
322
319
  type: 'CHAT',
323
- storeId: storeInfo.storeId,
324
- sysAccount: storeInfo.sysAccount
320
+ storeId: storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.storeId,
321
+ sysAccount: storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.sysAccount
325
322
  }
326
323
  };
327
324
  window.magicDesign.handleAction(params);
@@ -335,14 +332,16 @@ function (_super) {
335
332
  };
336
333
 
337
334
  SignBoardMobile.prototype.render = function () {
338
- var _this = this; // const { data } = this.props;
339
- // console.log('--SignBoard', data);
335
+ var _this = this;
336
+
337
+ var _a, _b;
340
338
 
339
+ var data = this.props.data; // console.log('--SignBoard', data);
341
340
 
342
- var _a = this.state,
343
- storeInfo = _a.storeInfo,
344
- isFollow = _a.isFollow,
345
- inputVal = _a.inputVal;
341
+ var _c = this.state,
342
+ storeInfo = _c.storeInfo,
343
+ isFollow = _c.isFollow,
344
+ inputVal = _c.inputVal;
346
345
  return /*#__PURE__*/_react["default"].createElement("div", {
347
346
  className: "m-sign-board-bar"
348
347
  }, /*#__PURE__*/_react["default"].createElement("div", {
@@ -367,12 +366,18 @@ function (_super) {
367
366
  type: "icon-search2"
368
367
  }))), /*#__PURE__*/_react["default"].createElement("div", {
369
368
  className: "store-info-wrap"
370
- }, /*#__PURE__*/_react["default"].createElement("img", {
371
- className: "store-logo",
372
- src: (storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.storeLogoUrl) || _storeLogo["default"]
369
+ }, data.content && ((_a = data.content.logo) === null || _a === void 0 ? void 0 : _a.open) && /*#__PURE__*/_react["default"].createElement("div", {
370
+ className: "logo"
371
+ }, /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
372
+ data: data.content.logo,
373
+ style: {
374
+ height: 44,
375
+ width: 44
376
+ }
377
+ })), data.content && ((_b = data.content.title) === null || _b === void 0 ? void 0 : _b.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
378
+ className: "card-text",
379
+ data: data.content.title
373
380
  }), /*#__PURE__*/_react["default"].createElement("div", {
374
- className: "store-name"
375
- }, (storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.storeName) || 'Compraqui'), /*#__PURE__*/_react["default"].createElement("div", {
376
381
  onClick: this.clickCollect
377
382
  }, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
378
383
  color: isFollow ? '#F1600F' : '#333333',
@@ -382,12 +387,12 @@ function (_super) {
382
387
  className: "store-info-wrap"
383
388
  }, /*#__PURE__*/_react["default"].createElement("div", {
384
389
  className: "number"
385
- }, /*#__PURE__*/_react["default"].createElement("span", null, (storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.storeEvalValue) ? Number(storeInfo.storeEvalValue / 100).toFixed(1) : '5', " "), /*#__PURE__*/_react["default"].createElement("img", {
390
+ }, /*#__PURE__*/_react["default"].createElement("span", null, (storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.storeEvalValue) ? Number(storeInfo.storeEvalValue / 100).toFixed(1) : '5。0', " "), /*#__PURE__*/_react["default"].createElement("img", {
386
391
  alt: "star",
387
392
  src: _star["default"]
388
393
  })), /*#__PURE__*/_react["default"].createElement("div", {
389
394
  className: "number"
390
- }, /*#__PURE__*/_react["default"].createElement("span", null, (storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.userCollectionNum) || '1000+', " "), " ", (0, _locale.i18n)('FOLLOWERS')), (storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.hasCustomerService) === 'Y' && /*#__PURE__*/_react["default"].createElement("div", {
395
+ }, /*#__PURE__*/_react["default"].createElement("span", null, (storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.userCollectionNum) || 0, " "), " ", (0, _locale.i18n)('FOLLOWERS')), (storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.hasCustomerService) === 'Y' && /*#__PURE__*/_react["default"].createElement("div", {
391
396
  className: "chat-btn",
392
397
  onClick: this.toChat
393
398
  }, (0, _locale.i18n)('CHAT'))));
@@ -62,17 +62,3 @@
62
62
  text-transform: uppercase;
63
63
  color: #333333;
64
64
  }
65
- .m-sign-board-bar .store-info-wrap .store-logo {
66
- width: 0.88rem;
67
- height: 0.88rem;
68
- border-radius: 50%;
69
- }
70
- .m-sign-board-bar .store-info-wrap .store-name {
71
- flex: 1;
72
- margin-left: 0.24rem;
73
- font-weight: 500;
74
- font-size: 0.32rem;
75
- line-height: 0.4rem;
76
- color: #070707;
77
- font-family: 'Montserrat';
78
- }
@@ -212,10 +212,9 @@ function (_super) {
212
212
 
213
213
  _this.getStoreInfo = function () {
214
214
  return __awaiter(_this, void 0, void 0, function () {
215
- var storeId, _a, res, isFollow;
216
-
217
- return __generator(this, function (_b) {
218
- switch (_b.label) {
215
+ var storeId, storeDetailInfo;
216
+ return __generator(this, function (_a) {
217
+ switch (_a.label) {
219
218
  case 0:
220
219
  storeId = window.magicDesign.storeId;
221
220
  if (!storeId) return [3
@@ -223,17 +222,15 @@ function (_super) {
223
222
  , 2];
224
223
  return [4
225
224
  /*yield*/
226
- , Promise.all([(0, _commonUtil.commonFetch)("/designer/v1/h5/store/detail/" + storeId, {}, 'GET'), (0, _commonUtil.commonFetch)('/designer/v1/h5/collection/store/check', {
227
- storeId: storeId
228
- })])];
225
+ , (0, _commonUtil.commonFetch)("/designer/v1/h5/store/detail/" + storeId, {}, 'GET')];
229
226
 
230
227
  case 1:
231
- _a = _b.sent(), res = _a[0], isFollow = _a[1];
228
+ storeDetailInfo = _a.sent();
232
229
  this.setState({
233
- storeInfo: res,
234
- isFollow: isFollow == 'Y'
230
+ storeInfo: storeDetailInfo,
231
+ isFollow: storeDetailInfo.userHasFollowed == 'Y'
235
232
  });
236
- _b.label = 2;
233
+ _a.label = 2;
237
234
 
238
235
  case 2:
239
236
  return [2