@fonixtree/magic-design 2.0.205 → 2.0.207

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 (125) hide show
  1. package/es/assets/images/layout-icon/campaignLayout1.png +0 -0
  2. package/es/assets/images/layout-icon/imageGalleryLayout3.png +0 -0
  3. package/es/assets/images/layout-icon/imageGalleryLayout4.png +0 -0
  4. package/es/common/Collapse/index.js +3 -1
  5. package/es/common/Field/index.js +5 -4
  6. package/es/common/Field/index.less +4 -0
  7. package/es/composite-comp/bol/components/ImageGallery/mobile/index.js +33 -2
  8. package/es/composite-comp/bol/components/ImageGallery/mobile/index.less +15 -0
  9. package/es/composite-comp/bol/components/Video/defaultJSON.js +1 -0
  10. package/es/composite-comp/bol/components/Video/mobile/Layout1/index.js +2 -1
  11. package/es/composite-comp/bol/components/Video/mobile/Layout1/index.less +1 -0
  12. package/es/composite-comp/bol/components/Video/mobile/Layout2/index.js +2 -1
  13. package/es/composite-comp/bol/components/Video/mobile/Layout2/index.less +1 -0
  14. package/es/composite-comp/bol/components/Video/mobile/Layout3/index.js +2 -1
  15. package/es/composite-comp/bol/components/Video/mobile/Layout3/index.less +1 -0
  16. package/es/composite-comp/bol/components/Video/pc/Layout1/index.js +2 -1
  17. package/es/composite-comp/bol/components/Video/pc/Layout1/index.less +1 -0
  18. package/es/composite-comp/bol/components/Video/pc/Layout2/index.js +8 -2
  19. package/es/composite-comp/bol/components/Video/pc/Layout2/index.less +2 -0
  20. package/es/composite-comp/bol/components/Video/pc/Layout3/index.js +4 -1
  21. package/es/composite-comp/bol/components/Video/pc/Layout3/index.less +1 -0
  22. package/es/composite-comp/bol/components/Video/pc/Layout4/index.js +2 -1
  23. package/es/composite-comp/bol/components/Video/pc/Layout4/index.less +1 -0
  24. package/es/composite-comp/bol/components/Video/pc/Layout5/index.js +2 -1
  25. package/es/composite-comp/bol/components/Video/pc/Layout5/index.less +1 -0
  26. package/es/composite-comp/bol/config-panels/ImageGalleryConfig/ImageGalleryConfigImageGroup/index.js +1 -0
  27. package/es/composite-comp/bol/config-panels/ImageGalleryConfig/index.js +1 -1
  28. package/es/composite-comp/bol/config-panels/VideoConfig/index.js +12 -0
  29. package/es/composite-comp/common/components/ProductItem/index.js +1 -1
  30. package/es/composite-comp/dito/components/Campaign/defaultJSON.js +112 -0
  31. package/es/composite-comp/dito/components/Campaign/index.js +88 -0
  32. package/es/composite-comp/dito/components/Campaign/mobile/components/Bargain/index.js +320 -0
  33. package/es/composite-comp/dito/components/Campaign/mobile/components/Bargain/index.less +20 -0
  34. package/es/composite-comp/dito/components/Campaign/mobile/components/CountDown/index.js +180 -0
  35. package/es/composite-comp/dito/components/Campaign/mobile/components/CountDown/index.less +26 -0
  36. package/es/composite-comp/dito/components/Campaign/mobile/components/FlashSale/index.js +434 -0
  37. package/es/composite-comp/dito/components/Campaign/mobile/components/FlashSale/index.less +20 -0
  38. package/es/composite-comp/dito/components/Campaign/mobile/components/GroupBuy/index.js +317 -0
  39. package/es/composite-comp/dito/components/Campaign/mobile/components/GroupBuy/index.less +20 -0
  40. package/es/composite-comp/dito/components/Campaign/mobile/components/ProductItem/index.js +115 -0
  41. package/es/composite-comp/dito/components/Campaign/mobile/components/ProductItem/index.less +14 -0
  42. package/es/composite-comp/dito/components/Campaign/mobile/imgs/defImg.png +0 -0
  43. package/es/composite-comp/dito/components/Campaign/mobile/index.js +125 -0
  44. package/es/composite-comp/dito/components/Campaign/mobile/index.less +57 -0
  45. package/es/composite-comp/dito/components/GroupedCarousel/pc/index.js +8 -2
  46. package/es/composite-comp/dito/components/SearchDITO/pc/components/Header/index.js +2 -2
  47. package/es/composite-comp/dito/components/SlideImage/pc/components/VideoItem/index.js +16 -16
  48. package/es/composite-comp/dito/components/SlideImage/pc/index.js +1 -1
  49. package/es/composite-comp/dito/config-panels/CampaignConfig/ConfigContent/index.js +143 -0
  50. package/es/composite-comp/dito/config-panels/CampaignConfig/ConfigTitle/index.js +93 -0
  51. package/es/composite-comp/dito/config-panels/CampaignConfig/index.js +69 -0
  52. package/es/composite-comp/dito/second-config-panels/CampaignSecondConfig/index.js +109 -0
  53. package/es/constants/component-types.js +9 -3
  54. package/es/constants/index.js +4 -0
  55. package/es/constants/layout.js +32 -2
  56. package/es/core/Designer/ConfigPanel/index.js +6 -2
  57. package/es/core/Designer/PageCompList/index.js +1 -1
  58. package/es/core/Designer/index.js +7 -11
  59. package/es/meta-comp/config-panels/ImageConfig/index.js +0 -2
  60. package/es/meta-comp/config-panels/TextConfig/index.js +17 -7
  61. package/es/meta-comp/config-panels/TextConfig/index.less +7 -0
  62. package/es/utils/commonUtil.js +59 -89
  63. package/lib/assets/images/layout-icon/campaignLayout1.png +0 -0
  64. package/lib/assets/images/layout-icon/imageGalleryLayout3.png +0 -0
  65. package/lib/assets/images/layout-icon/imageGalleryLayout4.png +0 -0
  66. package/lib/common/Collapse/index.js +3 -1
  67. package/lib/common/Field/index.js +5 -4
  68. package/lib/common/Field/index.less +4 -0
  69. package/lib/composite-comp/bol/components/ImageGallery/mobile/index.js +33 -2
  70. package/lib/composite-comp/bol/components/ImageGallery/mobile/index.less +15 -0
  71. package/lib/composite-comp/bol/components/Video/defaultJSON.js +1 -0
  72. package/lib/composite-comp/bol/components/Video/mobile/Layout1/index.js +2 -1
  73. package/lib/composite-comp/bol/components/Video/mobile/Layout1/index.less +1 -0
  74. package/lib/composite-comp/bol/components/Video/mobile/Layout2/index.js +2 -1
  75. package/lib/composite-comp/bol/components/Video/mobile/Layout2/index.less +1 -0
  76. package/lib/composite-comp/bol/components/Video/mobile/Layout3/index.js +2 -1
  77. package/lib/composite-comp/bol/components/Video/mobile/Layout3/index.less +1 -0
  78. package/lib/composite-comp/bol/components/Video/pc/Layout1/index.js +2 -1
  79. package/lib/composite-comp/bol/components/Video/pc/Layout1/index.less +1 -0
  80. package/lib/composite-comp/bol/components/Video/pc/Layout2/index.js +8 -2
  81. package/lib/composite-comp/bol/components/Video/pc/Layout2/index.less +2 -0
  82. package/lib/composite-comp/bol/components/Video/pc/Layout3/index.js +4 -1
  83. package/lib/composite-comp/bol/components/Video/pc/Layout3/index.less +1 -0
  84. package/lib/composite-comp/bol/components/Video/pc/Layout4/index.js +2 -1
  85. package/lib/composite-comp/bol/components/Video/pc/Layout4/index.less +1 -0
  86. package/lib/composite-comp/bol/components/Video/pc/Layout5/index.js +2 -1
  87. package/lib/composite-comp/bol/components/Video/pc/Layout5/index.less +1 -0
  88. package/lib/composite-comp/bol/config-panels/ImageGalleryConfig/ImageGalleryConfigImageGroup/index.js +1 -0
  89. package/lib/composite-comp/bol/config-panels/ImageGalleryConfig/index.js +1 -1
  90. package/lib/composite-comp/bol/config-panels/VideoConfig/index.js +12 -0
  91. package/lib/composite-comp/common/components/ProductItem/index.js +1 -1
  92. package/lib/composite-comp/dito/components/Campaign/defaultJSON.js +112 -0
  93. package/lib/composite-comp/dito/components/Campaign/index.js +88 -0
  94. package/lib/composite-comp/dito/components/Campaign/mobile/components/Bargain/index.js +320 -0
  95. package/lib/composite-comp/dito/components/Campaign/mobile/components/Bargain/index.less +20 -0
  96. package/lib/composite-comp/dito/components/Campaign/mobile/components/CountDown/index.js +180 -0
  97. package/lib/composite-comp/dito/components/Campaign/mobile/components/CountDown/index.less +26 -0
  98. package/lib/composite-comp/dito/components/Campaign/mobile/components/FlashSale/index.js +434 -0
  99. package/lib/composite-comp/dito/components/Campaign/mobile/components/FlashSale/index.less +20 -0
  100. package/lib/composite-comp/dito/components/Campaign/mobile/components/GroupBuy/index.js +317 -0
  101. package/lib/composite-comp/dito/components/Campaign/mobile/components/GroupBuy/index.less +20 -0
  102. package/lib/composite-comp/dito/components/Campaign/mobile/components/ProductItem/index.js +115 -0
  103. package/lib/composite-comp/dito/components/Campaign/mobile/components/ProductItem/index.less +14 -0
  104. package/lib/composite-comp/dito/components/Campaign/mobile/imgs/defImg.png +0 -0
  105. package/lib/composite-comp/dito/components/Campaign/mobile/index.js +125 -0
  106. package/lib/composite-comp/dito/components/Campaign/mobile/index.less +57 -0
  107. package/lib/composite-comp/dito/components/GroupedCarousel/pc/index.js +8 -2
  108. package/lib/composite-comp/dito/components/SearchDITO/pc/components/Header/index.js +2 -2
  109. package/lib/composite-comp/dito/components/SlideImage/pc/components/VideoItem/index.js +16 -16
  110. package/lib/composite-comp/dito/components/SlideImage/pc/index.js +1 -1
  111. package/lib/composite-comp/dito/config-panels/CampaignConfig/ConfigContent/index.js +143 -0
  112. package/lib/composite-comp/dito/config-panels/CampaignConfig/ConfigTitle/index.js +93 -0
  113. package/lib/composite-comp/dito/config-panels/CampaignConfig/index.js +69 -0
  114. package/lib/composite-comp/dito/second-config-panels/CampaignSecondConfig/index.js +109 -0
  115. package/lib/constants/component-types.js +9 -3
  116. package/lib/constants/index.js +4 -0
  117. package/lib/constants/layout.js +32 -2
  118. package/lib/core/Designer/ConfigPanel/index.js +6 -2
  119. package/lib/core/Designer/PageCompList/index.js +1 -1
  120. package/lib/core/Designer/index.js +7 -11
  121. package/lib/meta-comp/config-panels/ImageConfig/index.js +0 -2
  122. package/lib/meta-comp/config-panels/TextConfig/index.js +17 -7
  123. package/lib/meta-comp/config-panels/TextConfig/index.less +7 -0
  124. package/lib/utils/commonUtil.js +59 -89
  125. package/package.json +1 -1
@@ -0,0 +1,317 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+
8
+ var _react = _interopRequireDefault(require("react"));
9
+
10
+ var _ProductItem = _interopRequireDefault(require("../ProductItem"));
11
+
12
+ var _coreUtil = require("../../../../../../../utils/coreUtil");
13
+
14
+ var _components = require("../../../../../../../meta-comp/components");
15
+
16
+ var _commonUtil = require("../../../../../../../utils/commonUtil");
17
+
18
+ var _Iconfont = _interopRequireDefault(require("../../../../../../../common/Iconfont"));
19
+
20
+ var _storeUtil = require("../../../../../../../utils/storeUtil");
21
+
22
+ var _defImg = _interopRequireDefault(require("../../imgs/defImg.png"));
23
+
24
+ require("./index.less");
25
+
26
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
27
+
28
+ var __extends = void 0 && (void 0).__extends || function () {
29
+ var _extendStatics = function extendStatics(d, b) {
30
+ _extendStatics = Object.setPrototypeOf || {
31
+ __proto__: []
32
+ } instanceof Array && function (d, b) {
33
+ d.__proto__ = b;
34
+ } || function (d, b) {
35
+ for (var p in b) {
36
+ if (b.hasOwnProperty(p)) d[p] = b[p];
37
+ }
38
+ };
39
+
40
+ return _extendStatics(d, b);
41
+ };
42
+
43
+ return function (d, b) {
44
+ _extendStatics(d, b);
45
+
46
+ function __() {
47
+ this.constructor = d;
48
+ }
49
+
50
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
51
+ };
52
+ }();
53
+
54
+ var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
55
+ function adopt(value) {
56
+ return value instanceof P ? value : new P(function (resolve) {
57
+ resolve(value);
58
+ });
59
+ }
60
+
61
+ return new (P || (P = Promise))(function (resolve, reject) {
62
+ function fulfilled(value) {
63
+ try {
64
+ step(generator.next(value));
65
+ } catch (e) {
66
+ reject(e);
67
+ }
68
+ }
69
+
70
+ function rejected(value) {
71
+ try {
72
+ step(generator["throw"](value));
73
+ } catch (e) {
74
+ reject(e);
75
+ }
76
+ }
77
+
78
+ function step(result) {
79
+ result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
80
+ }
81
+
82
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
83
+ });
84
+ };
85
+
86
+ var __generator = void 0 && (void 0).__generator || function (thisArg, body) {
87
+ var _ = {
88
+ label: 0,
89
+ sent: function sent() {
90
+ if (t[0] & 1) throw t[1];
91
+ return t[1];
92
+ },
93
+ trys: [],
94
+ ops: []
95
+ },
96
+ f,
97
+ y,
98
+ t,
99
+ g;
100
+ return g = {
101
+ next: verb(0),
102
+ "throw": verb(1),
103
+ "return": verb(2)
104
+ }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
105
+ return this;
106
+ }), g;
107
+
108
+ function verb(n) {
109
+ return function (v) {
110
+ return step([n, v]);
111
+ };
112
+ }
113
+
114
+ function step(op) {
115
+ if (f) throw new TypeError("Generator is already executing.");
116
+
117
+ while (_) {
118
+ try {
119
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
120
+ if (y = 0, t) op = [op[0] & 2, t.value];
121
+
122
+ switch (op[0]) {
123
+ case 0:
124
+ case 1:
125
+ t = op;
126
+ break;
127
+
128
+ case 4:
129
+ _.label++;
130
+ return {
131
+ value: op[1],
132
+ done: false
133
+ };
134
+
135
+ case 5:
136
+ _.label++;
137
+ y = op[1];
138
+ op = [0];
139
+ continue;
140
+
141
+ case 7:
142
+ op = _.ops.pop();
143
+
144
+ _.trys.pop();
145
+
146
+ continue;
147
+
148
+ default:
149
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
150
+ _ = 0;
151
+ continue;
152
+ }
153
+
154
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
155
+ _.label = op[1];
156
+ break;
157
+ }
158
+
159
+ if (op[0] === 6 && _.label < t[1]) {
160
+ _.label = t[1];
161
+ t = op;
162
+ break;
163
+ }
164
+
165
+ if (t && _.label < t[2]) {
166
+ _.label = t[2];
167
+
168
+ _.ops.push(op);
169
+
170
+ break;
171
+ }
172
+
173
+ if (t[2]) _.ops.pop();
174
+
175
+ _.trys.pop();
176
+
177
+ continue;
178
+ }
179
+
180
+ op = body.call(thisArg, _);
181
+ } catch (e) {
182
+ op = [6, e];
183
+ y = 0;
184
+ } finally {
185
+ f = t = 0;
186
+ }
187
+ }
188
+
189
+ if (op[0] & 5) throw op[1];
190
+ return {
191
+ value: op[0] ? op[1] : void 0,
192
+ done: true
193
+ };
194
+ }
195
+ };
196
+
197
+ var defaultData = [{
198
+ imgUrlContent: {
199
+ url: _defImg["default"]
200
+ },
201
+ offerName: 'Product Name',
202
+ salesPrice: 18000000,
203
+ specialPrice: 18000000,
204
+ marketPrice: 19000000,
205
+ discountPercent: 10,
206
+ salePercent: 500,
207
+ sppType: '2'
208
+ }, {
209
+ imgUrlContent: {
210
+ url: _defImg["default"]
211
+ },
212
+ offerName: 'Product Name',
213
+ salesPrice: 18000000,
214
+ specialPrice: 18000000,
215
+ marketPrice: 19000000,
216
+ discountPercent: 10,
217
+ salePercent: 500,
218
+ sppType: '2'
219
+ }];
220
+
221
+ var GroupBuy =
222
+ /** @class */
223
+ function (_super) {
224
+ __extends(GroupBuy, _super);
225
+
226
+ function GroupBuy() {
227
+ var _this = _super !== null && _super.apply(this, arguments) || this;
228
+
229
+ _this.state = {
230
+ list: (0, _coreUtil.isDesignMode)() ? [] : (0, _commonUtil.ensure)(function () {
231
+ return (0, _storeUtil.getMagicStore)("groupBuy_" + (window.magicDesign.pageId || '') + "_" + _this.props.panelProps.id);
232
+ }, [])
233
+ };
234
+
235
+ _this.getList = function () {
236
+ return __awaiter(_this, void 0, void 0, function () {
237
+ var res, list;
238
+
239
+ var _a;
240
+
241
+ return __generator(this, function (_b) {
242
+ switch (_b.label) {
243
+ case 0:
244
+ return [4
245
+ /*yield*/
246
+ , (0, _commonUtil.commonFetch)('/designer/v1/h5/sharebuy/offer/page', {
247
+ sortType: this.sortType
248
+ }, 'GET')];
249
+
250
+ case 1:
251
+ res = _b.sent();
252
+ list = (((_a = res === null || res === void 0 ? void 0 : res.pageInfo) === null || _a === void 0 ? void 0 : _a.list) || []).slice(0, 2);
253
+
254
+ if (!(0, _coreUtil.isDesignMode)()) {
255
+ if (list.length === 0) this.props.onEmpty();
256
+ (0, _storeUtil.setMagicStore)("groupBuy_" + (window.magicDesign.pageId || '') + "_" + this.props.panelProps.id, list);
257
+ }
258
+
259
+ this.setState({
260
+ list: list
261
+ });
262
+ return [2
263
+ /*return*/
264
+ ];
265
+ }
266
+ });
267
+ });
268
+ };
269
+
270
+ return _this;
271
+ }
272
+
273
+ GroupBuy.prototype.componentDidMount = function () {
274
+ this.getList();
275
+ };
276
+
277
+ GroupBuy.prototype.render = function () {
278
+ var panelProps = this.props.panelProps;
279
+ var list = this.state.list;
280
+
281
+ var _list = list.length === 0 && (0, _coreUtil.isDesignMode)() ? defaultData : list;
282
+
283
+ return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, _list.length > 0 && /*#__PURE__*/_react["default"].createElement("div", {
284
+ className: "m-campaign-group-buy-mobile"
285
+ }, /*#__PURE__*/_react["default"].createElement("div", {
286
+ className: "group-buy-title"
287
+ }, panelProps.groupName.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
288
+ className: "text",
289
+ data: panelProps.groupName
290
+ }), /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
291
+ color: "#0038A8",
292
+ onClick: function onClick() {
293
+ return (0, _coreUtil.clickUrl)('/product/GroupBuy');
294
+ },
295
+ size: 16,
296
+ type: "icon-outlined-right"
297
+ })), /*#__PURE__*/_react["default"].createElement("div", {
298
+ className: "group-buy-list"
299
+ }, _list.map(function (item) {
300
+ return /*#__PURE__*/_react["default"].createElement(_ProductItem["default"], {
301
+ key: item.id,
302
+ data: item,
303
+ onItemClick: function onItemClick() {
304
+ (0, _coreUtil.clickUrl)("proDetail - " + item.offerId + " -" + (item.sppProductId || '') + " ");
305
+ }
306
+ });
307
+ }))));
308
+ };
309
+
310
+ GroupBuy.defaultProps = {
311
+ panelProps: {}
312
+ };
313
+ return GroupBuy;
314
+ }(_react["default"].Component);
315
+
316
+ var _default = GroupBuy;
317
+ exports["default"] = _default;
@@ -0,0 +1,20 @@
1
+ .m-campaign-group-buy-mobile {
2
+ padding: 0.12rem 0.2rem 0.24rem 0.2rem;
3
+ height: 100%;
4
+ }
5
+ .m-campaign-group-buy-mobile .group-buy-title {
6
+ display: flex;
7
+ align-items: center;
8
+ justify-content: space-between;
9
+ }
10
+ .m-campaign-group-buy-mobile .group-buy-title .text {
11
+ width: fit-content !important;
12
+ }
13
+ .m-campaign-group-buy-mobile .group-buy-list {
14
+ margin-top: 0.12rem;
15
+ height: calc(100% - 0.52rem);
16
+ display: flex;
17
+ align-items: center;
18
+ justify-content: center;
19
+ gap: 0.24rem;
20
+ }
@@ -0,0 +1,115 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+
8
+ var _react = _interopRequireDefault(require("react"));
9
+
10
+ var _commonUtil = require("../../../../../../../utils/commonUtil");
11
+
12
+ var _common = require("../../../../../../../common");
13
+
14
+ var _ImageLabel = _interopRequireDefault(require("../../../../../../common/components/ImageLabel"));
15
+
16
+ require("./index.less");
17
+
18
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
19
+
20
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
21
+
22
+ var __extends = void 0 && (void 0).__extends || function () {
23
+ var _extendStatics = function extendStatics(d, b) {
24
+ _extendStatics = Object.setPrototypeOf || {
25
+ __proto__: []
26
+ } instanceof Array && function (d, b) {
27
+ d.__proto__ = b;
28
+ } || function (d, b) {
29
+ for (var p in b) {
30
+ if (b.hasOwnProperty(p)) d[p] = b[p];
31
+ }
32
+ };
33
+
34
+ return _extendStatics(d, b);
35
+ };
36
+
37
+ return function (d, b) {
38
+ _extendStatics(d, b);
39
+
40
+ function __() {
41
+ this.constructor = d;
42
+ }
43
+
44
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
45
+ };
46
+ }();
47
+
48
+ var __rest = void 0 && (void 0).__rest || function (s, e) {
49
+ var t = {};
50
+
51
+ for (var p in s) {
52
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
53
+ }
54
+
55
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
56
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
57
+ }
58
+ return t;
59
+ };
60
+
61
+ var ProductItem =
62
+ /** @class */
63
+ function (_super) {
64
+ __extends(ProductItem, _super);
65
+
66
+ function ProductItem() {
67
+ var _this = _super !== null && _super.apply(this, arguments) || this;
68
+
69
+ _this.state = {};
70
+ return _this;
71
+ }
72
+
73
+ ProductItem.prototype.render = function () {
74
+ var _a;
75
+
76
+ var _b = this.props,
77
+ data = _b.data,
78
+ onItemClick = _b.onItemClick,
79
+ rest = __rest(_b, ["data", "onItemClick"]); // data.labels = [
80
+ // {
81
+ // position: '2',
82
+ // imgUrl: '/get/resource/platform/20250425/picture/Frame42731928621915591174458650624.png',
83
+ // },
84
+ // ];
85
+
86
+
87
+ var imgLabels = ((_a = data.labels) === null || _a === void 0 ? void 0 : _a.filter(function (f) {
88
+ return f.position !== '6' && f.position !== '7';
89
+ })) || [];
90
+ return /*#__PURE__*/_react["default"].createElement("div", _extends({
91
+ className: "m-campaign-product-item",
92
+ onClick: function onClick() {
93
+ return onItemClick();
94
+ }
95
+ }, rest), /*#__PURE__*/_react["default"].createElement("div", {
96
+ className: "img-wrap"
97
+ }, /*#__PURE__*/_react["default"].createElement(_common.NewImg, {
98
+ className: "product-img",
99
+ lazy: true,
100
+ src: (0, _commonUtil.convertImageUrl)(data.productImg || data.imgUrlContent || data.productImageUrlContent)
101
+ }), /*#__PURE__*/_react["default"].createElement(_ImageLabel["default"], {
102
+ labels: imgLabels,
103
+ small: true
104
+ })));
105
+ };
106
+
107
+ ProductItem.defaultProps = {
108
+ data: {},
109
+ onItemClick: function onItemClick() {}
110
+ };
111
+ return ProductItem;
112
+ }(_react["default"].Component);
113
+
114
+ var _default = ProductItem;
115
+ exports["default"] = _default;
@@ -0,0 +1,14 @@
1
+ .m-campaign-product-item .img-wrap {
2
+ position: relative;
3
+ border-radius: 0.16rem;
4
+ overflow: hidden;
5
+ }
6
+ .m-campaign-product-item .img-wrap .product-img {
7
+ width: 1.1rem;
8
+ height: 1.1rem;
9
+ border-radius: 0.16rem;
10
+ border: 0.02rem solid #EAEAEA;
11
+ }
12
+ .m-campaign-product-item .img-wrap .image-label-wrap.img {
13
+ height: 0.2rem;
14
+ }
@@ -0,0 +1,125 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+
8
+ var _react = _interopRequireDefault(require("react"));
9
+
10
+ var _antd = require("antd");
11
+
12
+ var _FlashSale = _interopRequireDefault(require("./components/FlashSale"));
13
+
14
+ var _GroupBuy = _interopRequireDefault(require("./components/GroupBuy"));
15
+
16
+ var _Bargain = _interopRequireDefault(require("./components/Bargain"));
17
+
18
+ require("./index.less");
19
+
20
+ var _components = require("../../../../../meta-comp/components");
21
+
22
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
23
+
24
+ var __extends = void 0 && (void 0).__extends || function () {
25
+ var _extendStatics = function extendStatics(d, b) {
26
+ _extendStatics = Object.setPrototypeOf || {
27
+ __proto__: []
28
+ } instanceof Array && function (d, b) {
29
+ d.__proto__ = b;
30
+ } || function (d, b) {
31
+ for (var p in b) {
32
+ if (b.hasOwnProperty(p)) d[p] = b[p];
33
+ }
34
+ };
35
+
36
+ return _extendStatics(d, b);
37
+ };
38
+
39
+ return function (d, b) {
40
+ _extendStatics(d, b);
41
+
42
+ function __() {
43
+ this.constructor = d;
44
+ }
45
+
46
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
47
+ };
48
+ }();
49
+
50
+ var CampaignMobile =
51
+ /** @class */
52
+ function (_super) {
53
+ __extends(CampaignMobile, _super);
54
+
55
+ function CampaignMobile() {
56
+ var _this = _super !== null && _super.apply(this, arguments) || this;
57
+
58
+ _this.state = {
59
+ flashSaleHide: false,
60
+ groupBuyHide: false,
61
+ bargainHide: false
62
+ };
63
+ return _this;
64
+ }
65
+
66
+ CampaignMobile.prototype.render = function () {
67
+ var _this = this;
68
+
69
+ var panelProps = this.props.panelProps;
70
+ var _a = this.state,
71
+ flashSaleHide = _a.flashSaleHide,
72
+ groupBuyHide = _a.groupBuyHide,
73
+ bargainHide = _a.bargainHide;
74
+ var flashSale = panelProps.groupSource[0];
75
+ var groupBuy = panelProps.groupSource[1];
76
+ var bargain = panelProps.groupSource[2];
77
+ var carouselHide = !flashSale.open && !groupBuy.open && !bargain.open;
78
+ return /*#__PURE__*/_react["default"].createElement("div", {
79
+ className: "m-campaign-mobile"
80
+ }, /*#__PURE__*/_react["default"].createElement("div", {
81
+ className: "campaign-title"
82
+ }, panelProps.title.headline.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
83
+ data: panelProps.title.headline
84
+ })), /*#__PURE__*/_react["default"].createElement("div", {
85
+ className: "campaign-content"
86
+ }, !carouselHide && /*#__PURE__*/_react["default"].createElement("div", {
87
+ className: "campaign-left"
88
+ }, /*#__PURE__*/_react["default"].createElement(_antd.Carousel, {
89
+ autoplay: false,
90
+ autoplaySpeed: 2000
91
+ }, flashSale.open && !flashSaleHide && /*#__PURE__*/_react["default"].createElement(_FlashSale["default"], {
92
+ onEmpty: function onEmpty() {
93
+ return _this.setState({
94
+ flashSaleHide: true
95
+ });
96
+ },
97
+ panelProps: flashSale
98
+ }), groupBuy.open && !groupBuyHide && /*#__PURE__*/_react["default"].createElement(_GroupBuy["default"], {
99
+ onEmpty: function onEmpty() {
100
+ return _this.setState({
101
+ groupBuyHide: true
102
+ });
103
+ },
104
+ panelProps: groupBuy
105
+ }), bargain.open && !bargainHide && /*#__PURE__*/_react["default"].createElement(_Bargain["default"], {
106
+ onEmpty: function onEmpty() {
107
+ return _this.setState({
108
+ bargainHide: true
109
+ });
110
+ },
111
+ panelProps: bargain
112
+ }))), panelProps.content.image.open && /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
113
+ className: "campaign-right",
114
+ data: panelProps.content.image
115
+ })));
116
+ };
117
+
118
+ CampaignMobile.defaultProps = {
119
+ panelProps: {}
120
+ };
121
+ return CampaignMobile;
122
+ }(_react["default"].Component);
123
+
124
+ var _default = CampaignMobile;
125
+ exports["default"] = _default;
@@ -0,0 +1,57 @@
1
+ .m-campaign-mobile .campaign-title {
2
+ margin-bottom: 0.1rem;
3
+ }
4
+ .m-campaign-mobile .campaign-content {
5
+ display: flex;
6
+ justify-content: center;
7
+ gap: 0.3rem;
8
+ }
9
+ .m-campaign-mobile .campaign-content .campaign-left {
10
+ width: 50%;
11
+ background-color: #F0F0F0;
12
+ border-radius: 0.24rem;
13
+ overflow: hidden;
14
+ }
15
+ .m-campaign-mobile .campaign-content .campaign-left .cylon-carousel,
16
+ .m-campaign-mobile .campaign-content .campaign-left .slick-slider,
17
+ .m-campaign-mobile .campaign-content .campaign-left .slick-list,
18
+ .m-campaign-mobile .campaign-content .campaign-left .slick-track,
19
+ .m-campaign-mobile .campaign-content .campaign-left .slick-track > div,
20
+ .m-campaign-mobile .campaign-content .campaign-left .slick-track > div > div {
21
+ height: 100%;
22
+ }
23
+ .m-campaign-mobile .campaign-content .campaign-left .slick-dots {
24
+ height: 0.06rem;
25
+ display: flex !important;
26
+ justify-content: center;
27
+ position: absolute;
28
+ right: 0;
29
+ bottom: 0.12rem;
30
+ left: 0;
31
+ z-index: 15;
32
+ margin-left: 0;
33
+ margin-right: 0;
34
+ }
35
+ .m-campaign-mobile .campaign-content .campaign-left .slick-dots li {
36
+ width: 0.32rem;
37
+ height: 0.06rem;
38
+ margin: 0 0.08rem;
39
+ border-radius: 0.02rem;
40
+ padding: 0;
41
+ transition: all 0.5s;
42
+ background-color: #fff;
43
+ }
44
+ .m-campaign-mobile .campaign-content .campaign-left .slick-dots li.slick-active {
45
+ width: 0.48rem;
46
+ background-color: #fff;
47
+ }
48
+ .m-campaign-mobile .campaign-content .campaign-left .slick-dots li button,
49
+ .m-campaign-mobile .campaign-content .campaign-left .slick-dots li button::after,
50
+ .m-campaign-mobile .campaign-content .campaign-left .slick-dots li button::after {
51
+ display: none;
52
+ }
53
+ .m-campaign-mobile .campaign-content .campaign-right {
54
+ width: 50%;
55
+ border-radius: 0.24rem;
56
+ overflow: hidden;
57
+ }
@@ -127,10 +127,16 @@ function (_super) {
127
127
  }
128
128
  }, tab.groupName.open && (tabIndex === index ? /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
129
129
  data: tab.hover.groupName,
130
- iconHeight: 46
130
+ iconHeight: 46,
131
+ onTextInput: function onTextInput(text) {
132
+ tab.groupName.text = text;
133
+ }
131
134
  }) : /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
132
135
  data: tab.groupName,
133
- iconHeight: 46
136
+ iconHeight: 46,
137
+ onTextInput: function onTextInput(text) {
138
+ tab.hover.groupName.text = text;
139
+ }
134
140
  })));
135
141
  })), /*#__PURE__*/_react["default"].createElement("div", {
136
142
  className: "tab-content"
@@ -486,7 +486,7 @@ function (_super) {
486
486
  return /*#__PURE__*/_react["default"].createElement("li", {
487
487
  key: m.model.catgId,
488
488
  onClick: function onClick() {
489
- return (0, _commonUtil.jumpUrlConfig)(m.model.catgRela);
489
+ if (window.magicDesign.h5JumpUrlConfig) window.magicDesign.h5JumpUrlConfig(m.model.catgRela);
490
490
  },
491
491
  onMouseEnter: function onMouseEnter(e) {
492
492
  return _this.onMouseEnter(e.target, m);
@@ -506,7 +506,7 @@ function (_super) {
506
506
  return /*#__PURE__*/_react["default"].createElement("li", {
507
507
  key: m.model.catgId,
508
508
  onClick: function onClick() {
509
- return (0, _commonUtil.jumpUrlConfig)(m.model.catgRela);
509
+ if (window.magicDesign.h5JumpUrlConfig) window.magicDesign.h5JumpUrlConfig(m.model.catgRela);
510
510
  }
511
511
  }, /*#__PURE__*/_react["default"].createElement("div", null, m.model.catgName), /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
512
512
  className: "icon_right",