@fonixtree/magic-design 1.0.73 → 1.0.75
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/bol/components/Banner/mobile/index.js +4 -2
- package/es/composite-comp/dito/components/FlashDeal/mobile/index.js +8 -1
- package/es/composite-comp/dito/components/MobileNavigation/mobile/index.js +11 -0
- package/es/composite-comp/dito/components/Recommend/mobile/index.js +4 -2
- package/es/composite-comp/dito/components/SearchBar/mobile/index.js +13 -1
- package/es/composite-comp/dito/components/SignBoard/mobile/index.js +1 -1
- package/es/core/Renderer/index.js +27 -10
- package/lib/composite-comp/bol/components/Banner/mobile/index.js +4 -2
- package/lib/composite-comp/dito/components/FlashDeal/mobile/index.js +8 -1
- package/lib/composite-comp/dito/components/MobileNavigation/mobile/index.js +11 -0
- package/lib/composite-comp/dito/components/Recommend/mobile/index.js +4 -2
- package/lib/composite-comp/dito/components/SearchBar/mobile/index.js +13 -1
- package/lib/composite-comp/dito/components/SignBoard/mobile/index.js +1 -1
- package/lib/core/Renderer/index.js +27 -10
- package/package.json +1 -1
- package/es/assets/fonts/.DS_Store +0 -0
- package/lib/assets/fonts/.DS_Store +0 -0
|
@@ -13,6 +13,8 @@ var _antd = require("antd");
|
|
|
13
13
|
|
|
14
14
|
require("./index.less");
|
|
15
15
|
|
|
16
|
+
var _locale = require("../../../../../locale");
|
|
17
|
+
|
|
16
18
|
var _mobx = require("../../../../../mobx");
|
|
17
19
|
|
|
18
20
|
var _coreUtil = require("../../../../../utils/coreUtil");
|
|
@@ -212,8 +214,8 @@ function (_super) {
|
|
|
212
214
|
/** PTO 定制GA */
|
|
213
215
|
if (window.magicDesign.pushGA) {
|
|
214
216
|
window.magicDesign.pushGA({}, 'select_promotion', {
|
|
215
|
-
|
|
216
|
-
promotion_name: (0,
|
|
217
|
+
event_section: 'Banner',
|
|
218
|
+
promotion_name: item.image.content.h5ImgSrc ? item.image.content.h5Name : (0, _locale.i18n)('BANNER_GROUP_NAME')
|
|
217
219
|
});
|
|
218
220
|
}
|
|
219
221
|
},
|
|
@@ -423,7 +423,14 @@ function (_super) {
|
|
|
423
423
|
}) // onItemClick={() => clickUrl(`/product/detail/${item.offerId}?productId=${item.sppProductId ?? ''}`)}
|
|
424
424
|
,
|
|
425
425
|
onItemClick: function onItemClick() {
|
|
426
|
-
|
|
426
|
+
if (window.magicDesign.pushGA) {
|
|
427
|
+
window.magicDesign.pushGA({}, 'select_promotion', {
|
|
428
|
+
event_section: 'Flash Deal',
|
|
429
|
+
promotion_name: item === null || item === void 0 ? void 0 : item.offerName
|
|
430
|
+
});
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
(0, _coreUtil.clickUrl)("proDetail-" + item.offerId + "-" + (item.sppProductId || ''));
|
|
427
434
|
},
|
|
428
435
|
panelProps: panelProps.content,
|
|
429
436
|
unknownPrice: isWill
|
|
@@ -11,6 +11,8 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
11
11
|
|
|
12
12
|
require("./index.less");
|
|
13
13
|
|
|
14
|
+
var _locale = require("../../../../../locale");
|
|
15
|
+
|
|
14
16
|
var _components = require("../../../../../meta-comp/components");
|
|
15
17
|
|
|
16
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -100,6 +102,15 @@ function (_super) {
|
|
|
100
102
|
key: source.id,
|
|
101
103
|
className: "one-card" // className={data.groupSource.length > data.customize.rowNum ? 'one-card card-margin-bottom' : 'one-card'}
|
|
102
104
|
,
|
|
105
|
+
onClick: function onClick() {
|
|
106
|
+
/** PTO 定制GA */
|
|
107
|
+
if (window.magicDesign.pushGA) {
|
|
108
|
+
window.magicDesign.pushGA({}, 'select_promotion', {
|
|
109
|
+
event_section: 'Mobile Navigation',
|
|
110
|
+
promotion_name: source.image.content.h5ImgSrc ? source.image.content.h5Name : (0, _locale.i18n)('NAVIGATION_NAME')
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
},
|
|
103
114
|
style: _this.getCardStyle(source, i)
|
|
104
115
|
}, source.image.open && /*#__PURE__*/_react["default"].createElement("div", {
|
|
105
116
|
className: "card-image-wrap"
|
|
@@ -641,8 +641,10 @@ function (_super) {
|
|
|
641
641
|
onItemClick: function onItemClick() {
|
|
642
642
|
/** PTO 定制GA */
|
|
643
643
|
if (window.magicDesign.pushGA) {
|
|
644
|
-
window.magicDesign.pushGA(item, '
|
|
645
|
-
event_action: 'Select Item'
|
|
644
|
+
window.magicDesign.pushGA(item, 'GA_SENSOR_select_item', {
|
|
645
|
+
event_action: 'Select Item',
|
|
646
|
+
event_section: 'Recommend',
|
|
647
|
+
promotion_name: item === null || item === void 0 ? void 0 : item.offerName
|
|
646
648
|
});
|
|
647
649
|
}
|
|
648
650
|
|
|
@@ -344,7 +344,19 @@ function (_super) {
|
|
|
344
344
|
}), !!messageNum && /*#__PURE__*/_react["default"].createElement("span", {
|
|
345
345
|
className: "num"
|
|
346
346
|
}, messageNum))), data.content && ((_p = data.content.logo) === null || _p === void 0 ? void 0 : _p.open) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
347
|
-
className: "logo"
|
|
347
|
+
className: "logo",
|
|
348
|
+
onClick: function onClick() {
|
|
349
|
+
var _a, _b;
|
|
350
|
+
/** PTO 定制GA */
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
if (window.magicDesign.pushGA) {
|
|
354
|
+
window.magicDesign.pushGA({}, 'select_promotion', {
|
|
355
|
+
event_section: 'Search',
|
|
356
|
+
promotion_name: (_b = (_a = data.content.logo) === null || _a === void 0 ? void 0 : _a.content) === null || _b === void 0 ? void 0 : _b.h5Name
|
|
357
|
+
});
|
|
358
|
+
}
|
|
359
|
+
}
|
|
348
360
|
}, /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
|
|
349
361
|
data: data.content.logo,
|
|
350
362
|
style: {
|
|
@@ -387,7 +387,7 @@ function (_super) {
|
|
|
387
387
|
className: "store-info-wrap"
|
|
388
388
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
389
389
|
className: "number"
|
|
390
|
-
}, /*#__PURE__*/_react["default"].createElement("span", null, (storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.storeEvalValue) ? Number(storeInfo.storeEvalValue / 100).toFixed(1) : '5
|
|
390
|
+
}, /*#__PURE__*/_react["default"].createElement("span", null, (storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.storeEvalValue) ? Number(storeInfo.storeEvalValue / 100).toFixed(1) : '5.0', " "), /*#__PURE__*/_react["default"].createElement("img", {
|
|
391
391
|
alt: "star",
|
|
392
392
|
src: _star["default"]
|
|
393
393
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -86,19 +86,36 @@ var Renderer = function Renderer(props) {
|
|
|
86
86
|
var filterData = [];
|
|
87
87
|
|
|
88
88
|
if (pageData && pageData.childNodes && pageData.childNodes.length) {
|
|
89
|
+
var graduallySetFloors = function graduallySetFloors(data, step, interval, start) {
|
|
90
|
+
if (step === void 0) {
|
|
91
|
+
step = 5;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
if (interval === void 0) {
|
|
95
|
+
interval = 200;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
if (start === void 0) {
|
|
99
|
+
start = 0;
|
|
100
|
+
} // 计算这一步应该显示的最终索引
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
var end = Math.min(start + step, data.length); // 更新楼层数量
|
|
104
|
+
|
|
105
|
+
setFloors(data.slice(0, end)); // 如果还有更多楼层要显示,设置一个定时器来递归调用此函数
|
|
106
|
+
|
|
107
|
+
if (end < data.length) {
|
|
108
|
+
setTimeout(function () {
|
|
109
|
+
graduallySetFloors(data, step, interval, end);
|
|
110
|
+
}, interval);
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
|
|
89
114
|
filterData = pageData.childNodes.filter(function (node) {
|
|
90
115
|
return (0, _coreUtil.isActiveFloor)(node.activeTerminal);
|
|
91
116
|
});
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
setFloors(filterData.slice(0, 5));
|
|
96
|
-
setTimeout(function () {
|
|
97
|
-
setFloors(filterData.slice(0, 10));
|
|
98
|
-
setTimeout(function () {
|
|
99
|
-
setFloors(filterData);
|
|
100
|
-
}, 200);
|
|
101
|
-
}, 200);
|
|
117
|
+
graduallySetFloors(filterData);
|
|
118
|
+
}
|
|
102
119
|
}, [pageData]);
|
|
103
120
|
(0, _react.useEffect)(function () {
|
|
104
121
|
setTimeout(function () {
|
|
@@ -13,6 +13,8 @@ var _antd = require("antd");
|
|
|
13
13
|
|
|
14
14
|
require("./index.less");
|
|
15
15
|
|
|
16
|
+
var _locale = require("../../../../../locale");
|
|
17
|
+
|
|
16
18
|
var _mobx = require("../../../../../mobx");
|
|
17
19
|
|
|
18
20
|
var _coreUtil = require("../../../../../utils/coreUtil");
|
|
@@ -212,8 +214,8 @@ function (_super) {
|
|
|
212
214
|
/** PTO 定制GA */
|
|
213
215
|
if (window.magicDesign.pushGA) {
|
|
214
216
|
window.magicDesign.pushGA({}, 'select_promotion', {
|
|
215
|
-
|
|
216
|
-
promotion_name: (0,
|
|
217
|
+
event_section: 'Banner',
|
|
218
|
+
promotion_name: item.image.content.h5ImgSrc ? item.image.content.h5Name : (0, _locale.i18n)('BANNER_GROUP_NAME')
|
|
217
219
|
});
|
|
218
220
|
}
|
|
219
221
|
},
|
|
@@ -423,7 +423,14 @@ function (_super) {
|
|
|
423
423
|
}) // onItemClick={() => clickUrl(`/product/detail/${item.offerId}?productId=${item.sppProductId ?? ''}`)}
|
|
424
424
|
,
|
|
425
425
|
onItemClick: function onItemClick() {
|
|
426
|
-
|
|
426
|
+
if (window.magicDesign.pushGA) {
|
|
427
|
+
window.magicDesign.pushGA({}, 'select_promotion', {
|
|
428
|
+
event_section: 'Flash Deal',
|
|
429
|
+
promotion_name: item === null || item === void 0 ? void 0 : item.offerName
|
|
430
|
+
});
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
(0, _coreUtil.clickUrl)("proDetail-" + item.offerId + "-" + (item.sppProductId || ''));
|
|
427
434
|
},
|
|
428
435
|
panelProps: panelProps.content,
|
|
429
436
|
unknownPrice: isWill
|
|
@@ -11,6 +11,8 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
11
11
|
|
|
12
12
|
require("./index.less");
|
|
13
13
|
|
|
14
|
+
var _locale = require("../../../../../locale");
|
|
15
|
+
|
|
14
16
|
var _components = require("../../../../../meta-comp/components");
|
|
15
17
|
|
|
16
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -100,6 +102,15 @@ function (_super) {
|
|
|
100
102
|
key: source.id,
|
|
101
103
|
className: "one-card" // className={data.groupSource.length > data.customize.rowNum ? 'one-card card-margin-bottom' : 'one-card'}
|
|
102
104
|
,
|
|
105
|
+
onClick: function onClick() {
|
|
106
|
+
/** PTO 定制GA */
|
|
107
|
+
if (window.magicDesign.pushGA) {
|
|
108
|
+
window.magicDesign.pushGA({}, 'select_promotion', {
|
|
109
|
+
event_section: 'Mobile Navigation',
|
|
110
|
+
promotion_name: source.image.content.h5ImgSrc ? source.image.content.h5Name : (0, _locale.i18n)('NAVIGATION_NAME')
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
},
|
|
103
114
|
style: _this.getCardStyle(source, i)
|
|
104
115
|
}, source.image.open && /*#__PURE__*/_react["default"].createElement("div", {
|
|
105
116
|
className: "card-image-wrap"
|
|
@@ -641,8 +641,10 @@ function (_super) {
|
|
|
641
641
|
onItemClick: function onItemClick() {
|
|
642
642
|
/** PTO 定制GA */
|
|
643
643
|
if (window.magicDesign.pushGA) {
|
|
644
|
-
window.magicDesign.pushGA(item, '
|
|
645
|
-
event_action: 'Select Item'
|
|
644
|
+
window.magicDesign.pushGA(item, 'GA_SENSOR_select_item', {
|
|
645
|
+
event_action: 'Select Item',
|
|
646
|
+
event_section: 'Recommend',
|
|
647
|
+
promotion_name: item === null || item === void 0 ? void 0 : item.offerName
|
|
646
648
|
});
|
|
647
649
|
}
|
|
648
650
|
|
|
@@ -344,7 +344,19 @@ function (_super) {
|
|
|
344
344
|
}), !!messageNum && /*#__PURE__*/_react["default"].createElement("span", {
|
|
345
345
|
className: "num"
|
|
346
346
|
}, messageNum))), data.content && ((_p = data.content.logo) === null || _p === void 0 ? void 0 : _p.open) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
347
|
-
className: "logo"
|
|
347
|
+
className: "logo",
|
|
348
|
+
onClick: function onClick() {
|
|
349
|
+
var _a, _b;
|
|
350
|
+
/** PTO 定制GA */
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
if (window.magicDesign.pushGA) {
|
|
354
|
+
window.magicDesign.pushGA({}, 'select_promotion', {
|
|
355
|
+
event_section: 'Search',
|
|
356
|
+
promotion_name: (_b = (_a = data.content.logo) === null || _a === void 0 ? void 0 : _a.content) === null || _b === void 0 ? void 0 : _b.h5Name
|
|
357
|
+
});
|
|
358
|
+
}
|
|
359
|
+
}
|
|
348
360
|
}, /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
|
|
349
361
|
data: data.content.logo,
|
|
350
362
|
style: {
|
|
@@ -387,7 +387,7 @@ function (_super) {
|
|
|
387
387
|
className: "store-info-wrap"
|
|
388
388
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
389
389
|
className: "number"
|
|
390
|
-
}, /*#__PURE__*/_react["default"].createElement("span", null, (storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.storeEvalValue) ? Number(storeInfo.storeEvalValue / 100).toFixed(1) : '5
|
|
390
|
+
}, /*#__PURE__*/_react["default"].createElement("span", null, (storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.storeEvalValue) ? Number(storeInfo.storeEvalValue / 100).toFixed(1) : '5.0', " "), /*#__PURE__*/_react["default"].createElement("img", {
|
|
391
391
|
alt: "star",
|
|
392
392
|
src: _star["default"]
|
|
393
393
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -86,19 +86,36 @@ var Renderer = function Renderer(props) {
|
|
|
86
86
|
var filterData = [];
|
|
87
87
|
|
|
88
88
|
if (pageData && pageData.childNodes && pageData.childNodes.length) {
|
|
89
|
+
var graduallySetFloors = function graduallySetFloors(data, step, interval, start) {
|
|
90
|
+
if (step === void 0) {
|
|
91
|
+
step = 5;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
if (interval === void 0) {
|
|
95
|
+
interval = 200;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
if (start === void 0) {
|
|
99
|
+
start = 0;
|
|
100
|
+
} // 计算这一步应该显示的最终索引
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
var end = Math.min(start + step, data.length); // 更新楼层数量
|
|
104
|
+
|
|
105
|
+
setFloors(data.slice(0, end)); // 如果还有更多楼层要显示,设置一个定时器来递归调用此函数
|
|
106
|
+
|
|
107
|
+
if (end < data.length) {
|
|
108
|
+
setTimeout(function () {
|
|
109
|
+
graduallySetFloors(data, step, interval, end);
|
|
110
|
+
}, interval);
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
|
|
89
114
|
filterData = pageData.childNodes.filter(function (node) {
|
|
90
115
|
return (0, _coreUtil.isActiveFloor)(node.activeTerminal);
|
|
91
116
|
});
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
setFloors(filterData.slice(0, 5));
|
|
96
|
-
setTimeout(function () {
|
|
97
|
-
setFloors(filterData.slice(0, 10));
|
|
98
|
-
setTimeout(function () {
|
|
99
|
-
setFloors(filterData);
|
|
100
|
-
}, 200);
|
|
101
|
-
}, 200);
|
|
117
|
+
graduallySetFloors(filterData);
|
|
118
|
+
}
|
|
102
119
|
}, [pageData]);
|
|
103
120
|
(0, _react.useEffect)(function () {
|
|
104
121
|
setTimeout(function () {
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|