@fonixtree/magic-design 1.0.133 → 1.0.135
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/less/global.less +4 -0
- package/es/common/LinkModal/ProductList/index.js +484 -0
- package/es/common/LinkModal/ProductList/index.less +130 -0
- package/es/common/LinkModal/index.js +8 -1
- package/es/common/UrlPicker/index.js +1 -1
- package/es/composite-comp/dito/components/GroupedCarousel/defaultJSON.js +6 -0
- package/es/composite-comp/dito/components/SearchDITO/pc/components/VideoItem/index.js +7 -7
- package/es/composite-comp/dito/components/SearchDITO/pc/index.js +25 -33
- package/es/composite-comp/dito/components/SearchDITO/pc/index.less +5 -0
- package/es/composite-comp/dito/components/SlideImage/defaultJSON.js +1 -1
- package/es/composite-comp/dito/components/SlideImage/pc/components/CardItem/index.js +11 -8
- package/es/composite-comp/dito/components/SlideImage/pc/components/CardItem/index.less +3 -1
- package/es/composite-comp/dito/components/SlideImage/pc/components/ParallaxScroll/index.js +5 -1
- package/es/composite-comp/dito/components/SlideImage/pc/components/ProductCardModal/imgs/dot-icon.png +0 -0
- package/es/composite-comp/dito/components/SlideImage/pc/components/ProductCardModal/index.js +179 -0
- package/es/composite-comp/dito/components/SlideImage/pc/components/ProductCardModal/index.less +106 -0
- package/es/composite-comp/dito/components/SlideImage/pc/components/VideoItem/index.js +19 -34
- package/es/composite-comp/dito/components/SlideImage/pc/index.js +212 -1
- package/es/composite-comp/dito/config-panels/GroupedCarouselConfig/index.js +8 -0
- package/es/composite-comp/dito/second-config-panels/SlideImageSecondConfig/index.js +10 -117
- package/es/constants/index.js +2 -1
- package/es/core/Designer/index.js +5 -2
- package/es/utils/businessUtil.js +11 -0
- package/lib/assets/less/global.less +4 -0
- package/lib/common/LinkModal/ProductList/index.js +484 -0
- package/lib/common/LinkModal/ProductList/index.less +130 -0
- package/lib/common/LinkModal/index.js +8 -1
- package/lib/common/UrlPicker/index.js +1 -1
- package/lib/composite-comp/dito/components/GroupedCarousel/defaultJSON.js +6 -0
- package/lib/composite-comp/dito/components/SearchDITO/pc/components/VideoItem/index.js +7 -7
- package/lib/composite-comp/dito/components/SearchDITO/pc/index.js +25 -33
- package/lib/composite-comp/dito/components/SearchDITO/pc/index.less +5 -0
- package/lib/composite-comp/dito/components/SlideImage/defaultJSON.js +1 -1
- package/lib/composite-comp/dito/components/SlideImage/pc/components/CardItem/index.js +11 -8
- package/lib/composite-comp/dito/components/SlideImage/pc/components/CardItem/index.less +3 -1
- package/lib/composite-comp/dito/components/SlideImage/pc/components/ParallaxScroll/index.js +5 -1
- package/lib/composite-comp/dito/components/SlideImage/pc/components/ProductCardModal/imgs/dot-icon.png +0 -0
- package/lib/composite-comp/dito/components/SlideImage/pc/components/ProductCardModal/index.js +179 -0
- package/lib/composite-comp/dito/components/SlideImage/pc/components/ProductCardModal/index.less +106 -0
- package/lib/composite-comp/dito/components/SlideImage/pc/components/VideoItem/index.js +19 -34
- package/lib/composite-comp/dito/components/SlideImage/pc/index.js +212 -1
- package/lib/composite-comp/dito/config-panels/GroupedCarouselConfig/index.js +8 -0
- package/lib/composite-comp/dito/second-config-panels/SlideImageSecondConfig/index.js +10 -117
- package/lib/constants/index.js +2 -1
- package/lib/core/Designer/index.js +5 -2
- package/lib/utils/businessUtil.js +11 -0
- package/package.json +1 -1
|
@@ -213,7 +213,7 @@ function (_super) {
|
|
|
213
213
|
catgList: [],
|
|
214
214
|
catgChildList: [],
|
|
215
215
|
activeCatgId: null,
|
|
216
|
-
|
|
216
|
+
catgImg: '',
|
|
217
217
|
visible: false,
|
|
218
218
|
relativeLeft: 0
|
|
219
219
|
};
|
|
@@ -275,6 +275,7 @@ function (_super) {
|
|
|
275
275
|
relativeLeft = childRect.left - parentRect.left;
|
|
276
276
|
this.setState({
|
|
277
277
|
activeCatgId: model.catgId,
|
|
278
|
+
catgImg: model.imgUrl,
|
|
278
279
|
visible: true,
|
|
279
280
|
relativeLeft: relativeLeft
|
|
280
281
|
});
|
|
@@ -296,6 +297,7 @@ function (_super) {
|
|
|
296
297
|
case 2:
|
|
297
298
|
this.setState({
|
|
298
299
|
activeCatgId: null,
|
|
300
|
+
catgImg: '',
|
|
299
301
|
visible: false,
|
|
300
302
|
relativeLeft: 0
|
|
301
303
|
});
|
|
@@ -317,25 +319,6 @@ function (_super) {
|
|
|
317
319
|
}
|
|
318
320
|
});
|
|
319
321
|
});
|
|
320
|
-
};
|
|
321
|
-
|
|
322
|
-
_this.keyDoFunc = function (data) {
|
|
323
|
-
data.groupSource.forEach(function (group) {
|
|
324
|
-
group.newProperty = 'freshKey'; // Reflect.deleteProperty(group, 'text');
|
|
325
|
-
// Reflect.deleteProperty(group, 'title');
|
|
326
|
-
});
|
|
327
|
-
};
|
|
328
|
-
|
|
329
|
-
_this.onMouseEnter = function (item) {
|
|
330
|
-
_this.setState({
|
|
331
|
-
catgChildImg: item.model.imgUrl
|
|
332
|
-
});
|
|
333
|
-
};
|
|
334
|
-
|
|
335
|
-
_this.onMouseLeave = function () {
|
|
336
|
-
_this.setState({
|
|
337
|
-
catgChildImg: ''
|
|
338
|
-
});
|
|
339
322
|
}; // 跳转配置
|
|
340
323
|
|
|
341
324
|
|
|
@@ -399,6 +382,20 @@ function (_super) {
|
|
|
399
382
|
(0, _coreUtil.clickUrl)(jumpUrl);
|
|
400
383
|
};
|
|
401
384
|
|
|
385
|
+
_this.getRealIndex = function (rawIndex, total) {
|
|
386
|
+
if (rawIndex === 0) return total - 1; // 第一个克隆页对应最后一个真实项
|
|
387
|
+
|
|
388
|
+
if (rawIndex === total + 1) return 0; // 最后一个克隆页对应第一个真实项
|
|
389
|
+
|
|
390
|
+
return rawIndex - 1; // 中间项索引-1得到真实索引
|
|
391
|
+
};
|
|
392
|
+
|
|
393
|
+
_this.afterChange = function (n) {
|
|
394
|
+
_this.setState({
|
|
395
|
+
carouseIndex: n
|
|
396
|
+
});
|
|
397
|
+
};
|
|
398
|
+
|
|
402
399
|
return _this;
|
|
403
400
|
}
|
|
404
401
|
|
|
@@ -442,7 +439,7 @@ function (_super) {
|
|
|
442
439
|
activeCatgId = _s.activeCatgId,
|
|
443
440
|
visible = _s.visible,
|
|
444
441
|
relativeLeft = _s.relativeLeft,
|
|
445
|
-
|
|
442
|
+
catgImg = _s.catgImg;
|
|
446
443
|
var autoplay = data.setting.autoplay.open;
|
|
447
444
|
/** 设计器模式下 如果选中特定group 自动播放关闭 */
|
|
448
445
|
|
|
@@ -497,11 +494,7 @@ function (_super) {
|
|
|
497
494
|
key: m.model.catgId,
|
|
498
495
|
onClick: function onClick() {
|
|
499
496
|
return _this.jumpUrlConfig(m.model.catgRela);
|
|
500
|
-
}
|
|
501
|
-
onMouseEnter: function onMouseEnter() {
|
|
502
|
-
return _this.onMouseEnter(m);
|
|
503
|
-
},
|
|
504
|
-
onMouseLeave: _this.onMouseLeave
|
|
497
|
+
}
|
|
505
498
|
}, /*#__PURE__*/_react["default"].createElement("div", null, m.model.catgName), /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
506
499
|
className: "icon_right",
|
|
507
500
|
color: "#CE1126",
|
|
@@ -510,7 +503,7 @@ function (_super) {
|
|
|
510
503
|
}));
|
|
511
504
|
})), /*#__PURE__*/_react["default"].createElement("img", {
|
|
512
505
|
alt: "",
|
|
513
|
-
src:
|
|
506
|
+
src: catgImg
|
|
514
507
|
}))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
515
508
|
className: "right"
|
|
516
509
|
}, ((_f = (_e = (_d = data.content) === null || _d === void 0 ? void 0 : _d.icon) === null || _e === void 0 ? void 0 : _e.searchIcon) === null || _f === void 0 ? void 0 : _f.pc) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -537,15 +530,14 @@ function (_super) {
|
|
|
537
530
|
key: JSON.stringify(data.groupSource),
|
|
538
531
|
ref: this.carouselRef,
|
|
539
532
|
afterChange: function afterChange(n) {
|
|
540
|
-
return _this.
|
|
541
|
-
carouseIndex: n
|
|
542
|
-
});
|
|
533
|
+
return _this.afterChange(n);
|
|
543
534
|
},
|
|
544
535
|
autoplay: autoplay,
|
|
545
536
|
autoplaySpeed: data.setting.autoplay.interval * 1000,
|
|
546
537
|
className: "carousel-img",
|
|
547
|
-
dots: false
|
|
548
|
-
|
|
538
|
+
dots: false,
|
|
539
|
+
infinite: false
|
|
540
|
+
}, data.groupSource.map(function (m, i) {
|
|
549
541
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
550
542
|
key: m.id
|
|
551
543
|
}, m.image && m.image.open && /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
|
|
@@ -553,7 +545,7 @@ function (_super) {
|
|
|
553
545
|
data: m.image,
|
|
554
546
|
imgCover: true,
|
|
555
547
|
isBackground: true
|
|
556
|
-
}), m.video && /*#__PURE__*/_react["default"].createElement(_VideoItem["default"], {
|
|
548
|
+
}), m.video && i === carouseIndex && /*#__PURE__*/_react["default"].createElement(_VideoItem["default"], {
|
|
557
549
|
data: m
|
|
558
550
|
}));
|
|
559
551
|
})), data.setting.dots.open && /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
.m-search-dito-pc {
|
|
2
2
|
position: relative;
|
|
3
3
|
width: 100%;
|
|
4
|
+
background-color: #fff;
|
|
4
5
|
|
|
5
6
|
.search-bar {
|
|
6
7
|
display: block;
|
|
@@ -120,6 +121,10 @@
|
|
|
120
121
|
display: flex;
|
|
121
122
|
gap: 15px;
|
|
122
123
|
align-items: center;
|
|
124
|
+
|
|
125
|
+
.icon-wrap {
|
|
126
|
+
cursor: pointer;
|
|
127
|
+
}
|
|
123
128
|
}
|
|
124
129
|
}
|
|
125
130
|
|
|
@@ -77,7 +77,7 @@ var getDefaultJSON = function getDefaultJSON() {
|
|
|
77
77
|
return {
|
|
78
78
|
id: groupId,
|
|
79
79
|
type: 'SLIDE_IMAGE',
|
|
80
|
-
groupSource: [groupSourceJSON(groupId), groupSourceJSON(groupId), groupSourceJSON(groupId)
|
|
80
|
+
groupSource: [groupSourceJSON(groupId), groupSourceJSON(groupId), groupSourceJSON(groupId)],
|
|
81
81
|
spacing: {
|
|
82
82
|
pc: {
|
|
83
83
|
paddingTop: 0,
|
|
@@ -64,10 +64,7 @@ function (_super) {
|
|
|
64
64
|
__extends(CardItem, _super);
|
|
65
65
|
|
|
66
66
|
function CardItem() {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
_this.state = {};
|
|
70
|
-
return _this;
|
|
67
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
71
68
|
}
|
|
72
69
|
|
|
73
70
|
CardItem.prototype.componentDidMount = function () {};
|
|
@@ -75,15 +72,21 @@ function (_super) {
|
|
|
75
72
|
CardItem.prototype.render = function () {
|
|
76
73
|
var _a = this.props,
|
|
77
74
|
data = _a.data,
|
|
78
|
-
|
|
75
|
+
createModal = _a.createModal,
|
|
76
|
+
rest = __rest(_a, ["data", "createModal"]);
|
|
77
|
+
|
|
78
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", _extends({
|
|
79
|
+
className: (0, _classnames["default"])('slide-image-card-item-wrap'),
|
|
80
|
+
onClick: function onClick() {
|
|
81
|
+
var _a;
|
|
79
82
|
|
|
80
|
-
|
|
81
|
-
|
|
83
|
+
return createModal(((_a = data.groupName.content.clickUrl) === null || _a === void 0 ? void 0 : _a.value) || []);
|
|
84
|
+
}
|
|
82
85
|
}, rest), /*#__PURE__*/_react["default"].createElement(_VideoItem["default"], {
|
|
83
86
|
data: data
|
|
84
87
|
}), data.groupName.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
85
88
|
data: data.groupName
|
|
86
|
-
}));
|
|
89
|
+
})));
|
|
87
90
|
};
|
|
88
91
|
|
|
89
92
|
CardItem.defaultProps = {
|
|
@@ -26,7 +26,8 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
26
26
|
function ParallaxScroll(_a) {
|
|
27
27
|
var source = _a.source,
|
|
28
28
|
xGap = _a.xGap,
|
|
29
|
-
yGap = _a.yGap
|
|
29
|
+
yGap = _a.yGap,
|
|
30
|
+
createModal = _a.createModal;
|
|
30
31
|
|
|
31
32
|
var _b = (0, _react.useState)(0),
|
|
32
33
|
colOneScrollY = _b[0],
|
|
@@ -104,6 +105,7 @@ function ParallaxScroll(_a) {
|
|
|
104
105
|
y: translateFirst
|
|
105
106
|
}
|
|
106
107
|
}, /*#__PURE__*/_react["default"].createElement(_CardItem["default"], {
|
|
108
|
+
createModal: createModal,
|
|
107
109
|
data: el
|
|
108
110
|
}));
|
|
109
111
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -119,6 +121,7 @@ function ParallaxScroll(_a) {
|
|
|
119
121
|
y: translateSecond
|
|
120
122
|
}
|
|
121
123
|
}, /*#__PURE__*/_react["default"].createElement(_CardItem["default"], {
|
|
124
|
+
createModal: createModal,
|
|
122
125
|
data: el
|
|
123
126
|
}));
|
|
124
127
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -134,6 +137,7 @@ function ParallaxScroll(_a) {
|
|
|
134
137
|
y: translateThird
|
|
135
138
|
}
|
|
136
139
|
}, /*#__PURE__*/_react["default"].createElement(_CardItem["default"], {
|
|
140
|
+
createModal: createModal,
|
|
137
141
|
data: el
|
|
138
142
|
}));
|
|
139
143
|
}))));
|
|
Binary file
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = ProductCardModal;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _framerMotion = require("framer-motion");
|
|
13
|
+
|
|
14
|
+
var _dotIcon = _interopRequireDefault(require("./imgs/dot-icon.png"));
|
|
15
|
+
|
|
16
|
+
var _common = require("../../../../../../../common");
|
|
17
|
+
|
|
18
|
+
require("./index.less");
|
|
19
|
+
|
|
20
|
+
var _coreUtil = require("../../../../../../../utils/coreUtil");
|
|
21
|
+
|
|
22
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
23
|
+
|
|
24
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25
|
+
|
|
26
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
|
+
|
|
28
|
+
function ProductCardModal(_a) {
|
|
29
|
+
var _b = _a.data,
|
|
30
|
+
data = _b === void 0 ? [] : _b,
|
|
31
|
+
onClose = _a.onClose,
|
|
32
|
+
_c = _a.autoplay,
|
|
33
|
+
autoplay = _c === void 0 ? false : _c;
|
|
34
|
+
|
|
35
|
+
var _d = (0, _react.useState)(0),
|
|
36
|
+
active = _d[0],
|
|
37
|
+
setActive = _d[1];
|
|
38
|
+
|
|
39
|
+
var _e = (0, _react.useState)(true),
|
|
40
|
+
loading = _e[0],
|
|
41
|
+
setLoading = _e[1];
|
|
42
|
+
|
|
43
|
+
var handleNext = function handleNext(e) {
|
|
44
|
+
e.stopPropagation();
|
|
45
|
+
setActive(function (prev) {
|
|
46
|
+
return (prev + 1) % data.length;
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
var handlePrev = function handlePrev(e) {
|
|
51
|
+
e.stopPropagation();
|
|
52
|
+
setActive(function (prev) {
|
|
53
|
+
return (prev - 1 + data.length) % data.length;
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
var isActive = function isActive(index) {
|
|
58
|
+
return index === active;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
var randomRotateY = function randomRotateY() {
|
|
62
|
+
return Math.floor(Math.random() * 21) - 10;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
(0, _react.useEffect)(function () {
|
|
66
|
+
if (autoplay) {
|
|
67
|
+
var interval_1 = setInterval(handleNext, 5000);
|
|
68
|
+
return function () {
|
|
69
|
+
return clearInterval(interval_1);
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
}, [autoplay]);
|
|
73
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
74
|
+
className: "productCardModalWrap",
|
|
75
|
+
onClick: onClose
|
|
76
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
77
|
+
className: "content",
|
|
78
|
+
onClick: function onClick(e) {
|
|
79
|
+
return e.stopPropagation();
|
|
80
|
+
}
|
|
81
|
+
}, /*#__PURE__*/_react["default"].createElement(_framerMotion.AnimatePresence, null, data.map(function (item, index) {
|
|
82
|
+
return /*#__PURE__*/_react["default"].createElement(_framerMotion.motion.div, {
|
|
83
|
+
key: item.offerId,
|
|
84
|
+
animate: {
|
|
85
|
+
opacity: isActive(index) ? 1 : 0.7,
|
|
86
|
+
scale: isActive(index) ? 1 : 0.95,
|
|
87
|
+
z: isActive(index) ? 0 : -100,
|
|
88
|
+
rotate: isActive(index) ? 0 : randomRotateY(),
|
|
89
|
+
zIndex: isActive(index) ? 999 : data.length + 2 - index,
|
|
90
|
+
y: isActive(index) ? [0, -80, 0] : 0
|
|
91
|
+
},
|
|
92
|
+
className: "card",
|
|
93
|
+
exit: {
|
|
94
|
+
opacity: 0,
|
|
95
|
+
scale: 0.9,
|
|
96
|
+
z: 100,
|
|
97
|
+
rotate: randomRotateY()
|
|
98
|
+
},
|
|
99
|
+
initial: {
|
|
100
|
+
opacity: 0,
|
|
101
|
+
scale: 0.9,
|
|
102
|
+
z: -100,
|
|
103
|
+
rotate: randomRotateY()
|
|
104
|
+
},
|
|
105
|
+
transition: {
|
|
106
|
+
duration: 0.4,
|
|
107
|
+
ease: 'easeInOut'
|
|
108
|
+
}
|
|
109
|
+
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
110
|
+
alt: "",
|
|
111
|
+
className: "bgImg",
|
|
112
|
+
draggable: false,
|
|
113
|
+
onLoad: function onLoad() {
|
|
114
|
+
return setLoading(false);
|
|
115
|
+
},
|
|
116
|
+
src: item.imgUrl
|
|
117
|
+
}), !loading && /*#__PURE__*/_react["default"].createElement("div", {
|
|
118
|
+
className: "absoluteWrap"
|
|
119
|
+
}, /*#__PURE__*/_react["default"].createElement(_framerMotion.motion.div, {
|
|
120
|
+
key: active,
|
|
121
|
+
animate: {
|
|
122
|
+
y: 0,
|
|
123
|
+
opacity: 1
|
|
124
|
+
},
|
|
125
|
+
className: "text",
|
|
126
|
+
exit: {
|
|
127
|
+
y: -20,
|
|
128
|
+
opacity: 0
|
|
129
|
+
},
|
|
130
|
+
initial: {
|
|
131
|
+
y: 20,
|
|
132
|
+
opacity: 0
|
|
133
|
+
},
|
|
134
|
+
transition: {
|
|
135
|
+
duration: 0.2,
|
|
136
|
+
ease: 'easeInOut'
|
|
137
|
+
}
|
|
138
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
139
|
+
dangerouslySetInnerHTML: {
|
|
140
|
+
__html: item.goodsIntroduce
|
|
141
|
+
}
|
|
142
|
+
})), index === active && /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
143
|
+
className: "closIcon",
|
|
144
|
+
color: "#929292",
|
|
145
|
+
onClick: onClose,
|
|
146
|
+
size: 22,
|
|
147
|
+
type: "icon-close"
|
|
148
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
149
|
+
className: "btnApply",
|
|
150
|
+
onClick: function onClick() {
|
|
151
|
+
return (0, _coreUtil.clickUrl)("proDetail-" + item.offerId + "-" + item.productId);
|
|
152
|
+
}
|
|
153
|
+
}, "Apply Now", /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
154
|
+
color: "#FCD116",
|
|
155
|
+
size: 20,
|
|
156
|
+
type: "icon-arrow-right"
|
|
157
|
+
})), index === active && /*#__PURE__*/_react["default"].createElement("img", {
|
|
158
|
+
alt: "",
|
|
159
|
+
className: "dotIcon",
|
|
160
|
+
src: _dotIcon["default"]
|
|
161
|
+
})));
|
|
162
|
+
}))), /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
163
|
+
className: "iconLeft",
|
|
164
|
+
color: "#929292",
|
|
165
|
+
onClick: function onClick(e) {
|
|
166
|
+
return handlePrev(e);
|
|
167
|
+
},
|
|
168
|
+
size: 36,
|
|
169
|
+
type: "icon-circle-down"
|
|
170
|
+
}), /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
171
|
+
className: "iconRight",
|
|
172
|
+
color: "#929292",
|
|
173
|
+
onClick: function onClick(e) {
|
|
174
|
+
return handleNext(e);
|
|
175
|
+
},
|
|
176
|
+
size: 36,
|
|
177
|
+
type: "icon-circle-down"
|
|
178
|
+
}));
|
|
179
|
+
}
|
package/lib/composite-comp/dito/components/SlideImage/pc/components/ProductCardModal/index.less
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
.productCardModalWrap {
|
|
2
|
+
background: rgba(0, 0, 0, 0.9);
|
|
3
|
+
position: fixed;
|
|
4
|
+
z-index: 1000;
|
|
5
|
+
top: 0;
|
|
6
|
+
bottom: 0;
|
|
7
|
+
left: 0;
|
|
8
|
+
right: 0;
|
|
9
|
+
width: 100vw;
|
|
10
|
+
height: 100vh;
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
|
|
15
|
+
.content {
|
|
16
|
+
position: relative;
|
|
17
|
+
width: 60%;
|
|
18
|
+
|
|
19
|
+
.card {
|
|
20
|
+
transform-origin: bottom;
|
|
21
|
+
inset: 0;
|
|
22
|
+
width: 100%;
|
|
23
|
+
height: fit-content;
|
|
24
|
+
position: absolute;
|
|
25
|
+
top: 0;
|
|
26
|
+
bottom: 0;
|
|
27
|
+
margin: auto;
|
|
28
|
+
|
|
29
|
+
.bgImg {
|
|
30
|
+
display: block;
|
|
31
|
+
width: 100%;
|
|
32
|
+
height: auto;
|
|
33
|
+
border-radius: 1.5rem;
|
|
34
|
+
-o-object-position: center;
|
|
35
|
+
object-position: center;
|
|
36
|
+
-o-object-fit: cover;
|
|
37
|
+
object-fit: cover;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.closIcon {
|
|
41
|
+
position: absolute;
|
|
42
|
+
top: 5%;
|
|
43
|
+
right: 5%;
|
|
44
|
+
cursor: pointer;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.dotIcon {
|
|
48
|
+
width: 28px;
|
|
49
|
+
position: absolute;
|
|
50
|
+
bottom: 25px;
|
|
51
|
+
left: 0;
|
|
52
|
+
right: 0;
|
|
53
|
+
margin: auto;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.text {
|
|
57
|
+
position: absolute;
|
|
58
|
+
top: 20%;
|
|
59
|
+
right: 10%;
|
|
60
|
+
width: 35%;
|
|
61
|
+
height: 42%;
|
|
62
|
+
overflow-y: auto;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.btnApply {
|
|
66
|
+
color: #fff;
|
|
67
|
+
background-color: #CE1126;
|
|
68
|
+
font-weight: 700;
|
|
69
|
+
font-size: .3rem;
|
|
70
|
+
width: fit-content;
|
|
71
|
+
padding: 10px 24px;
|
|
72
|
+
border-radius: 100px;
|
|
73
|
+
display: flex;
|
|
74
|
+
align-items: center;
|
|
75
|
+
justify-content: center;
|
|
76
|
+
gap: 8px;
|
|
77
|
+
position: absolute;
|
|
78
|
+
bottom: 25%;
|
|
79
|
+
left: 55%;
|
|
80
|
+
cursor: pointer;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.iconLeft {
|
|
86
|
+
transform: rotate(90deg);
|
|
87
|
+
cursor: pointer;
|
|
88
|
+
position: absolute;
|
|
89
|
+
left: 8%;
|
|
90
|
+
top: 0;
|
|
91
|
+
bottom: 0;
|
|
92
|
+
margin: auto;
|
|
93
|
+
align-self: center;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.iconRight {
|
|
97
|
+
transform: rotate(-90deg);
|
|
98
|
+
cursor: pointer;
|
|
99
|
+
position: absolute;
|
|
100
|
+
right: 8%;
|
|
101
|
+
top: 0;
|
|
102
|
+
bottom: 0;
|
|
103
|
+
margin: auto;
|
|
104
|
+
align-self: center;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
@@ -7,7 +7,7 @@ exports["default"] = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _NewImg = _interopRequireDefault(require("../../../../../../../common/NewImg"));
|
|
11
11
|
|
|
12
12
|
require("./index.less");
|
|
13
13
|
|
|
@@ -39,41 +39,18 @@ var __extends = void 0 && (void 0).__extends || function () {
|
|
|
39
39
|
};
|
|
40
40
|
}();
|
|
41
41
|
|
|
42
|
-
var
|
|
42
|
+
var VideoItem =
|
|
43
43
|
/** @class */
|
|
44
44
|
function (_super) {
|
|
45
|
-
__extends(
|
|
45
|
+
__extends(VideoItem, _super);
|
|
46
46
|
|
|
47
|
-
function
|
|
47
|
+
function VideoItem() {
|
|
48
48
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
49
49
|
|
|
50
50
|
_this.state = {
|
|
51
51
|
playing: false
|
|
52
52
|
};
|
|
53
53
|
_this.videoRef = /*#__PURE__*/_react["default"].createRef();
|
|
54
|
-
/** 视频ref映射 */
|
|
55
|
-
|
|
56
|
-
_this.videoRefMap = {};
|
|
57
|
-
|
|
58
|
-
_this.playOrPause = function (group) {
|
|
59
|
-
(0, _commonUtil.ensure)(function () {
|
|
60
|
-
if (_this.videoRefMap[group.id].playing) {
|
|
61
|
-
_this.videoRefMap[group.id].playing = false;
|
|
62
|
-
|
|
63
|
-
_this.videoRefMap[group.id].el.player.pause();
|
|
64
|
-
} else {
|
|
65
|
-
if (group.video.playPosition == 'Popup') {
|
|
66
|
-
_this.videoRefMap[group.id].el.fullPlay('pc');
|
|
67
|
-
} else {
|
|
68
|
-
_this.videoRefMap[group.id].playing = true;
|
|
69
|
-
|
|
70
|
-
_this.videoRefMap[group.id].el.player.play();
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
_this.setState({});
|
|
75
|
-
});
|
|
76
|
-
};
|
|
77
54
|
|
|
78
55
|
_this.onMouseEnter = function () {
|
|
79
56
|
_this.videoRef.current.play();
|
|
@@ -94,7 +71,7 @@ function (_super) {
|
|
|
94
71
|
return _this;
|
|
95
72
|
}
|
|
96
73
|
|
|
97
|
-
|
|
74
|
+
VideoItem.prototype.render = function () {
|
|
98
75
|
var _a, _b, _c, _d, _e;
|
|
99
76
|
|
|
100
77
|
var data = this.props.data;
|
|
@@ -105,17 +82,25 @@ function (_super) {
|
|
|
105
82
|
onMouseLeave: this.onMouseLeave
|
|
106
83
|
}, ((_a = data.video) === null || _a === void 0 ? void 0 : _a.sourceUrl) && /*#__PURE__*/_react["default"].createElement("video", {
|
|
107
84
|
ref: this.videoRef,
|
|
108
|
-
|
|
109
|
-
|
|
85
|
+
loop: true,
|
|
86
|
+
muted: true,
|
|
87
|
+
playsinline: true
|
|
88
|
+
}, /*#__PURE__*/_react["default"].createElement("source", {
|
|
89
|
+
src: (_b = data.video) === null || _b === void 0 ? void 0 : _b.sourceUrl,
|
|
90
|
+
type: "video/mp4"
|
|
91
|
+
})), ((_c = data.overilay) === null || _c === void 0 ? void 0 : _c.open) && /*#__PURE__*/_react["default"].createElement(_NewImg["default"], {
|
|
110
92
|
className: "video-cover-img",
|
|
93
|
+
lazy: true,
|
|
111
94
|
src: (_e = (_d = data.overilay) === null || _d === void 0 ? void 0 : _d.content) === null || _e === void 0 ? void 0 : _e.pcImgSrc,
|
|
112
|
-
|
|
95
|
+
style: {
|
|
96
|
+
visibility: playing ? 'hidden' : 'visible'
|
|
97
|
+
}
|
|
113
98
|
}));
|
|
114
99
|
};
|
|
115
100
|
|
|
116
|
-
|
|
117
|
-
return
|
|
101
|
+
VideoItem.defaultProps = {};
|
|
102
|
+
return VideoItem;
|
|
118
103
|
}(_react["default"].Component);
|
|
119
104
|
|
|
120
|
-
var _default =
|
|
105
|
+
var _default = VideoItem;
|
|
121
106
|
exports["default"] = _default;
|