@fonixtree/magic-design 0.0.45 → 0.0.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/composite-comp/common/components/ImageLabel/index.js +2 -2
- package/es/composite-comp/common/components/ImageLabel/index.less +3 -3
- package/es/composite-comp/common/components/ProductItem/index.less +7 -6
- package/es/composite-comp/dito/components/FlashDeal/mobile/index.js +19 -3
- package/es/composite-comp/dito/components/Recommend/defaultJSON.js +2 -8
- package/es/composite-comp/dito/components/Recommend/mobile/index.js +30 -24
- package/es/core/Designer/PageCompList/index.less +10 -10
- package/es/meta-comp/components/Image/index.js +3 -6
- package/lib/composite-comp/common/components/ImageLabel/index.js +2 -2
- package/lib/composite-comp/common/components/ImageLabel/index.less +3 -3
- package/lib/composite-comp/common/components/ProductItem/index.less +7 -6
- package/lib/composite-comp/dito/components/FlashDeal/mobile/index.js +19 -3
- package/lib/composite-comp/dito/components/Recommend/defaultJSON.js +2 -8
- package/lib/composite-comp/dito/components/Recommend/mobile/index.js +30 -24
- package/lib/core/Designer/PageCompList/index.less +10 -10
- package/lib/meta-comp/components/Image/index.js +3 -6
- package/package.json +1 -1
|
@@ -71,14 +71,14 @@ function (_super) {
|
|
|
71
71
|
return /*#__PURE__*/_react["default"].createElement("img", {
|
|
72
72
|
key: label.imgUrl || label.labelPictureUrl,
|
|
73
73
|
alt: "img",
|
|
74
|
-
className: (0, _classnames["default"])('image-label-wrap', 'img', (_a = {}, _a["position-" + label.position] = true, _a.small = small, _a)),
|
|
74
|
+
className: (0, _classnames["default"])('image-label-wrap', 'img', (_a = {}, _a["position-" + (label.position || 'default')] = true, _a.small = small, _a)),
|
|
75
75
|
src: label.imgUrl || label.labelPictureUrl
|
|
76
76
|
});
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
80
80
|
key: label.labelName,
|
|
81
|
-
className: (0, _classnames["default"])('image-label-wrap', (_b = {}, _b["position-" + label.position] = true, _b))
|
|
81
|
+
className: (0, _classnames["default"])('image-label-wrap', (_b = {}, _b["position-" + (label.position || 'default')] = true, _b))
|
|
82
82
|
}, label.labelName);
|
|
83
83
|
});
|
|
84
84
|
};
|
|
@@ -4,11 +4,14 @@
|
|
|
4
4
|
background: #FFFFFF;
|
|
5
5
|
border: 1px solid #D2D9E5;
|
|
6
6
|
width: 142px;
|
|
7
|
+
border-radius: 8px;
|
|
7
8
|
|
|
8
9
|
.img-wrap {
|
|
9
10
|
position: relative;
|
|
11
|
+
border-radius: 8px;
|
|
10
12
|
|
|
11
13
|
.product-img {
|
|
14
|
+
border-radius: 8px;
|
|
12
15
|
width: 140px;
|
|
13
16
|
height: 140px;
|
|
14
17
|
object-fit: cover;
|
|
@@ -33,7 +36,7 @@
|
|
|
33
36
|
}
|
|
34
37
|
|
|
35
38
|
.product-name {
|
|
36
|
-
margin-bottom:
|
|
39
|
+
margin-bottom: 5px;
|
|
37
40
|
// font-family: 'Montserrat';
|
|
38
41
|
// font-style: normal;
|
|
39
42
|
// font-weight: 500;
|
|
@@ -57,7 +60,7 @@
|
|
|
57
60
|
|
|
58
61
|
.old-price-wrap {
|
|
59
62
|
display: flex;
|
|
60
|
-
margin-top:
|
|
63
|
+
margin-top: 3px;
|
|
61
64
|
align-items: baseline;
|
|
62
65
|
white-space: nowrap;
|
|
63
66
|
overflow: hidden;
|
|
@@ -68,11 +71,9 @@
|
|
|
68
71
|
font-family: 'Montserrat';
|
|
69
72
|
font-style: normal;
|
|
70
73
|
font-weight: 700;
|
|
71
|
-
font-size:
|
|
74
|
+
font-size: 12px;
|
|
72
75
|
line-height: 15px;
|
|
73
|
-
color: #
|
|
74
|
-
padding: 0 4px;
|
|
75
|
-
background-color: #CE1126;
|
|
76
|
+
color: #2F3043;
|
|
76
77
|
}
|
|
77
78
|
|
|
78
79
|
.old-price {
|
|
@@ -287,9 +287,21 @@ function (_super) {
|
|
|
287
287
|
|
|
288
288
|
case 1:
|
|
289
289
|
res = _a.sent();
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
290
|
+
|
|
291
|
+
if (!res.list || res.list.length === 0) {
|
|
292
|
+
// 秒杀场次结束之后,清空列表数据,隐藏秒杀组件
|
|
293
|
+
this.setState({
|
|
294
|
+
list: []
|
|
295
|
+
});
|
|
296
|
+
|
|
297
|
+
if (!(0, _coreUtil.isDesignMode)()) {
|
|
298
|
+
(0, _storeUtil.setMagicStore)("flashSale_" + this.props.panelProps.id, []);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
return [2
|
|
302
|
+
/*return*/
|
|
303
|
+
];
|
|
304
|
+
}
|
|
293
305
|
|
|
294
306
|
if (!(0, _coreUtil.isDesignMode)()) {
|
|
295
307
|
(0, _storeUtil.setMagicStore)("flashSale_" + this.props.panelProps.id, res.list);
|
|
@@ -332,6 +344,10 @@ function (_super) {
|
|
|
332
344
|
this.setState({
|
|
333
345
|
list: []
|
|
334
346
|
});
|
|
347
|
+
|
|
348
|
+
if (!(0, _coreUtil.isDesignMode)()) {
|
|
349
|
+
(0, _storeUtil.setMagicStore)("flashSale_" + this.props.panelProps.id, []);
|
|
350
|
+
}
|
|
335
351
|
}
|
|
336
352
|
|
|
337
353
|
return [2
|
|
@@ -279,14 +279,8 @@ var getDefaultJSON = function getDefaultJSON() {
|
|
|
279
279
|
}
|
|
280
280
|
},
|
|
281
281
|
customize: {
|
|
282
|
-
layout:
|
|
283
|
-
|
|
284
|
-
h5Layout: 'layout1'
|
|
285
|
-
},
|
|
286
|
-
align: 'left',
|
|
287
|
-
pcRowNum: 6,
|
|
288
|
-
pcMaxRowNum: 6,
|
|
289
|
-
pcMinRowNum: 5
|
|
282
|
+
layout: 'left',
|
|
283
|
+
align: 'left'
|
|
290
284
|
},
|
|
291
285
|
background: {
|
|
292
286
|
opacity: 100,
|
|
@@ -227,6 +227,10 @@ var __spreadArrays = void 0 && (void 0).__spreadArrays || function () {
|
|
|
227
227
|
};
|
|
228
228
|
|
|
229
229
|
var LAYOUT_IMAGE_SIZE = {
|
|
230
|
+
left: {
|
|
231
|
+
w: '100%',
|
|
232
|
+
h: 165
|
|
233
|
+
},
|
|
230
234
|
layout1: {
|
|
231
235
|
w: '100%',
|
|
232
236
|
h: 164
|
|
@@ -412,8 +416,10 @@ function (_super) {
|
|
|
412
416
|
};
|
|
413
417
|
|
|
414
418
|
_this.resetLayout = function () {
|
|
415
|
-
var layout = _this.props.panelProps.customize.layout.h5Layout;
|
|
419
|
+
var layout = _this.props.panelProps.customize.layout.h5Layout || _this.props.panelProps.customize.layout; // 后面删除
|
|
420
|
+
|
|
416
421
|
var LAYOUT_COLUMN = {
|
|
422
|
+
left: 2,
|
|
417
423
|
layout1: 2,
|
|
418
424
|
layout2: 1,
|
|
419
425
|
layout3: 3
|
|
@@ -537,7 +543,7 @@ function (_super) {
|
|
|
537
543
|
hideTabs: hideTabs
|
|
538
544
|
});
|
|
539
545
|
});
|
|
540
|
-
var curLayout = panelProps.customize.layout.h5Layout;
|
|
546
|
+
var curLayout = panelProps.customize.layout.h5Layout || panelProps.customize.layout; // 后面删除
|
|
541
547
|
|
|
542
548
|
if (curLayout !== this.preLayout) {
|
|
543
549
|
this.resetLayout();
|
|
@@ -559,7 +565,7 @@ function (_super) {
|
|
|
559
565
|
var bgStyle = this.getBackgroundStyle();
|
|
560
566
|
var products = this.state["products" + tabIndex] || [];
|
|
561
567
|
var isDivide = groupSource.length <= 3;
|
|
562
|
-
var layout = panelProps.customize.layout.h5Layout;
|
|
568
|
+
var layout = panelProps.customize.layout.h5Layout || panelProps.customize.layout; // 后面删除
|
|
563
569
|
|
|
564
570
|
var _seeAll = (0, _commonUtil.ensure)(function () {
|
|
565
571
|
return groupSource[tabIndex].seeAll;
|
|
@@ -611,27 +617,7 @@ function (_super) {
|
|
|
611
617
|
transform: "translateX(" + tabLeft + "px)",
|
|
612
618
|
background: this.getTabBarActiveColor(panelProps)
|
|
613
619
|
}
|
|
614
|
-
})), ['
|
|
615
|
-
key: "macyContainer",
|
|
616
|
-
className: "macyContainer"
|
|
617
|
-
}, products.map(function (item) {
|
|
618
|
-
return /*#__PURE__*/_react["default"].createElement(_ProductItem["default"], {
|
|
619
|
-
key: item.productId,
|
|
620
|
-
data: item,
|
|
621
|
-
fixHeight: layout === 'layout3',
|
|
622
|
-
imgHeight: imgHeight,
|
|
623
|
-
imgWidth: imgWidth,
|
|
624
|
-
layout: layout === 'layout2' ? 'horizontal' : 'vertical',
|
|
625
|
-
onItemClick: function onItemClick() {
|
|
626
|
-
return (0, _coreUtil.clickUrl)("/product/detail/" + item.offerId + "?productId=" + (item.sppProductId || item.productId || ''));
|
|
627
|
-
},
|
|
628
|
-
panelProps: panelProps.content,
|
|
629
|
-
showProgress: false
|
|
630
|
-
});
|
|
631
|
-
})), _seeAll.open && products.length > 0 && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
|
|
632
|
-
className: "btnSeeAll",
|
|
633
|
-
data: _seeAll
|
|
634
|
-
})) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
620
|
+
})), ['layout4', 'layout5'].includes(layout) ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
635
621
|
key: "scrollContainer",
|
|
636
622
|
className: (0, _classnames["default"])('scrollContainer', {
|
|
637
623
|
pl_100: layout === 'layout5'
|
|
@@ -654,6 +640,26 @@ function (_super) {
|
|
|
654
640
|
}), _seeAll.open && products.length > 0 && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
|
|
655
641
|
className: "btnSeeAll",
|
|
656
642
|
data: _seeAll
|
|
643
|
+
})) : /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
644
|
+
key: "macyContainer",
|
|
645
|
+
className: "macyContainer"
|
|
646
|
+
}, products.map(function (item) {
|
|
647
|
+
return /*#__PURE__*/_react["default"].createElement(_ProductItem["default"], {
|
|
648
|
+
key: item.productId,
|
|
649
|
+
data: item,
|
|
650
|
+
fixHeight: layout === 'layout3',
|
|
651
|
+
imgHeight: imgHeight,
|
|
652
|
+
imgWidth: imgWidth,
|
|
653
|
+
layout: layout === 'layout2' ? 'horizontal' : 'vertical',
|
|
654
|
+
onItemClick: function onItemClick() {
|
|
655
|
+
return (0, _coreUtil.clickUrl)("/product/detail/" + item.offerId + "?productId=" + (item.sppProductId || item.productId || ''));
|
|
656
|
+
},
|
|
657
|
+
panelProps: panelProps.content,
|
|
658
|
+
showProgress: false
|
|
659
|
+
});
|
|
660
|
+
})), _seeAll.open && products.length > 0 && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
|
|
661
|
+
className: "btnSeeAll",
|
|
662
|
+
data: _seeAll
|
|
657
663
|
})));
|
|
658
664
|
};
|
|
659
665
|
|
|
@@ -121,19 +121,19 @@
|
|
|
121
121
|
display: block;
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
|
+
}
|
|
124
125
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
126
|
+
.active {
|
|
127
|
+
background: #E9F0FF;
|
|
128
|
+
color: #2F54EB;
|
|
128
129
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
}
|
|
130
|
+
.left {
|
|
131
|
+
.card-title {
|
|
132
|
+
font-weight: 600;
|
|
133
133
|
}
|
|
134
|
+
}
|
|
134
135
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
}
|
|
136
|
+
.more-btn {
|
|
137
|
+
display: block;
|
|
138
138
|
}
|
|
139
139
|
}
|
|
@@ -11,8 +11,6 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
11
11
|
|
|
12
12
|
require("./index.less");
|
|
13
13
|
|
|
14
|
-
var _defaultImg = _interopRequireDefault(require("./image/default-img.png"));
|
|
15
|
-
|
|
16
14
|
var _coreUtil = require("../../../utils/coreUtil");
|
|
17
15
|
|
|
18
16
|
var _decorator = require("../../../decorator");
|
|
@@ -163,11 +161,10 @@ function (_super) {
|
|
|
163
161
|
|
|
164
162
|
if (window.magicDesign.isShop && (srcImg === null || srcImg === void 0 ? void 0 : srcImg.includes('ecommerce/static'))) {
|
|
165
163
|
srcImg = srcImg.replace('ecommerce/static', 'static');
|
|
166
|
-
}
|
|
164
|
+
} // if (!srcImg) {
|
|
165
|
+
// srcImg = defaultImg;
|
|
166
|
+
// }
|
|
167
167
|
|
|
168
|
-
if (!srcImg) {
|
|
169
|
-
srcImg = _defaultImg["default"];
|
|
170
|
-
}
|
|
171
168
|
|
|
172
169
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
173
170
|
className: (0, _classnames["default"])('m-meta-image', {
|
|
@@ -71,14 +71,14 @@ function (_super) {
|
|
|
71
71
|
return /*#__PURE__*/_react["default"].createElement("img", {
|
|
72
72
|
key: label.imgUrl || label.labelPictureUrl,
|
|
73
73
|
alt: "img",
|
|
74
|
-
className: (0, _classnames["default"])('image-label-wrap', 'img', (_a = {}, _a["position-" + label.position] = true, _a.small = small, _a)),
|
|
74
|
+
className: (0, _classnames["default"])('image-label-wrap', 'img', (_a = {}, _a["position-" + (label.position || 'default')] = true, _a.small = small, _a)),
|
|
75
75
|
src: label.imgUrl || label.labelPictureUrl
|
|
76
76
|
});
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
80
80
|
key: label.labelName,
|
|
81
|
-
className: (0, _classnames["default"])('image-label-wrap', (_b = {}, _b["position-" + label.position] = true, _b))
|
|
81
|
+
className: (0, _classnames["default"])('image-label-wrap', (_b = {}, _b["position-" + (label.position || 'default')] = true, _b))
|
|
82
82
|
}, label.labelName);
|
|
83
83
|
});
|
|
84
84
|
};
|
|
@@ -4,11 +4,14 @@
|
|
|
4
4
|
background: #FFFFFF;
|
|
5
5
|
border: 1px solid #D2D9E5;
|
|
6
6
|
width: 142px;
|
|
7
|
+
border-radius: 8px;
|
|
7
8
|
|
|
8
9
|
.img-wrap {
|
|
9
10
|
position: relative;
|
|
11
|
+
border-radius: 8px;
|
|
10
12
|
|
|
11
13
|
.product-img {
|
|
14
|
+
border-radius: 8px;
|
|
12
15
|
width: 140px;
|
|
13
16
|
height: 140px;
|
|
14
17
|
object-fit: cover;
|
|
@@ -33,7 +36,7 @@
|
|
|
33
36
|
}
|
|
34
37
|
|
|
35
38
|
.product-name {
|
|
36
|
-
margin-bottom:
|
|
39
|
+
margin-bottom: 5px;
|
|
37
40
|
// font-family: 'Montserrat';
|
|
38
41
|
// font-style: normal;
|
|
39
42
|
// font-weight: 500;
|
|
@@ -57,7 +60,7 @@
|
|
|
57
60
|
|
|
58
61
|
.old-price-wrap {
|
|
59
62
|
display: flex;
|
|
60
|
-
margin-top:
|
|
63
|
+
margin-top: 3px;
|
|
61
64
|
align-items: baseline;
|
|
62
65
|
white-space: nowrap;
|
|
63
66
|
overflow: hidden;
|
|
@@ -68,11 +71,9 @@
|
|
|
68
71
|
font-family: 'Montserrat';
|
|
69
72
|
font-style: normal;
|
|
70
73
|
font-weight: 700;
|
|
71
|
-
font-size:
|
|
74
|
+
font-size: 12px;
|
|
72
75
|
line-height: 15px;
|
|
73
|
-
color: #
|
|
74
|
-
padding: 0 4px;
|
|
75
|
-
background-color: #CE1126;
|
|
76
|
+
color: #2F3043;
|
|
76
77
|
}
|
|
77
78
|
|
|
78
79
|
.old-price {
|
|
@@ -287,9 +287,21 @@ function (_super) {
|
|
|
287
287
|
|
|
288
288
|
case 1:
|
|
289
289
|
res = _a.sent();
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
290
|
+
|
|
291
|
+
if (!res.list || res.list.length === 0) {
|
|
292
|
+
// 秒杀场次结束之后,清空列表数据,隐藏秒杀组件
|
|
293
|
+
this.setState({
|
|
294
|
+
list: []
|
|
295
|
+
});
|
|
296
|
+
|
|
297
|
+
if (!(0, _coreUtil.isDesignMode)()) {
|
|
298
|
+
(0, _storeUtil.setMagicStore)("flashSale_" + this.props.panelProps.id, []);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
return [2
|
|
302
|
+
/*return*/
|
|
303
|
+
];
|
|
304
|
+
}
|
|
293
305
|
|
|
294
306
|
if (!(0, _coreUtil.isDesignMode)()) {
|
|
295
307
|
(0, _storeUtil.setMagicStore)("flashSale_" + this.props.panelProps.id, res.list);
|
|
@@ -332,6 +344,10 @@ function (_super) {
|
|
|
332
344
|
this.setState({
|
|
333
345
|
list: []
|
|
334
346
|
});
|
|
347
|
+
|
|
348
|
+
if (!(0, _coreUtil.isDesignMode)()) {
|
|
349
|
+
(0, _storeUtil.setMagicStore)("flashSale_" + this.props.panelProps.id, []);
|
|
350
|
+
}
|
|
335
351
|
}
|
|
336
352
|
|
|
337
353
|
return [2
|
|
@@ -279,14 +279,8 @@ var getDefaultJSON = function getDefaultJSON() {
|
|
|
279
279
|
}
|
|
280
280
|
},
|
|
281
281
|
customize: {
|
|
282
|
-
layout:
|
|
283
|
-
|
|
284
|
-
h5Layout: 'layout1'
|
|
285
|
-
},
|
|
286
|
-
align: 'left',
|
|
287
|
-
pcRowNum: 6,
|
|
288
|
-
pcMaxRowNum: 6,
|
|
289
|
-
pcMinRowNum: 5
|
|
282
|
+
layout: 'left',
|
|
283
|
+
align: 'left'
|
|
290
284
|
},
|
|
291
285
|
background: {
|
|
292
286
|
opacity: 100,
|
|
@@ -227,6 +227,10 @@ var __spreadArrays = void 0 && (void 0).__spreadArrays || function () {
|
|
|
227
227
|
};
|
|
228
228
|
|
|
229
229
|
var LAYOUT_IMAGE_SIZE = {
|
|
230
|
+
left: {
|
|
231
|
+
w: '100%',
|
|
232
|
+
h: 165
|
|
233
|
+
},
|
|
230
234
|
layout1: {
|
|
231
235
|
w: '100%',
|
|
232
236
|
h: 164
|
|
@@ -412,8 +416,10 @@ function (_super) {
|
|
|
412
416
|
};
|
|
413
417
|
|
|
414
418
|
_this.resetLayout = function () {
|
|
415
|
-
var layout = _this.props.panelProps.customize.layout.h5Layout;
|
|
419
|
+
var layout = _this.props.panelProps.customize.layout.h5Layout || _this.props.panelProps.customize.layout; // 后面删除
|
|
420
|
+
|
|
416
421
|
var LAYOUT_COLUMN = {
|
|
422
|
+
left: 2,
|
|
417
423
|
layout1: 2,
|
|
418
424
|
layout2: 1,
|
|
419
425
|
layout3: 3
|
|
@@ -537,7 +543,7 @@ function (_super) {
|
|
|
537
543
|
hideTabs: hideTabs
|
|
538
544
|
});
|
|
539
545
|
});
|
|
540
|
-
var curLayout = panelProps.customize.layout.h5Layout;
|
|
546
|
+
var curLayout = panelProps.customize.layout.h5Layout || panelProps.customize.layout; // 后面删除
|
|
541
547
|
|
|
542
548
|
if (curLayout !== this.preLayout) {
|
|
543
549
|
this.resetLayout();
|
|
@@ -559,7 +565,7 @@ function (_super) {
|
|
|
559
565
|
var bgStyle = this.getBackgroundStyle();
|
|
560
566
|
var products = this.state["products" + tabIndex] || [];
|
|
561
567
|
var isDivide = groupSource.length <= 3;
|
|
562
|
-
var layout = panelProps.customize.layout.h5Layout;
|
|
568
|
+
var layout = panelProps.customize.layout.h5Layout || panelProps.customize.layout; // 后面删除
|
|
563
569
|
|
|
564
570
|
var _seeAll = (0, _commonUtil.ensure)(function () {
|
|
565
571
|
return groupSource[tabIndex].seeAll;
|
|
@@ -611,27 +617,7 @@ function (_super) {
|
|
|
611
617
|
transform: "translateX(" + tabLeft + "px)",
|
|
612
618
|
background: this.getTabBarActiveColor(panelProps)
|
|
613
619
|
}
|
|
614
|
-
})), ['
|
|
615
|
-
key: "macyContainer",
|
|
616
|
-
className: "macyContainer"
|
|
617
|
-
}, products.map(function (item) {
|
|
618
|
-
return /*#__PURE__*/_react["default"].createElement(_ProductItem["default"], {
|
|
619
|
-
key: item.productId,
|
|
620
|
-
data: item,
|
|
621
|
-
fixHeight: layout === 'layout3',
|
|
622
|
-
imgHeight: imgHeight,
|
|
623
|
-
imgWidth: imgWidth,
|
|
624
|
-
layout: layout === 'layout2' ? 'horizontal' : 'vertical',
|
|
625
|
-
onItemClick: function onItemClick() {
|
|
626
|
-
return (0, _coreUtil.clickUrl)("/product/detail/" + item.offerId + "?productId=" + (item.sppProductId || item.productId || ''));
|
|
627
|
-
},
|
|
628
|
-
panelProps: panelProps.content,
|
|
629
|
-
showProgress: false
|
|
630
|
-
});
|
|
631
|
-
})), _seeAll.open && products.length > 0 && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
|
|
632
|
-
className: "btnSeeAll",
|
|
633
|
-
data: _seeAll
|
|
634
|
-
})) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
620
|
+
})), ['layout4', 'layout5'].includes(layout) ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
635
621
|
key: "scrollContainer",
|
|
636
622
|
className: (0, _classnames["default"])('scrollContainer', {
|
|
637
623
|
pl_100: layout === 'layout5'
|
|
@@ -654,6 +640,26 @@ function (_super) {
|
|
|
654
640
|
}), _seeAll.open && products.length > 0 && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
|
|
655
641
|
className: "btnSeeAll",
|
|
656
642
|
data: _seeAll
|
|
643
|
+
})) : /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
644
|
+
key: "macyContainer",
|
|
645
|
+
className: "macyContainer"
|
|
646
|
+
}, products.map(function (item) {
|
|
647
|
+
return /*#__PURE__*/_react["default"].createElement(_ProductItem["default"], {
|
|
648
|
+
key: item.productId,
|
|
649
|
+
data: item,
|
|
650
|
+
fixHeight: layout === 'layout3',
|
|
651
|
+
imgHeight: imgHeight,
|
|
652
|
+
imgWidth: imgWidth,
|
|
653
|
+
layout: layout === 'layout2' ? 'horizontal' : 'vertical',
|
|
654
|
+
onItemClick: function onItemClick() {
|
|
655
|
+
return (0, _coreUtil.clickUrl)("/product/detail/" + item.offerId + "?productId=" + (item.sppProductId || item.productId || ''));
|
|
656
|
+
},
|
|
657
|
+
panelProps: panelProps.content,
|
|
658
|
+
showProgress: false
|
|
659
|
+
});
|
|
660
|
+
})), _seeAll.open && products.length > 0 && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
|
|
661
|
+
className: "btnSeeAll",
|
|
662
|
+
data: _seeAll
|
|
657
663
|
})));
|
|
658
664
|
};
|
|
659
665
|
|
|
@@ -121,19 +121,19 @@
|
|
|
121
121
|
display: block;
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
|
+
}
|
|
124
125
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
126
|
+
.active {
|
|
127
|
+
background: #E9F0FF;
|
|
128
|
+
color: #2F54EB;
|
|
128
129
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
}
|
|
130
|
+
.left {
|
|
131
|
+
.card-title {
|
|
132
|
+
font-weight: 600;
|
|
133
133
|
}
|
|
134
|
+
}
|
|
134
135
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
}
|
|
136
|
+
.more-btn {
|
|
137
|
+
display: block;
|
|
138
138
|
}
|
|
139
139
|
}
|
|
@@ -11,8 +11,6 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
11
11
|
|
|
12
12
|
require("./index.less");
|
|
13
13
|
|
|
14
|
-
var _defaultImg = _interopRequireDefault(require("./image/default-img.png"));
|
|
15
|
-
|
|
16
14
|
var _coreUtil = require("../../../utils/coreUtil");
|
|
17
15
|
|
|
18
16
|
var _decorator = require("../../../decorator");
|
|
@@ -163,11 +161,10 @@ function (_super) {
|
|
|
163
161
|
|
|
164
162
|
if (window.magicDesign.isShop && (srcImg === null || srcImg === void 0 ? void 0 : srcImg.includes('ecommerce/static'))) {
|
|
165
163
|
srcImg = srcImg.replace('ecommerce/static', 'static');
|
|
166
|
-
}
|
|
164
|
+
} // if (!srcImg) {
|
|
165
|
+
// srcImg = defaultImg;
|
|
166
|
+
// }
|
|
167
167
|
|
|
168
|
-
if (!srcImg) {
|
|
169
|
-
srcImg = _defaultImg["default"];
|
|
170
|
-
}
|
|
171
168
|
|
|
172
169
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
173
170
|
className: (0, _classnames["default"])('m-meta-image', {
|