@fonixtree/magic-design 0.0.46 → 0.0.48
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/common/ProductSource/index.js +1 -1
- package/es/composite-comp/common/components/ImageLabel/index.js +2 -2
- package/es/composite-comp/common/components/ImageLabel/index.less +2 -6
- 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/composite-comp/dito/components/Recommend/pc/index.js +3 -5
- package/es/composite-comp/dito/components/Recommend/pc/index.less +1 -4
- package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +15 -19
- package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.less +1 -14
- package/es/core/Designer/PageCompList/index.less +10 -10
- package/es/meta-comp/components/Image/index.js +3 -6
- package/lib/common/ProductSource/index.js +1 -1
- package/lib/composite-comp/common/components/ImageLabel/index.js +2 -2
- package/lib/composite-comp/common/components/ImageLabel/index.less +2 -6
- 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/composite-comp/dito/components/Recommend/pc/index.js +3 -5
- package/lib/composite-comp/dito/components/Recommend/pc/index.less +1 -4
- package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +15 -19
- package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.less +1 -14
- package/lib/core/Designer/PageCompList/index.less +10 -10
- package/lib/meta-comp/components/Image/index.js +3 -6
- package/package.json +1 -1
|
@@ -240,7 +240,7 @@ function ProductSource(_a) {
|
|
|
240
240
|
type: "primary"
|
|
241
241
|
}, (0, _locale.i18n)('SELECT_PRODUCT')), /*#__PURE__*/_react["default"].createElement("div", {
|
|
242
242
|
className: "total"
|
|
243
|
-
}, "Total "
|
|
243
|
+
}, "Total ", getLength(), " products"), visible && /*#__PURE__*/_react["default"].createElement(_ProductModal["default"], {
|
|
244
244
|
closeModal: function closeModal() {
|
|
245
245
|
return setVisbile(false);
|
|
246
246
|
},
|
|
@@ -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 || '
|
|
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 || '
|
|
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
|
|
|
@@ -228,7 +228,7 @@ var __spreadArrays = void 0 && (void 0).__spreadArrays || function () {
|
|
|
228
228
|
|
|
229
229
|
var LAYOUT_IMAGE_SIZE = {
|
|
230
230
|
layout1: {
|
|
231
|
-
w:
|
|
231
|
+
w: 180,
|
|
232
232
|
h: 180
|
|
233
233
|
},
|
|
234
234
|
layout2: {
|
|
@@ -524,7 +524,7 @@ function (_super) {
|
|
|
524
524
|
hideTabs: hideTabs
|
|
525
525
|
});
|
|
526
526
|
});
|
|
527
|
-
var curLayout =
|
|
527
|
+
var curLayout = panelProps.customize.layout.pcLayout;
|
|
528
528
|
|
|
529
529
|
if (curLayout !== this.preLayout) {
|
|
530
530
|
this.resetLayout();
|
|
@@ -615,9 +615,7 @@ function (_super) {
|
|
|
615
615
|
showProgress: false
|
|
616
616
|
});
|
|
617
617
|
})), _seeAll.open && products.length > 0 && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
|
|
618
|
-
className:
|
|
619
|
-
line: layout === 'layout1'
|
|
620
|
-
}),
|
|
618
|
+
className: "btnSeeAll",
|
|
621
619
|
data: _seeAll
|
|
622
620
|
})) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
623
621
|
key: "scrollContainer",
|
|
@@ -25,8 +25,6 @@ var _BaseConfig = _interopRequireDefault(require("../../../../meta-comp/config-p
|
|
|
25
25
|
|
|
26
26
|
var _coreUtil = require("../../../../utils/coreUtil");
|
|
27
27
|
|
|
28
|
-
require("./index.less");
|
|
29
|
-
|
|
30
28
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
31
29
|
|
|
32
30
|
var __extends = void 0 && (void 0).__extends || function () {
|
|
@@ -76,9 +74,8 @@ function (_super) {
|
|
|
76
74
|
};
|
|
77
75
|
}
|
|
78
76
|
|
|
79
|
-
var productSource = /*#__PURE__*/_react["default"].createElement("
|
|
80
|
-
|
|
81
|
-
}, /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
77
|
+
var productSource = /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
78
|
+
split: "dashed",
|
|
82
79
|
title: (0, _locale.i18n)('SOURCE_OF_PRODUCT')
|
|
83
80
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
|
|
84
81
|
onChange: function onChange(v) {
|
|
@@ -91,9 +88,7 @@ function (_super) {
|
|
|
91
88
|
value: "select"
|
|
92
89
|
}, (0, _locale.i18n)('SELECT_PRODUCT')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
|
|
93
90
|
value: "recommend"
|
|
94
|
-
}, (0, _locale.i18n)('AI_RECOMMENDATION')))), /*#__PURE__*/_react["default"].createElement(
|
|
95
|
-
className: "greyBg"
|
|
96
|
-
}, panelProps.sourceType === 'select' && /*#__PURE__*/_react["default"].createElement(_common.ProductSource, {
|
|
91
|
+
}, (0, _locale.i18n)('AI_RECOMMENDATION')))), panelProps.sourceType === 'select' && /*#__PURE__*/_react["default"].createElement(_common.ProductSource, {
|
|
97
92
|
onChange: function onChange(v) {
|
|
98
93
|
panelProps.prodIds = v;
|
|
99
94
|
|
|
@@ -112,6 +107,7 @@ function (_super) {
|
|
|
112
107
|
intelligentValue: panelProps.intelligentValue
|
|
113
108
|
}
|
|
114
109
|
}), panelProps.sourceType === 'recommend' && /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
110
|
+
split: "dashed",
|
|
115
111
|
title: (0, _locale.i18n)('PRODUCT_QUANTITY')
|
|
116
112
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Radio.Group, {
|
|
117
113
|
onChange: function onChange(e) {
|
|
@@ -128,7 +124,7 @@ function (_super) {
|
|
|
128
124
|
value: 50
|
|
129
125
|
}, "\u226450"), /*#__PURE__*/_react["default"].createElement(_antd.Radio, {
|
|
130
126
|
value: 100
|
|
131
|
-
}, "\u2264100"))))
|
|
127
|
+
}, "\u2264100"))));
|
|
132
128
|
|
|
133
129
|
var hoverSetting = /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
|
|
134
130
|
divider: "dashed",
|
|
@@ -171,8 +167,16 @@ function (_super) {
|
|
|
171
167
|
data: panelProps.seeAll
|
|
172
168
|
}),
|
|
173
169
|
metaOption: panelProps.seeAll
|
|
174
|
-
}
|
|
175
|
-
|
|
170
|
+
}, {
|
|
171
|
+
key: 'defaultSource_4',
|
|
172
|
+
name: (0, _locale.i18n)('SECOND_CATEGORY'),
|
|
173
|
+
value: productSource,
|
|
174
|
+
toggleType: 'arrow',
|
|
175
|
+
metaOption: {
|
|
176
|
+
id: 'productSource',
|
|
177
|
+
open: true
|
|
178
|
+
}
|
|
179
|
+
}, {
|
|
176
180
|
key: 'defaultSource_5',
|
|
177
181
|
name: (0, _locale.i18n)('HOVER'),
|
|
178
182
|
value: hoverSetting,
|
|
@@ -187,14 +191,6 @@ function (_super) {
|
|
|
187
191
|
showActiveColor: true,
|
|
188
192
|
source: defaultSource,
|
|
189
193
|
type: "switch"
|
|
190
|
-
}), productSource, /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
|
|
191
|
-
headerSize: "middle",
|
|
192
|
-
onRefresh: function onRefresh() {
|
|
193
|
-
return (0, _coreUtil.renderPreview)();
|
|
194
|
-
},
|
|
195
|
-
showActiveColor: true,
|
|
196
|
-
source: hoverSource,
|
|
197
|
-
type: "switch"
|
|
198
194
|
}));
|
|
199
195
|
};
|
|
200
196
|
|
|
@@ -1,16 +1,3 @@
|
|
|
1
1
|
.recommend_second_conf_wrap {
|
|
2
|
-
|
|
3
|
-
.sourceOfProduct {
|
|
4
|
-
border-top: 1px solid #D2D9E5;
|
|
5
|
-
border-bottom: 1px solid #D2D9E5;
|
|
6
|
-
padding-top: 20px;
|
|
7
|
-
padding-bottom: 20px;
|
|
8
|
-
|
|
9
|
-
.greyBg {
|
|
10
|
-
background: #F5F6F7;
|
|
11
|
-
border-radius: 6px;
|
|
12
|
-
padding: 12px;
|
|
13
|
-
padding-bottom: 1px;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
2
|
+
width: 354px;
|
|
16
3
|
}
|
|
@@ -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', {
|
|
@@ -240,7 +240,7 @@ function ProductSource(_a) {
|
|
|
240
240
|
type: "primary"
|
|
241
241
|
}, (0, _locale.i18n)('SELECT_PRODUCT')), /*#__PURE__*/_react["default"].createElement("div", {
|
|
242
242
|
className: "total"
|
|
243
|
-
}, "Total "
|
|
243
|
+
}, "Total ", getLength(), " products"), visible && /*#__PURE__*/_react["default"].createElement(_ProductModal["default"], {
|
|
244
244
|
closeModal: function closeModal() {
|
|
245
245
|
return setVisbile(false);
|
|
246
246
|
},
|
|
@@ -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 || '
|
|
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 || '
|
|
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
|
|
|
@@ -228,7 +228,7 @@ var __spreadArrays = void 0 && (void 0).__spreadArrays || function () {
|
|
|
228
228
|
|
|
229
229
|
var LAYOUT_IMAGE_SIZE = {
|
|
230
230
|
layout1: {
|
|
231
|
-
w:
|
|
231
|
+
w: 180,
|
|
232
232
|
h: 180
|
|
233
233
|
},
|
|
234
234
|
layout2: {
|
|
@@ -524,7 +524,7 @@ function (_super) {
|
|
|
524
524
|
hideTabs: hideTabs
|
|
525
525
|
});
|
|
526
526
|
});
|
|
527
|
-
var curLayout =
|
|
527
|
+
var curLayout = panelProps.customize.layout.pcLayout;
|
|
528
528
|
|
|
529
529
|
if (curLayout !== this.preLayout) {
|
|
530
530
|
this.resetLayout();
|
|
@@ -615,9 +615,7 @@ function (_super) {
|
|
|
615
615
|
showProgress: false
|
|
616
616
|
});
|
|
617
617
|
})), _seeAll.open && products.length > 0 && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
|
|
618
|
-
className:
|
|
619
|
-
line: layout === 'layout1'
|
|
620
|
-
}),
|
|
618
|
+
className: "btnSeeAll",
|
|
621
619
|
data: _seeAll
|
|
622
620
|
})) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
623
621
|
key: "scrollContainer",
|
|
@@ -25,8 +25,6 @@ var _BaseConfig = _interopRequireDefault(require("../../../../meta-comp/config-p
|
|
|
25
25
|
|
|
26
26
|
var _coreUtil = require("../../../../utils/coreUtil");
|
|
27
27
|
|
|
28
|
-
require("./index.less");
|
|
29
|
-
|
|
30
28
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
31
29
|
|
|
32
30
|
var __extends = void 0 && (void 0).__extends || function () {
|
|
@@ -76,9 +74,8 @@ function (_super) {
|
|
|
76
74
|
};
|
|
77
75
|
}
|
|
78
76
|
|
|
79
|
-
var productSource = /*#__PURE__*/_react["default"].createElement("
|
|
80
|
-
|
|
81
|
-
}, /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
77
|
+
var productSource = /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
78
|
+
split: "dashed",
|
|
82
79
|
title: (0, _locale.i18n)('SOURCE_OF_PRODUCT')
|
|
83
80
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
|
|
84
81
|
onChange: function onChange(v) {
|
|
@@ -91,9 +88,7 @@ function (_super) {
|
|
|
91
88
|
value: "select"
|
|
92
89
|
}, (0, _locale.i18n)('SELECT_PRODUCT')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
|
|
93
90
|
value: "recommend"
|
|
94
|
-
}, (0, _locale.i18n)('AI_RECOMMENDATION')))), /*#__PURE__*/_react["default"].createElement(
|
|
95
|
-
className: "greyBg"
|
|
96
|
-
}, panelProps.sourceType === 'select' && /*#__PURE__*/_react["default"].createElement(_common.ProductSource, {
|
|
91
|
+
}, (0, _locale.i18n)('AI_RECOMMENDATION')))), panelProps.sourceType === 'select' && /*#__PURE__*/_react["default"].createElement(_common.ProductSource, {
|
|
97
92
|
onChange: function onChange(v) {
|
|
98
93
|
panelProps.prodIds = v;
|
|
99
94
|
|
|
@@ -112,6 +107,7 @@ function (_super) {
|
|
|
112
107
|
intelligentValue: panelProps.intelligentValue
|
|
113
108
|
}
|
|
114
109
|
}), panelProps.sourceType === 'recommend' && /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
110
|
+
split: "dashed",
|
|
115
111
|
title: (0, _locale.i18n)('PRODUCT_QUANTITY')
|
|
116
112
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Radio.Group, {
|
|
117
113
|
onChange: function onChange(e) {
|
|
@@ -128,7 +124,7 @@ function (_super) {
|
|
|
128
124
|
value: 50
|
|
129
125
|
}, "\u226450"), /*#__PURE__*/_react["default"].createElement(_antd.Radio, {
|
|
130
126
|
value: 100
|
|
131
|
-
}, "\u2264100"))))
|
|
127
|
+
}, "\u2264100"))));
|
|
132
128
|
|
|
133
129
|
var hoverSetting = /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
|
|
134
130
|
divider: "dashed",
|
|
@@ -171,8 +167,16 @@ function (_super) {
|
|
|
171
167
|
data: panelProps.seeAll
|
|
172
168
|
}),
|
|
173
169
|
metaOption: panelProps.seeAll
|
|
174
|
-
}
|
|
175
|
-
|
|
170
|
+
}, {
|
|
171
|
+
key: 'defaultSource_4',
|
|
172
|
+
name: (0, _locale.i18n)('SECOND_CATEGORY'),
|
|
173
|
+
value: productSource,
|
|
174
|
+
toggleType: 'arrow',
|
|
175
|
+
metaOption: {
|
|
176
|
+
id: 'productSource',
|
|
177
|
+
open: true
|
|
178
|
+
}
|
|
179
|
+
}, {
|
|
176
180
|
key: 'defaultSource_5',
|
|
177
181
|
name: (0, _locale.i18n)('HOVER'),
|
|
178
182
|
value: hoverSetting,
|
|
@@ -187,14 +191,6 @@ function (_super) {
|
|
|
187
191
|
showActiveColor: true,
|
|
188
192
|
source: defaultSource,
|
|
189
193
|
type: "switch"
|
|
190
|
-
}), productSource, /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
|
|
191
|
-
headerSize: "middle",
|
|
192
|
-
onRefresh: function onRefresh() {
|
|
193
|
-
return (0, _coreUtil.renderPreview)();
|
|
194
|
-
},
|
|
195
|
-
showActiveColor: true,
|
|
196
|
-
source: hoverSource,
|
|
197
|
-
type: "switch"
|
|
198
194
|
}));
|
|
199
195
|
};
|
|
200
196
|
|
|
@@ -1,16 +1,3 @@
|
|
|
1
1
|
.recommend_second_conf_wrap {
|
|
2
|
-
|
|
3
|
-
.sourceOfProduct {
|
|
4
|
-
border-top: 1px solid #D2D9E5;
|
|
5
|
-
border-bottom: 1px solid #D2D9E5;
|
|
6
|
-
padding-top: 20px;
|
|
7
|
-
padding-bottom: 20px;
|
|
8
|
-
|
|
9
|
-
.greyBg {
|
|
10
|
-
background: #F5F6F7;
|
|
11
|
-
border-radius: 6px;
|
|
12
|
-
padding: 12px;
|
|
13
|
-
padding-bottom: 1px;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
2
|
+
width: 354px;
|
|
16
3
|
}
|
|
@@ -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', {
|