@fonixtree/magic-design 2.0.61 → 2.0.63
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/assets/fonts/.DS_Store +0 -0
- package/es/assets/fonts/magic-box-iconfont.css +18 -6
- package/es/assets/fonts/magic-box-iconfont.css.bak +15 -12
- package/es/assets/fonts/magic-box-iconfont.js +1 -5
- package/es/assets/fonts/magic-box-iconfont.js.bak +1 -5
- package/es/assets/fonts/magic-box-iconfont.ttf +0 -0
- package/es/assets/fonts/magic-box-iconfont.woff +0 -0
- package/es/assets/fonts/magic-box-iconfont.woff2 +0 -0
- package/es/composite-comp/bol/components/Video/index.js +1 -2
- package/es/composite-comp/common/components/AffiliateProductItem/index.less +17 -1
- package/es/composite-comp/common/components/ProductItem/index.less +4 -1
- package/es/composite-comp/dito/components/AffiliateRecommend/mobile/index.js +6 -5
- package/es/composite-comp/dito/components/AffiliateRecommend/mobile/index.less +1 -12
- package/es/composite-comp/dito/components/AffiliateRecommend/pc/index.js +6 -5
- package/es/composite-comp/dito/components/FlashDeal/mobile/index.js +8 -6
- package/es/composite-comp/dito/components/FlashDeal/pc/index.js +8 -6
- package/es/composite-comp/dito/components/HeadNavigation/defaultJSON.js +87 -0
- package/es/composite-comp/dito/components/MenuNavigation/defaultJSON.js +79 -0
- package/es/composite-comp/dito/components/Recommend/mobile/index.js +6 -5
- package/es/composite-comp/dito/components/Recommend/pc/index.js +6 -5
- package/es/core/Designer/ChatRobot/index.js +18 -14
- package/es/core/Designer/ChatRobot/index.less +30 -9
- package/es/core/Designer/RenderHtml/index.js +18 -15
- package/es/core/Designer/RenderHtml/index.less +1 -1
- package/es/core/Designer/ToolBarModal/index.js +8 -7
- package/es/core/Designer/index.js +7 -0
- package/es/meta-comp/components/Text/formats/textAlign.js +58 -0
- package/es/meta-comp/components/Text/index.js +2 -0
- package/lib/assets/fonts/.DS_Store +0 -0
- package/lib/assets/fonts/magic-box-iconfont.css +18 -6
- package/lib/assets/fonts/magic-box-iconfont.css.bak +15 -12
- package/lib/assets/fonts/magic-box-iconfont.js +1 -5
- package/lib/assets/fonts/magic-box-iconfont.js.bak +1 -5
- package/lib/assets/fonts/magic-box-iconfont.ttf +0 -0
- package/lib/assets/fonts/magic-box-iconfont.woff +0 -0
- package/lib/assets/fonts/magic-box-iconfont.woff2 +0 -0
- package/lib/composite-comp/bol/components/Video/index.js +1 -2
- package/lib/composite-comp/common/components/AffiliateProductItem/index.less +17 -1
- package/lib/composite-comp/common/components/ProductItem/index.less +4 -1
- package/lib/composite-comp/dito/components/AffiliateRecommend/mobile/index.js +6 -5
- package/lib/composite-comp/dito/components/AffiliateRecommend/mobile/index.less +1 -12
- package/lib/composite-comp/dito/components/AffiliateRecommend/pc/index.js +6 -5
- package/lib/composite-comp/dito/components/FlashDeal/mobile/index.js +8 -6
- package/lib/composite-comp/dito/components/FlashDeal/pc/index.js +8 -6
- package/lib/composite-comp/dito/components/HeadNavigation/defaultJSON.js +87 -0
- package/lib/composite-comp/dito/components/MenuNavigation/defaultJSON.js +79 -0
- package/lib/composite-comp/dito/components/Recommend/mobile/index.js +6 -5
- package/lib/composite-comp/dito/components/Recommend/pc/index.js +6 -5
- package/lib/core/Designer/ChatRobot/index.js +18 -14
- package/lib/core/Designer/ChatRobot/index.less +30 -9
- package/lib/core/Designer/RenderHtml/index.js +18 -15
- package/lib/core/Designer/RenderHtml/index.less +1 -1
- package/lib/core/Designer/ToolBarModal/index.js +8 -7
- package/lib/core/Designer/index.js +7 -0
- package/lib/meta-comp/components/Text/formats/textAlign.js +58 -0
- package/lib/meta-comp/components/Text/index.js +2 -0
- package/package.json +1 -1
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -91,8 +91,7 @@ function (_super) {
|
|
|
91
91
|
|
|
92
92
|
|
|
93
93
|
Video.prototype.render = function () {
|
|
94
|
-
var nodeData = this.props.nodeData;
|
|
95
|
-
|
|
94
|
+
var nodeData = this.props.nodeData;
|
|
96
95
|
return /*#__PURE__*/_react["default"].createElement("div", null, window.magicDesign.device === 'pc' ? /*#__PURE__*/_react["default"].createElement(_pc["default"], {
|
|
97
96
|
data: nodeData
|
|
98
97
|
}) : /*#__PURE__*/_react["default"].createElement(_mobile["default"], {
|
|
@@ -11,28 +11,36 @@
|
|
|
11
11
|
.product-img {
|
|
12
12
|
flex-shrink: 0;
|
|
13
13
|
}
|
|
14
|
+
|
|
14
15
|
.productItemContent {
|
|
15
16
|
padding: 4px 4px 0;
|
|
17
|
+
|
|
16
18
|
.producItemName {
|
|
17
19
|
overflow: hidden;
|
|
18
20
|
text-overflow: ellipsis;
|
|
19
21
|
display: -webkit-box;
|
|
20
22
|
-webkit-box-orient: vertical;
|
|
21
23
|
-webkit-line-clamp: 2;
|
|
24
|
+
line-height: 18px;
|
|
25
|
+
max-height: 40px;
|
|
22
26
|
}
|
|
23
27
|
|
|
24
28
|
}
|
|
29
|
+
|
|
25
30
|
.cashBackBox {
|
|
26
31
|
width: 100%;
|
|
27
32
|
background: #F9F9F9;
|
|
28
33
|
padding: 4px;
|
|
34
|
+
|
|
29
35
|
.cashBackBox_cashBack {
|
|
30
36
|
display: flex;
|
|
31
37
|
align-items: center;
|
|
38
|
+
|
|
32
39
|
img {
|
|
33
40
|
width: 14px;
|
|
34
41
|
height: 14px;
|
|
35
42
|
}
|
|
43
|
+
|
|
36
44
|
.cashBackBox_text {
|
|
37
45
|
display: flex;
|
|
38
46
|
align-items: center;
|
|
@@ -43,22 +51,27 @@
|
|
|
43
51
|
font-style: normal;
|
|
44
52
|
font-weight: 700;
|
|
45
53
|
line-height: 12px;
|
|
54
|
+
|
|
46
55
|
span {
|
|
47
56
|
padding-left: 2px;
|
|
48
57
|
}
|
|
49
58
|
}
|
|
59
|
+
|
|
50
60
|
.custom_font {
|
|
51
61
|
font-size: 9px;
|
|
52
62
|
padding-left: 2px;
|
|
53
63
|
}
|
|
54
64
|
}
|
|
65
|
+
|
|
55
66
|
.cashBackBox_koin {
|
|
56
67
|
display: flex;
|
|
57
68
|
align-items: center;
|
|
69
|
+
|
|
58
70
|
img {
|
|
59
71
|
width: 14px;
|
|
60
72
|
height: 14px;
|
|
61
73
|
}
|
|
74
|
+
|
|
62
75
|
.cashBackBox_text {
|
|
63
76
|
color: #fa7539;
|
|
64
77
|
font-family: Trueno;
|
|
@@ -69,16 +82,19 @@
|
|
|
69
82
|
display: flex;
|
|
70
83
|
align-items: center;
|
|
71
84
|
padding-left: 4px;
|
|
85
|
+
|
|
72
86
|
span {
|
|
73
87
|
padding: 0 2px;
|
|
74
88
|
}
|
|
75
89
|
}
|
|
90
|
+
|
|
76
91
|
.custom_font {
|
|
77
92
|
font-size: 9px;
|
|
78
93
|
padding-left: 2px;
|
|
79
94
|
}
|
|
80
95
|
}
|
|
81
96
|
}
|
|
97
|
+
|
|
82
98
|
.producItemPrice {
|
|
83
99
|
padding: 4px;
|
|
84
100
|
}
|
|
@@ -90,7 +106,7 @@
|
|
|
90
106
|
overflow: hidden;
|
|
91
107
|
}
|
|
92
108
|
|
|
93
|
-
.
|
|
109
|
+
.producItemName {
|
|
94
110
|
height: 38px;
|
|
95
111
|
}
|
|
96
112
|
}
|
|
@@ -62,9 +62,11 @@
|
|
|
62
62
|
text-overflow: ellipsis;
|
|
63
63
|
flex-wrap: wrap;
|
|
64
64
|
line-height: 15px;
|
|
65
|
+
|
|
65
66
|
.old-price-wrap {
|
|
66
67
|
display: flex;
|
|
67
68
|
line-height: 13px;
|
|
69
|
+
|
|
68
70
|
.discount {
|
|
69
71
|
margin-right: 3px;
|
|
70
72
|
font-family: 'Montserrat';
|
|
@@ -76,6 +78,7 @@
|
|
|
76
78
|
padding: 0 4px;
|
|
77
79
|
background-color: #CE1126;
|
|
78
80
|
}
|
|
81
|
+
|
|
79
82
|
.old-price {
|
|
80
83
|
text-decoration: line-through;
|
|
81
84
|
width: fit-content;
|
|
@@ -85,7 +88,7 @@
|
|
|
85
88
|
.sold-count {
|
|
86
89
|
color: #7b7b7b;
|
|
87
90
|
font-size: 12px;
|
|
88
|
-
text-align: right
|
|
91
|
+
text-align: right;
|
|
89
92
|
flex-grow: 1;
|
|
90
93
|
}
|
|
91
94
|
}
|
|
@@ -262,7 +262,7 @@ function (_super) {
|
|
|
262
262
|
_this.preContent = '';
|
|
263
263
|
_this.preSpacing = '';
|
|
264
264
|
_this._cache = (0, _coreUtil.isDesignMode)() ? {} : (0, _commonUtil.ensure)(function () {
|
|
265
|
-
return (0, _storeUtil.getMagicStore)("recommend_" + _this.props.panelProps.id);
|
|
265
|
+
return (0, _storeUtil.getMagicStore)("recommend_" + (window.magicDesign.pageId || '') + "_" + _this.props.panelProps.id);
|
|
266
266
|
}, {});
|
|
267
267
|
_this.state = __assign({
|
|
268
268
|
contentWidth: 0,
|
|
@@ -308,7 +308,7 @@ function (_super) {
|
|
|
308
308
|
|
|
309
309
|
_this.getProductList = function (index) {
|
|
310
310
|
return __awaiter(_this, void 0, void 0, function () {
|
|
311
|
-
var panelProps, groupSource, recommendId, cache, _a, prodIds, newData, res, e_1, _cache;
|
|
311
|
+
var panelProps, groupSource, recommendId, pageId, cache, _a, prodIds, newData, res, e_1, _cache;
|
|
312
312
|
|
|
313
313
|
var _b, _c, _d;
|
|
314
314
|
|
|
@@ -320,9 +320,10 @@ function (_super) {
|
|
|
320
320
|
panelProps = this.props.panelProps;
|
|
321
321
|
groupSource = this.state.groupSource;
|
|
322
322
|
recommendId = panelProps.id;
|
|
323
|
+
pageId = window.magicDesign.pageId || '';
|
|
323
324
|
|
|
324
325
|
if (!(0, _coreUtil.isDesignMode)()) {
|
|
325
|
-
cache = (0, _storeUtil.getMagicStore)("recommend_" + recommendId);
|
|
326
|
+
cache = (0, _storeUtil.getMagicStore)("recommend_" + pageId + "_" + recommendId);
|
|
326
327
|
|
|
327
328
|
if (cache) {
|
|
328
329
|
if ("products" + index in cache) {
|
|
@@ -388,8 +389,8 @@ function (_super) {
|
|
|
388
389
|
|
|
389
390
|
case 6:
|
|
390
391
|
if (!(0, _coreUtil.isDesignMode)()) {
|
|
391
|
-
_cache = (0, _storeUtil.getMagicStore)("recommend_" + recommendId);
|
|
392
|
-
(0, _storeUtil.setMagicStore)("recommend_" + recommendId, __assign(__assign({}, _cache), (_c = {}, _c["products" + index] = newData, _c.endTime = Date.now() + 3 * 60 * 1000, _c)));
|
|
392
|
+
_cache = (0, _storeUtil.getMagicStore)("recommend_" + pageId + "_" + recommendId);
|
|
393
|
+
(0, _storeUtil.setMagicStore)("recommend_" + pageId + "_" + recommendId, __assign(__assign({}, _cache), (_c = {}, _c["products" + index] = newData, _c.endTime = Date.now() + 3 * 60 * 1000, _c)));
|
|
393
394
|
}
|
|
394
395
|
|
|
395
396
|
this.setState((_d = {}, _d["products" + index] = newData, _d), function () {
|
|
@@ -70,22 +70,11 @@
|
|
|
70
70
|
.m-recommend-mobile .scrollContainer .scrollProductListRow {
|
|
71
71
|
display: flex;
|
|
72
72
|
flex-direction: row;
|
|
73
|
-
align-items:
|
|
73
|
+
align-items: flex-start;
|
|
74
74
|
}
|
|
75
75
|
.m-recommend-mobile .scrollContainer .scrollProductListRow .productCardRow {
|
|
76
76
|
margin-right: 0.16rem;
|
|
77
77
|
}
|
|
78
|
-
.m-recommend-mobile .scrollContainer .scrollProductListRow .productCardRow .m-product-item-wrap {
|
|
79
|
-
height: 100%;
|
|
80
|
-
}
|
|
81
|
-
.m-recommend-mobile .scrollContainer .scrollProductListRow .productCardRow .m-product-item-wrap .contentWrap {
|
|
82
|
-
flex: 1;
|
|
83
|
-
flex-direction: column;
|
|
84
|
-
display: flex;
|
|
85
|
-
}
|
|
86
|
-
.m-recommend-mobile .scrollContainer .scrollProductListRow .productCardRow .m-product-item-wrap .contentWrap .cashBackBox {
|
|
87
|
-
margin-top: auto;
|
|
88
|
-
}
|
|
89
78
|
.m-recommend-mobile .btnSeeAll {
|
|
90
79
|
display: block;
|
|
91
80
|
width: fit-content;
|
|
@@ -245,7 +245,7 @@ function (_super) {
|
|
|
245
245
|
_this.preContent = '';
|
|
246
246
|
_this.preSpacing = '';
|
|
247
247
|
_this._cache = (0, _coreUtil.isDesignMode)() ? {} : (0, _commonUtil.ensure)(function () {
|
|
248
|
-
return (0, _storeUtil.getMagicStore)("recommend_" + _this.props.panelProps.id);
|
|
248
|
+
return (0, _storeUtil.getMagicStore)("recommend_" + (window.magicDesign.pageId || '') + "_" + _this.props.panelProps.id);
|
|
249
249
|
}, {});
|
|
250
250
|
_this.scrollRef = /*#__PURE__*/_react["default"].createRef();
|
|
251
251
|
_this.state = __assign({
|
|
@@ -303,7 +303,7 @@ function (_super) {
|
|
|
303
303
|
|
|
304
304
|
_this.getProductList = function (index) {
|
|
305
305
|
return __awaiter(_this, void 0, void 0, function () {
|
|
306
|
-
var panelProps, groupSource, recommendId, cache, _a, prodIds, newData, res, e_1, _cache;
|
|
306
|
+
var panelProps, groupSource, recommendId, pageId, cache, _a, prodIds, newData, res, e_1, _cache;
|
|
307
307
|
|
|
308
308
|
var _b, _c, _d;
|
|
309
309
|
|
|
@@ -315,9 +315,10 @@ function (_super) {
|
|
|
315
315
|
panelProps = this.props.panelProps;
|
|
316
316
|
groupSource = this.state.groupSource;
|
|
317
317
|
recommendId = panelProps.id;
|
|
318
|
+
pageId = window.magicDesign.pageId || '';
|
|
318
319
|
|
|
319
320
|
if (!(0, _coreUtil.isDesignMode)()) {
|
|
320
|
-
cache = (0, _storeUtil.getMagicStore)("recommend_" + recommendId);
|
|
321
|
+
cache = (0, _storeUtil.getMagicStore)("recommend_" + pageId + "_" + recommendId);
|
|
321
322
|
|
|
322
323
|
if (cache) {
|
|
323
324
|
if ("products" + index in cache) {
|
|
@@ -383,8 +384,8 @@ function (_super) {
|
|
|
383
384
|
|
|
384
385
|
case 6:
|
|
385
386
|
if (!(0, _coreUtil.isDesignMode)()) {
|
|
386
|
-
_cache = (0, _storeUtil.getMagicStore)("recommend_" + recommendId);
|
|
387
|
-
(0, _storeUtil.setMagicStore)("recommend_" + recommendId, __assign(__assign({}, _cache), (_c = {}, _c["products" + index] = newData, _c.endTime = Date.now() + 3 * 60 * 1000, _c)));
|
|
387
|
+
_cache = (0, _storeUtil.getMagicStore)("recommend_" + pageId + "_" + recommendId);
|
|
388
|
+
(0, _storeUtil.setMagicStore)("recommend_" + pageId + "_" + recommendId, __assign(__assign({}, _cache), (_c = {}, _c["products" + index] = newData, _c.endTime = Date.now() + 3 * 60 * 1000, _c)));
|
|
388
389
|
}
|
|
389
390
|
|
|
390
391
|
this.setState((_d = {}, _d["products" + index] = newData, _d), function () {
|
|
@@ -261,7 +261,7 @@ function (_super) {
|
|
|
261
261
|
_this.sortType = '';
|
|
262
262
|
_this.state = {
|
|
263
263
|
list: (0, _coreUtil.isDesignMode)() ? [] : (0, _commonUtil.ensure)(function () {
|
|
264
|
-
return (0, _storeUtil.getMagicStore)("flashSale_" + _this.props.panelProps.id);
|
|
264
|
+
return (0, _storeUtil.getMagicStore)("flashSale_" + (window.magicDesign.pageId || '') + "_" + _this.props.panelProps.id);
|
|
265
265
|
}, []),
|
|
266
266
|
effDate: '',
|
|
267
267
|
expDate: '',
|
|
@@ -271,7 +271,7 @@ function (_super) {
|
|
|
271
271
|
|
|
272
272
|
_this.getFlashData = function (pageSize, campaign) {
|
|
273
273
|
return __awaiter(_this, void 0, void 0, function () {
|
|
274
|
-
var res;
|
|
274
|
+
var res, pageId;
|
|
275
275
|
return __generator(this, function (_a) {
|
|
276
276
|
switch (_a.label) {
|
|
277
277
|
case 0:
|
|
@@ -286,6 +286,7 @@ function (_super) {
|
|
|
286
286
|
|
|
287
287
|
case 1:
|
|
288
288
|
res = _a.sent();
|
|
289
|
+
pageId = window.magicDesign.pageId || '';
|
|
289
290
|
|
|
290
291
|
if (!res.list || res.list.length === 0) {
|
|
291
292
|
// 秒杀场次结束之后,清空列表数据,隐藏秒杀组件
|
|
@@ -294,7 +295,7 @@ function (_super) {
|
|
|
294
295
|
});
|
|
295
296
|
|
|
296
297
|
if (!(0, _coreUtil.isDesignMode)()) {
|
|
297
|
-
(0, _storeUtil.setMagicStore)("flashSale_" + this.props.panelProps.id, []);
|
|
298
|
+
(0, _storeUtil.setMagicStore)("flashSale_" + pageId + "_" + this.props.panelProps.id, []);
|
|
298
299
|
}
|
|
299
300
|
|
|
300
301
|
return [2
|
|
@@ -303,7 +304,7 @@ function (_super) {
|
|
|
303
304
|
}
|
|
304
305
|
|
|
305
306
|
if (!(0, _coreUtil.isDesignMode)()) {
|
|
306
|
-
(0, _storeUtil.setMagicStore)("flashSale_" + this.props.panelProps.id, res.list);
|
|
307
|
+
(0, _storeUtil.setMagicStore)("flashSale_" + pageId + "_" + this.props.panelProps.id, res.list);
|
|
307
308
|
}
|
|
308
309
|
|
|
309
310
|
this.setState({
|
|
@@ -323,7 +324,7 @@ function (_super) {
|
|
|
323
324
|
|
|
324
325
|
_this.getNextFlashSale = function () {
|
|
325
326
|
return __awaiter(_this, void 0, void 0, function () {
|
|
326
|
-
var data;
|
|
327
|
+
var data, pageId;
|
|
327
328
|
return __generator(this, function (_a) {
|
|
328
329
|
switch (_a.label) {
|
|
329
330
|
case 0:
|
|
@@ -343,9 +344,10 @@ function (_super) {
|
|
|
343
344
|
this.setState({
|
|
344
345
|
list: []
|
|
345
346
|
});
|
|
347
|
+
pageId = window.magicDesign.pageId || '';
|
|
346
348
|
|
|
347
349
|
if (!(0, _coreUtil.isDesignMode)()) {
|
|
348
|
-
(0, _storeUtil.setMagicStore)("flashSale_" + this.props.panelProps.id, []);
|
|
350
|
+
(0, _storeUtil.setMagicStore)("flashSale_" + pageId + "_" + this.props.panelProps.id, []);
|
|
349
351
|
}
|
|
350
352
|
}
|
|
351
353
|
|
|
@@ -300,7 +300,7 @@ function (_super) {
|
|
|
300
300
|
_this.scrollRef = /*#__PURE__*/_react["default"].createRef();
|
|
301
301
|
_this.state = {
|
|
302
302
|
list: (0, _coreUtil.isDesignMode)() ? [] : (0, _commonUtil.ensure)(function () {
|
|
303
|
-
return (0, _storeUtil.getMagicStore)("flashSale_" + _this.props.panelProps.id);
|
|
303
|
+
return (0, _storeUtil.getMagicStore)("flashSale_" + (window.magicDesign.pageId || '') + "_" + _this.props.panelProps.id);
|
|
304
304
|
}, []),
|
|
305
305
|
effDate: '',
|
|
306
306
|
expDate: '',
|
|
@@ -312,7 +312,7 @@ function (_super) {
|
|
|
312
312
|
|
|
313
313
|
_this.getFlashData = function (pageSize, campaign) {
|
|
314
314
|
return __awaiter(_this, void 0, void 0, function () {
|
|
315
|
-
var res;
|
|
315
|
+
var res, pageId;
|
|
316
316
|
return __generator(this, function (_a) {
|
|
317
317
|
switch (_a.label) {
|
|
318
318
|
case 0:
|
|
@@ -327,6 +327,7 @@ function (_super) {
|
|
|
327
327
|
|
|
328
328
|
case 1:
|
|
329
329
|
res = _a.sent();
|
|
330
|
+
pageId = window.magicDesign.pageId || '';
|
|
330
331
|
|
|
331
332
|
if (!res.list || res.list.length === 0) {
|
|
332
333
|
// 秒杀场次结束之后,清空列表数据,隐藏秒杀组件
|
|
@@ -335,7 +336,7 @@ function (_super) {
|
|
|
335
336
|
});
|
|
336
337
|
|
|
337
338
|
if (!(0, _coreUtil.isDesignMode)()) {
|
|
338
|
-
(0, _storeUtil.setMagicStore)("flashSale_" + this.props.panelProps.id, []);
|
|
339
|
+
(0, _storeUtil.setMagicStore)("flashSale_" + pageId + "_" + this.props.panelProps.id, []);
|
|
339
340
|
}
|
|
340
341
|
|
|
341
342
|
return [2
|
|
@@ -344,7 +345,7 @@ function (_super) {
|
|
|
344
345
|
}
|
|
345
346
|
|
|
346
347
|
if (!(0, _coreUtil.isDesignMode)()) {
|
|
347
|
-
(0, _storeUtil.setMagicStore)("flashSale_" + this.props.panelProps.id, res.list);
|
|
348
|
+
(0, _storeUtil.setMagicStore)("flashSale_" + pageId + "_" + this.props.panelProps.id, res.list);
|
|
348
349
|
}
|
|
349
350
|
|
|
350
351
|
this.setState({
|
|
@@ -364,7 +365,7 @@ function (_super) {
|
|
|
364
365
|
|
|
365
366
|
_this.getNextFlashSale = function () {
|
|
366
367
|
return __awaiter(_this, void 0, void 0, function () {
|
|
367
|
-
var data;
|
|
368
|
+
var data, pageId;
|
|
368
369
|
return __generator(this, function (_a) {
|
|
369
370
|
switch (_a.label) {
|
|
370
371
|
case 0:
|
|
@@ -384,9 +385,10 @@ function (_super) {
|
|
|
384
385
|
this.setState({
|
|
385
386
|
list: []
|
|
386
387
|
});
|
|
388
|
+
pageId = window.magicDesign.pageId || '';
|
|
387
389
|
|
|
388
390
|
if (!(0, _coreUtil.isDesignMode)()) {
|
|
389
|
-
(0, _storeUtil.setMagicStore)("flashSale_" + this.props.panelProps.id, []);
|
|
391
|
+
(0, _storeUtil.setMagicStore)("flashSale_" + pageId + "_" + this.props.panelProps.id, []);
|
|
390
392
|
}
|
|
391
393
|
}
|
|
392
394
|
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getDefaultJSON = void 0;
|
|
7
|
+
|
|
8
|
+
var _uuid = require("uuid");
|
|
9
|
+
|
|
10
|
+
var getDefaultJSON = function getDefaultJSON() {
|
|
11
|
+
return {
|
|
12
|
+
id: (0, _uuid.v4)(),
|
|
13
|
+
type: 'HEAD_NAVIGATION',
|
|
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
|
+
box: {
|
|
35
|
+
id: (0, _uuid.v4)(),
|
|
36
|
+
open: true,
|
|
37
|
+
color: {
|
|
38
|
+
pc: '#D92929',
|
|
39
|
+
mobile: '#8493AF'
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
icon: {
|
|
43
|
+
id: (0, _uuid.v4)(),
|
|
44
|
+
open: true,
|
|
45
|
+
color: {
|
|
46
|
+
pc: '#D92929',
|
|
47
|
+
mobile: '#232F46'
|
|
48
|
+
},
|
|
49
|
+
cartIcon: {
|
|
50
|
+
pc: true,
|
|
51
|
+
mobile: true
|
|
52
|
+
},
|
|
53
|
+
messageIcon: {
|
|
54
|
+
pc: false,
|
|
55
|
+
mobile: true
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
spacing: {
|
|
60
|
+
pc: {
|
|
61
|
+
paddingTop: 20,
|
|
62
|
+
paddingBottom: 30,
|
|
63
|
+
marginBottom: window.magicDesign.compSpacing * 1.5,
|
|
64
|
+
fillUp: false
|
|
65
|
+
},
|
|
66
|
+
mobile: {
|
|
67
|
+
paddingTop: 8,
|
|
68
|
+
paddingBottom: 8,
|
|
69
|
+
paddingLeft: 15,
|
|
70
|
+
paddingRight: 15,
|
|
71
|
+
marginBottom: window.magicDesign.compSpacing
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
customize: {
|
|
75
|
+
layout: 'left',
|
|
76
|
+
align: 'left'
|
|
77
|
+
},
|
|
78
|
+
background: {
|
|
79
|
+
opacity: 100,
|
|
80
|
+
color: '#fff',
|
|
81
|
+
image: '',
|
|
82
|
+
bgType: 'color'
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
exports.getDefaultJSON = getDefaultJSON;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getDefaultJSON = void 0;
|
|
7
|
+
|
|
8
|
+
var _uuid = require("uuid");
|
|
9
|
+
|
|
10
|
+
var defaultMenuName = [{
|
|
11
|
+
name: 'Home',
|
|
12
|
+
icon: '',
|
|
13
|
+
selectedIcon: '',
|
|
14
|
+
clickUrl: ''
|
|
15
|
+
}, {
|
|
16
|
+
name: 'Category',
|
|
17
|
+
icon: '',
|
|
18
|
+
selectedIcon: '',
|
|
19
|
+
clickUrl: ''
|
|
20
|
+
}, {
|
|
21
|
+
name: 'Community',
|
|
22
|
+
icon: '',
|
|
23
|
+
selectedIcon: '',
|
|
24
|
+
clickUrl: ''
|
|
25
|
+
}, {
|
|
26
|
+
name: 'Cart',
|
|
27
|
+
icon: '',
|
|
28
|
+
selectedIcon: '',
|
|
29
|
+
clickUrl: ''
|
|
30
|
+
}, {
|
|
31
|
+
name: 'Account',
|
|
32
|
+
icon: '',
|
|
33
|
+
selectedIcon: '',
|
|
34
|
+
clickUrl: ''
|
|
35
|
+
}];
|
|
36
|
+
|
|
37
|
+
var getDefaultJSON = function getDefaultJSON() {
|
|
38
|
+
var groupId = (0, _uuid.v4)();
|
|
39
|
+
return {
|
|
40
|
+
id: groupId,
|
|
41
|
+
type: 'MENU_NAVIGATION',
|
|
42
|
+
groupSource: defaultMenuName.map(function (group) {
|
|
43
|
+
var itemId = (0, _uuid.v4)();
|
|
44
|
+
return {
|
|
45
|
+
id: itemId,
|
|
46
|
+
parentId: groupId,
|
|
47
|
+
type: group.name,
|
|
48
|
+
image: {
|
|
49
|
+
parentId: itemId,
|
|
50
|
+
id: (0, _uuid.v4)(),
|
|
51
|
+
open: true,
|
|
52
|
+
type: 'IMAGE',
|
|
53
|
+
content: {
|
|
54
|
+
h5Name: 'name2',
|
|
55
|
+
pcName: 'name2',
|
|
56
|
+
h5ImgSrc: '',
|
|
57
|
+
pcImgSrc: '',
|
|
58
|
+
clickUrl: ''
|
|
59
|
+
},
|
|
60
|
+
hover: {
|
|
61
|
+
open: true,
|
|
62
|
+
backgroundType: 'enlarge',
|
|
63
|
+
magnification: 1.5,
|
|
64
|
+
pcImgHoverUrl: '',
|
|
65
|
+
h5ImgHoverUrl: ''
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
}),
|
|
70
|
+
background: {
|
|
71
|
+
opacity: 100,
|
|
72
|
+
color: '#fff',
|
|
73
|
+
image: '',
|
|
74
|
+
bgType: 'color'
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
exports.getDefaultJSON = getDefaultJSON;
|
|
@@ -262,7 +262,7 @@ function (_super) {
|
|
|
262
262
|
_this.preContent = '';
|
|
263
263
|
_this.preSpacing = '';
|
|
264
264
|
_this._cache = (0, _coreUtil.isDesignMode)() ? {} : (0, _commonUtil.ensure)(function () {
|
|
265
|
-
return (0, _storeUtil.getMagicStore)("recommend_" + _this.props.panelProps.id);
|
|
265
|
+
return (0, _storeUtil.getMagicStore)("recommend_" + (window.magicDesign.pageId || '') + "_" + _this.props.panelProps.id);
|
|
266
266
|
}, {});
|
|
267
267
|
_this.state = __assign({
|
|
268
268
|
contentWidth: 0,
|
|
@@ -308,7 +308,7 @@ function (_super) {
|
|
|
308
308
|
|
|
309
309
|
_this.getProductList = function (index) {
|
|
310
310
|
return __awaiter(_this, void 0, void 0, function () {
|
|
311
|
-
var panelProps, groupSource, recommendId, cache, _a, _b, sourceType, _c, prodIds, _d, intelligentType, _e, intelligentValue, _f, maxProdNum, newData, res, res, e_1, _cache;
|
|
311
|
+
var panelProps, groupSource, recommendId, pageId, cache, _a, _b, sourceType, _c, prodIds, _d, intelligentType, _e, intelligentValue, _f, maxProdNum, newData, res, res, e_1, _cache;
|
|
312
312
|
|
|
313
313
|
var _g, _h, _j;
|
|
314
314
|
|
|
@@ -320,9 +320,10 @@ function (_super) {
|
|
|
320
320
|
panelProps = this.props.panelProps;
|
|
321
321
|
groupSource = this.state.groupSource;
|
|
322
322
|
recommendId = panelProps.id;
|
|
323
|
+
pageId = window.magicDesign.pageId || '';
|
|
323
324
|
|
|
324
325
|
if (!(0, _coreUtil.isDesignMode)()) {
|
|
325
|
-
cache = (0, _storeUtil.getMagicStore)("recommend_" + recommendId);
|
|
326
|
+
cache = (0, _storeUtil.getMagicStore)("recommend_" + pageId + "_" + recommendId);
|
|
326
327
|
|
|
327
328
|
if (cache) {
|
|
328
329
|
if ("products" + index in cache) {
|
|
@@ -422,8 +423,8 @@ function (_super) {
|
|
|
422
423
|
|
|
423
424
|
case 10:
|
|
424
425
|
if (!(0, _coreUtil.isDesignMode)()) {
|
|
425
|
-
_cache = (0, _storeUtil.getMagicStore)("recommend_" + recommendId);
|
|
426
|
-
(0, _storeUtil.setMagicStore)("recommend_" + recommendId, __assign(__assign({}, _cache), (_h = {}, _h["products" + index] = newData, _h.endTime = Date.now() + 3 * 60 * 1000, _h)));
|
|
426
|
+
_cache = (0, _storeUtil.getMagicStore)("recommend_" + pageId + "_" + recommendId);
|
|
427
|
+
(0, _storeUtil.setMagicStore)("recommend_" + pageId + "_" + recommendId, __assign(__assign({}, _cache), (_h = {}, _h["products" + index] = newData, _h.endTime = Date.now() + 3 * 60 * 1000, _h)));
|
|
427
428
|
}
|
|
428
429
|
|
|
429
430
|
this.setState((_j = {}, _j["products" + index] = newData, _j), function () {
|
|
@@ -245,7 +245,7 @@ function (_super) {
|
|
|
245
245
|
_this.preContent = '';
|
|
246
246
|
_this.preSpacing = '';
|
|
247
247
|
_this._cache = (0, _coreUtil.isDesignMode)() ? {} : (0, _commonUtil.ensure)(function () {
|
|
248
|
-
return (0, _storeUtil.getMagicStore)("recommend_" + _this.props.panelProps.id);
|
|
248
|
+
return (0, _storeUtil.getMagicStore)("recommend_" + (window.magicDesign.pageId || '') + "_" + _this.props.panelProps.id);
|
|
249
249
|
}, {});
|
|
250
250
|
_this.scrollRef = /*#__PURE__*/_react["default"].createRef();
|
|
251
251
|
_this.state = __assign({
|
|
@@ -303,7 +303,7 @@ function (_super) {
|
|
|
303
303
|
|
|
304
304
|
_this.getProductList = function (index) {
|
|
305
305
|
return __awaiter(_this, void 0, void 0, function () {
|
|
306
|
-
var panelProps, groupSource, recommendId, cache, _a, _b, sourceType, _c, prodIds, _d, intelligentType, _e, intelligentValue, _f, maxProdNum, newData, res, res, e_1, _cache;
|
|
306
|
+
var panelProps, groupSource, recommendId, pageId, cache, _a, _b, sourceType, _c, prodIds, _d, intelligentType, _e, intelligentValue, _f, maxProdNum, newData, res, res, e_1, _cache;
|
|
307
307
|
|
|
308
308
|
var _g, _h, _j;
|
|
309
309
|
|
|
@@ -315,9 +315,10 @@ function (_super) {
|
|
|
315
315
|
panelProps = this.props.panelProps;
|
|
316
316
|
groupSource = this.state.groupSource;
|
|
317
317
|
recommendId = panelProps.id;
|
|
318
|
+
pageId = window.magicDesign.pageId || '';
|
|
318
319
|
|
|
319
320
|
if (!(0, _coreUtil.isDesignMode)()) {
|
|
320
|
-
cache = (0, _storeUtil.getMagicStore)("recommend_" + recommendId);
|
|
321
|
+
cache = (0, _storeUtil.getMagicStore)("recommend_" + pageId + "_" + recommendId);
|
|
321
322
|
|
|
322
323
|
if (cache) {
|
|
323
324
|
if ("products" + index in cache) {
|
|
@@ -417,8 +418,8 @@ function (_super) {
|
|
|
417
418
|
|
|
418
419
|
case 10:
|
|
419
420
|
if (!(0, _coreUtil.isDesignMode)()) {
|
|
420
|
-
_cache = (0, _storeUtil.getMagicStore)("recommend_" + recommendId);
|
|
421
|
-
(0, _storeUtil.setMagicStore)("recommend_" + recommendId, __assign(__assign({}, _cache), (_h = {}, _h["products" + index] = newData, _h.endTime = Date.now() + 3 * 60 * 1000, _h)));
|
|
421
|
+
_cache = (0, _storeUtil.getMagicStore)("recommend_" + pageId + "_" + recommendId);
|
|
422
|
+
(0, _storeUtil.setMagicStore)("recommend_" + pageId + "_" + recommendId, __assign(__assign({}, _cache), (_h = {}, _h["products" + index] = newData, _h.endTime = Date.now() + 3 * 60 * 1000, _h)));
|
|
422
423
|
}
|
|
423
424
|
|
|
424
425
|
this.setState((_j = {}, _j["products" + index] = newData, _j), function () {
|