@fonixtree/magic-design 0.0.159 → 0.0.161

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.
Files changed (57) hide show
  1. package/es/common/ImageModal/CommonModal/index.js +0 -1
  2. package/es/common/LinkModal/FilteredProductModal/index.js +1 -1
  3. package/es/common/SwiperBan/index.less +1 -1
  4. package/es/common/Video/index.js +9 -6
  5. package/es/common/Video/index.less +9 -0
  6. package/es/composite-comp/bol/components/Video/components/ShareBtn/index.less +2 -2
  7. package/es/composite-comp/bol/components/Video/components/VideoTag/index.js +9 -2
  8. package/es/composite-comp/bol/components/Video/components/VideoTag/index.less +5 -0
  9. package/es/composite-comp/bol/components/Video/mobile/Layout1/index.js +31 -22
  10. package/es/composite-comp/bol/components/Video/mobile/Layout1/index.less +1 -0
  11. package/es/composite-comp/bol/components/Video/mobile/Layout2/index.js +31 -23
  12. package/es/composite-comp/bol/components/Video/mobile/Layout2/index.less +2 -1
  13. package/es/composite-comp/bol/components/Video/mobile/Layout3/index.js +31 -22
  14. package/es/composite-comp/bol/components/Video/mobile/Layout3/index.less +3 -2
  15. package/es/composite-comp/bol/components/Video/mobile/index.js +0 -1
  16. package/es/composite-comp/bol/components/Video/pc/Layout1/index.js +30 -21
  17. package/es/composite-comp/bol/components/Video/pc/Layout1/index.less +1 -0
  18. package/es/composite-comp/bol/components/Video/pc/Layout2/index.js +42 -41
  19. package/es/composite-comp/bol/components/Video/pc/Layout2/index.less +2 -0
  20. package/es/composite-comp/bol/components/Video/pc/Layout3/index.js +33 -24
  21. package/es/composite-comp/bol/components/Video/pc/Layout3/index.less +1 -0
  22. package/es/composite-comp/bol/components/Video/pc/Layout4/index.js +30 -21
  23. package/es/composite-comp/bol/components/Video/pc/Layout4/index.less +1 -0
  24. package/es/composite-comp/bol/components/Video/pc/Layout5/index.js +30 -21
  25. package/es/composite-comp/bol/components/Video/pc/Layout5/index.less +1 -0
  26. package/es/locale/en/en.json +1 -0
  27. package/es/locale/es/es.json +1 -0
  28. package/es/locale/id/id.json +1 -0
  29. package/lib/common/ImageModal/CommonModal/index.js +0 -1
  30. package/lib/common/LinkModal/FilteredProductModal/index.js +1 -1
  31. package/lib/common/SwiperBan/index.less +1 -1
  32. package/lib/common/Video/index.js +9 -6
  33. package/lib/common/Video/index.less +9 -0
  34. package/lib/composite-comp/bol/components/Video/components/ShareBtn/index.less +2 -2
  35. package/lib/composite-comp/bol/components/Video/components/VideoTag/index.js +9 -2
  36. package/lib/composite-comp/bol/components/Video/components/VideoTag/index.less +5 -0
  37. package/lib/composite-comp/bol/components/Video/mobile/Layout1/index.js +31 -22
  38. package/lib/composite-comp/bol/components/Video/mobile/Layout1/index.less +1 -0
  39. package/lib/composite-comp/bol/components/Video/mobile/Layout2/index.js +31 -23
  40. package/lib/composite-comp/bol/components/Video/mobile/Layout2/index.less +2 -1
  41. package/lib/composite-comp/bol/components/Video/mobile/Layout3/index.js +31 -22
  42. package/lib/composite-comp/bol/components/Video/mobile/Layout3/index.less +3 -2
  43. package/lib/composite-comp/bol/components/Video/mobile/index.js +0 -1
  44. package/lib/composite-comp/bol/components/Video/pc/Layout1/index.js +30 -21
  45. package/lib/composite-comp/bol/components/Video/pc/Layout1/index.less +1 -0
  46. package/lib/composite-comp/bol/components/Video/pc/Layout2/index.js +42 -41
  47. package/lib/composite-comp/bol/components/Video/pc/Layout2/index.less +2 -0
  48. package/lib/composite-comp/bol/components/Video/pc/Layout3/index.js +33 -24
  49. package/lib/composite-comp/bol/components/Video/pc/Layout3/index.less +1 -0
  50. package/lib/composite-comp/bol/components/Video/pc/Layout4/index.js +30 -21
  51. package/lib/composite-comp/bol/components/Video/pc/Layout4/index.less +1 -0
  52. package/lib/composite-comp/bol/components/Video/pc/Layout5/index.js +30 -21
  53. package/lib/composite-comp/bol/components/Video/pc/Layout5/index.less +1 -0
  54. package/lib/locale/en/en.json +1 -0
  55. package/lib/locale/es/es.json +1 -0
  56. package/lib/locale/id/id.json +1 -0
  57. package/package.json +1 -1
@@ -35,7 +35,6 @@ function CommonModal(_a) {
35
35
  okText: okText || 'Confirm',
36
36
  cancelText: cancelText || 'Cancel'
37
37
  };
38
- console.log('CommonModal render');
39
38
  return /*#__PURE__*/_react["default"].createElement(_antd.Modal, _extends({}, modalCommonProps, modalOpts, {
40
39
  confirmLoading: confirmLoading,
41
40
  onCancel: onCancel,
@@ -461,7 +461,7 @@ var FilteredProductModal = function FilteredProductModal(props) {
461
461
  startPrice: minimum * precision || '',
462
462
  endPrice: maximum * precision || '',
463
463
  // storeName:storeName,
464
- cmpTypeId: promotions.key || '',
464
+ campaignType: promotions.key || '',
465
465
  pageSize: paginationParams.pageSize,
466
466
  pageIndex: paginationParams.current,
467
467
  state: 'A'
@@ -1,7 +1,7 @@
1
1
  .swiper-ban-wrap {
2
2
  position: absolute;
3
3
  width: 100%;
4
- bottom: 6px;
4
+ bottom: 10px;
5
5
  display: flex;
6
6
  align-items: center;
7
7
  justify-content: center;
@@ -344,7 +344,7 @@ function (_super) {
344
344
  contentWrap.appendChild(closeImgDom);
345
345
  modelWrap.appendChild(shadowWrap);
346
346
  modelWrap.appendChild(contentWrap);
347
- (document.querySelector('[magic_designer]') || document.body).document.body.appendChild(modelWrap);
347
+ (document.querySelector('[magic_design]') || document.body).appendChild(modelWrap);
348
348
  createVideo('-modal-' + videoId, __assign(__assign({}, _this.props.opts), {
349
349
  autoplay: true
350
350
  }));
@@ -382,9 +382,8 @@ function (_super) {
382
382
 
383
383
  case 3:
384
384
  _a.player = _b.sent();
385
- this.player.on('pause', function () {
386
- if (!_this.props.opts.loop) {
387
- _this.props.onPause();
385
+ this.player.on('ended', function () {
386
+ if (!_this.props.opts.loop) {// this.props.onEnd();
388
387
  }
389
388
  });
390
389
  _b.label = 4;
@@ -417,12 +416,16 @@ function (_super) {
417
416
  AComponent.prototype.render = function () {
418
417
  var _a = this.props,
419
418
  videoId = _a.videoId,
420
- opts = _a.opts;
419
+ opts = _a.opts,
420
+ play = _a.play;
421
+ console.log('play: ', play);
421
422
  return /*#__PURE__*/_react["default"].createElement("div", {
422
423
  className: "video-container"
423
424
  }, opts.source ? /*#__PURE__*/_react["default"].createElement("div", {
424
425
  id: 'video' + videoId
425
- }) : null);
426
+ }) : null, !play && /*#__PURE__*/_react["default"].createElement("div", {
427
+ className: "cover-video"
428
+ }));
426
429
  };
427
430
 
428
431
  AComponent.defaultProps = {
@@ -6,6 +6,15 @@
6
6
  .prism-player .prism-cover {
7
7
  z-index: 0;
8
8
  }
9
+
10
+ .cover-video {
11
+ position: absolute;
12
+ left: 0;
13
+ right: 0;
14
+ bottom: 0;
15
+ top: 0;
16
+ background-color: rgba(0, 0, 0, 0);
17
+ }
9
18
  }
10
19
 
11
20
  .pc-video-modal-wrap {
@@ -11,8 +11,8 @@
11
11
 
12
12
  &.pc {
13
13
  position: absolute;
14
- right: 48px;
15
- bottom: 48px;
14
+ right: 20px;
15
+ bottom: 20px;
16
16
  height: 60px;
17
17
  width: 60px;
18
18
  }
@@ -17,6 +17,8 @@ var _index = _interopRequireDefault(require("../ShareBtn/index"));
17
17
 
18
18
  require("./index.less");
19
19
 
20
+ var _AlignSelector = require("../../../../../../common/AlignSelector");
21
+
20
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
21
23
 
22
24
  var __extends = void 0 && (void 0).__extends || function () {
@@ -61,6 +63,7 @@ function (_super) {
61
63
 
62
64
  VideoTag.prototype.render = function () {
63
65
  var _a = this.props,
66
+ onPlayClick = _a.onPlayClick,
64
67
  data = _a.data,
65
68
  _b = _a.position,
66
69
  position = _b === void 0 ? 'absolute' : _b,
@@ -79,14 +82,18 @@ function (_super) {
79
82
  }, showBtn && /*#__PURE__*/_react["default"].createElement("div", {
80
83
  className: "left-wrap"
81
84
  }, /*#__PURE__*/_react["default"].createElement("div", {
82
- className: "play-btn center"
85
+ className: "play-btn center",
86
+ onClick: onPlayClick
83
87
  }, /*#__PURE__*/_react["default"].createElement("img", {
84
88
  alt: "",
85
89
  src: _playCircle["default"]
86
90
  }))), /*#__PURE__*/_react["default"].createElement("div", {
87
91
  className: "right-wrap"
88
92
  }, /*#__PURE__*/_react["default"].createElement("div", {
89
- className: "tag-wrap"
93
+ className: "tag-wrap",
94
+ style: {
95
+ justifyContent: _AlignSelector.alignItemMap[align]
96
+ }
90
97
  }, data.imageTag.open && /*#__PURE__*/_react["default"].createElement("div", {
91
98
  className: "tag-image"
92
99
  }, /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
@@ -12,6 +12,7 @@
12
12
  width: 85px;
13
13
  height: 100%;
14
14
  flex-shrink: 0;
15
+ align-self: end;
15
16
 
16
17
  .play-btn {
17
18
  position: absolute;
@@ -21,6 +22,10 @@
21
22
  width: 60px;
22
23
  height: 60px;
23
24
  z-index: 1;
25
+ cursor: pointer;
26
+ transform: translateX(-50%) !important;
27
+ bottom: 0;
28
+ top: unset !important;
24
29
 
25
30
  img {
26
31
  width: 100%;
@@ -81,6 +81,27 @@ function (_super) {
81
81
  /** 视频ref映射 */
82
82
 
83
83
  _this.videoRefMap = {};
84
+
85
+ _this.playOrPause = function (group) {
86
+ (0, _commonUtil.ensure)(function () {
87
+ if (_this.videoRefMap[group.id].playing) {
88
+ _this.videoRefMap[group.id].playing = false;
89
+
90
+ _this.videoRefMap[group.id].el.player.pause();
91
+ } else {
92
+ if (group.video.playPosition == 'Popup') {
93
+ _this.videoRefMap[group.id].el.fullPlay('h5');
94
+ } else {
95
+ _this.videoRefMap[group.id].playing = true;
96
+
97
+ _this.videoRefMap[group.id].el.player.play();
98
+ }
99
+ }
100
+
101
+ _this.setState({});
102
+ });
103
+ };
104
+
84
105
  return _this;
85
106
  }
86
107
 
@@ -91,7 +112,7 @@ function (_super) {
91
112
  return /*#__PURE__*/_react["default"].createElement("div", {
92
113
  className: "video-layout1-wrap"
93
114
  }, data.groupSource.map(function (group) {
94
- var _a;
115
+ var _a, _b;
95
116
  /** 当前是否在播放 */
96
117
 
97
118
 
@@ -99,25 +120,6 @@ function (_super) {
99
120
  return /*#__PURE__*/_react["default"].createElement("div", {
100
121
  key: group.id,
101
122
  className: "video-item-wrap",
102
- onClick: function onClick() {
103
- (0, _commonUtil.ensure)(function () {
104
- if (_this.videoRefMap[group.id].playing) {
105
- _this.videoRefMap[group.id].playing = false;
106
-
107
- _this.videoRefMap[group.id].el.player.pause();
108
- } else {
109
- if (group.video.playPosition == 'Popup') {
110
- _this.videoRefMap[group.id].el.fullPlay('h5');
111
- } else {
112
- _this.videoRefMap[group.id].playing = true;
113
-
114
- _this.videoRefMap[group.id].el.player.play();
115
- }
116
- }
117
-
118
- _this.setState({});
119
- });
120
- },
121
123
  style: {
122
124
  height: data.mobileHeight
123
125
  }
@@ -141,18 +143,25 @@ function (_super) {
141
143
  cover: (0, _coreUtil.getVideoCover)(group),
142
144
  source: group.video.sourceUrl
143
145
  }),
146
+ play: (_b = _this.videoRefMap[group.id]) === null || _b === void 0 ? void 0 : _b.playing,
144
147
  videoId: group.id
145
148
  }), !isPlaying && group.video.playButton == 'Middle' && /*#__PURE__*/_react["default"].createElement("div", {
146
- className: "play-btn center"
149
+ className: "play-btn center",
150
+ onClick: function onClick() {
151
+ _this.playOrPause(group);
152
+ }
147
153
  }, /*#__PURE__*/_react["default"].createElement("img", {
148
154
  alt: "",
149
155
  src: _playCircle["default"]
150
- })), /*#__PURE__*/_react["default"].createElement(_index["default"], {
156
+ })), data.share.open && !isPlaying && /*#__PURE__*/_react["default"].createElement(_index["default"], {
151
157
  data: data
152
158
  }), !isPlaying && /*#__PURE__*/_react["default"].createElement(_VideoTag["default"], {
153
159
  align: data.customize.align,
154
160
  data: group,
155
161
  noShare: true,
162
+ onPlayClick: function onPlayClick() {
163
+ return _this.playOrPause(group);
164
+ },
156
165
  share: __assign({
157
166
  url: (0, _commonUtil.addUrlQuery)(window.location.href, {
158
167
  scroll: 'node-' + data.id
@@ -19,6 +19,7 @@
19
19
  width: 60px;
20
20
  height: 60px;
21
21
  z-index: 1;
22
+ cursor: pointer;
22
23
 
23
24
  img {
24
25
  width: 100%;
@@ -94,6 +94,26 @@ function (_super) {
94
94
  }, 3000);
95
95
  }
96
96
  };
97
+
98
+ _this.playOrPause = function (group) {
99
+ (0, _commonUtil.ensure)(function () {
100
+ if (_this.videoRefMap[group.id].playing) {
101
+ _this.videoRefMap[group.id].playing = false;
102
+
103
+ _this.videoRefMap[group.id].el.player.pause();
104
+ } else {
105
+ if (group.video.playPosition == 'Popup') {
106
+ _this.videoRefMap[group.id].el.fullPlay('h5');
107
+ } else {
108
+ _this.videoRefMap[group.id].playing = true;
109
+
110
+ _this.videoRefMap[group.id].el.player.play();
111
+ }
112
+ }
113
+
114
+ _this.setState({});
115
+ });
116
+ };
97
117
  /** 视频ref映射 */
98
118
 
99
119
 
@@ -124,7 +144,7 @@ function (_super) {
124
144
  transform: "translateX(-" + sliderIndex * 100 + "%)"
125
145
  }
126
146
  }, data.groupSource.map(function (group) {
127
- var _a;
147
+ var _a, _b;
128
148
  /** 当前是否在播放 */
129
149
 
130
150
 
@@ -132,25 +152,6 @@ function (_super) {
132
152
  return /*#__PURE__*/_react["default"].createElement("div", {
133
153
  key: group.id,
134
154
  className: "video-item-wrap",
135
- onClick: function onClick() {
136
- (0, _commonUtil.ensure)(function () {
137
- if (_this.videoRefMap[group.id].playing) {
138
- _this.videoRefMap[group.id].playing = false;
139
-
140
- _this.videoRefMap[group.id].el.player.pause();
141
- } else {
142
- if (group.video.playPosition == 'Popup') {
143
- _this.videoRefMap[group.id].el.fullPlay('h5');
144
- } else {
145
- _this.videoRefMap[group.id].playing = true;
146
-
147
- _this.videoRefMap[group.id].el.player.play();
148
- }
149
- }
150
-
151
- _this.setState({});
152
- });
153
- },
154
155
  style: {
155
156
  height: data.mobileHeight
156
157
  }
@@ -174,9 +175,13 @@ function (_super) {
174
175
  cover: (0, _coreUtil.getVideoCover)(group),
175
176
  source: group.video.sourceUrl
176
177
  }),
178
+ play: (_b = _this.videoRefMap[group.id]) === null || _b === void 0 ? void 0 : _b.playing,
177
179
  videoId: group.id
178
180
  }), !isPlaying && group.video.playButton == 'Middle' && /*#__PURE__*/_react["default"].createElement("div", {
179
- className: "play-btn center"
181
+ className: "play-btn center",
182
+ onClick: function onClick() {
183
+ _this.playOrPause(group);
184
+ }
180
185
  }, /*#__PURE__*/_react["default"].createElement("img", {
181
186
  alt: "",
182
187
  src: _playCircle["default"]
@@ -184,14 +189,17 @@ function (_super) {
184
189
  align: data.customize.align,
185
190
  data: group,
186
191
  noShare: true,
192
+ onPlayClick: function onPlayClick() {
193
+ return _this.playOrPause(group);
194
+ },
187
195
  share: __assign({
188
196
  url: (0, _commonUtil.addUrlQuery)(window.location.href, {
189
197
  scroll: 'node-' + data.id
190
198
  })
191
199
  }, data.share)
200
+ }), data.share.open && !isPlaying && /*#__PURE__*/_react["default"].createElement(_index["default"], {
201
+ data: data
192
202
  }));
193
- }), /*#__PURE__*/_react["default"].createElement(_index["default"], {
194
- data: data
195
203
  }))), /*#__PURE__*/_react["default"].createElement(_common.SwiperBan, {
196
204
  data: data.groupSource,
197
205
  onChange: function onChange(i) {
@@ -2,7 +2,7 @@
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  position: relative;
5
- padding-bottom: 16px;
5
+ padding-bottom: 36px;
6
6
 
7
7
  .slider-wrap {
8
8
  width: 100%;
@@ -37,6 +37,7 @@
37
37
  width: 60px;
38
38
  height: 60px;
39
39
  z-index: 1;
40
+ cursor: pointer;
40
41
 
41
42
  img {
42
43
  width: 100%;
@@ -78,8 +78,29 @@ function (_super) {
78
78
  var _this = _super !== null && _super.apply(this, arguments) || this;
79
79
 
80
80
  _this.state = {};
81
+
82
+ _this.playOrPause = function (group) {
83
+ (0, _commonUtil.ensure)(function () {
84
+ if (_this.videoRefMap[group.id].playing) {
85
+ _this.videoRefMap[group.id].playing = false;
86
+
87
+ _this.videoRefMap[group.id].el.player.pause();
88
+ } else {
89
+ if (group.video.playPosition == 'Popup') {
90
+ _this.videoRefMap[group.id].el.fullPlay('h5');
91
+ } else {
92
+ _this.videoRefMap[group.id].playing = true;
93
+
94
+ _this.videoRefMap[group.id].el.player.play();
95
+ }
96
+ }
97
+
98
+ _this.setState({});
99
+ });
100
+ };
81
101
  /** 视频ref映射 */
82
102
 
103
+
83
104
  _this.videoRefMap = {};
84
105
  return _this;
85
106
  }
@@ -91,7 +112,7 @@ function (_super) {
91
112
  return /*#__PURE__*/_react["default"].createElement("div", {
92
113
  className: "video-layout3-wrap"
93
114
  }, data.groupSource.map(function (group) {
94
- var _a;
115
+ var _a, _b;
95
116
  /** 当前是否在播放 */
96
117
 
97
118
 
@@ -101,25 +122,6 @@ function (_super) {
101
122
  }, /*#__PURE__*/_react["default"].createElement("div", {
102
123
  key: group.id,
103
124
  className: "video-item-wrap",
104
- onClick: function onClick() {
105
- (0, _commonUtil.ensure)(function () {
106
- if (_this.videoRefMap[group.id].playing) {
107
- _this.videoRefMap[group.id].playing = false;
108
-
109
- _this.videoRefMap[group.id].el.player.pause();
110
- } else {
111
- if (group.video.playPosition == 'Popup') {
112
- _this.videoRefMap[group.id].el.fullPlay('h5');
113
- } else {
114
- _this.videoRefMap[group.id].playing = true;
115
-
116
- _this.videoRefMap[group.id].el.player.play();
117
- }
118
- }
119
-
120
- _this.setState({});
121
- });
122
- },
123
125
  style: {
124
126
  height: data.mobileHeight
125
127
  }
@@ -138,22 +140,29 @@ function (_super) {
138
140
  cover: (0, _coreUtil.getVideoCover)(group),
139
141
  source: group.video.sourceUrl
140
142
  }),
143
+ play: (_b = _this.videoRefMap[group.id]) === null || _b === void 0 ? void 0 : _b.playing,
141
144
  videoId: group.id
142
145
  }), !isPlaying && /*#__PURE__*/_react["default"].createElement("div", {
143
146
  className: (0, _classnames["default"])('play-btn', {
144
147
  middle: group.video.playButton == 'Middle',
145
148
  bottomLeft: group.video.playButton == 'Bottom Left'
146
- })
149
+ }),
150
+ onClick: function onClick() {
151
+ _this.playOrPause(group);
152
+ }
147
153
  }, /*#__PURE__*/_react["default"].createElement("img", {
148
154
  alt: "",
149
155
  src: _playCircle["default"]
150
- })), data.share.open && /*#__PURE__*/_react["default"].createElement(_ShareBtn["default"], {
156
+ })), data.share.open && !isPlaying && /*#__PURE__*/_react["default"].createElement(_ShareBtn["default"], {
151
157
  data: data.share
152
158
  })), /*#__PURE__*/_react["default"].createElement(_VideoTag["default"], {
153
159
  align: data.customize.align,
154
160
  data: group,
155
161
  layout: 'h5-' + data.customize.layout.h5Layout,
156
162
  noShare: true,
163
+ onPlayClick: function onPlayClick() {
164
+ return _this.playOrPause(group);
165
+ },
157
166
  position: "relative",
158
167
  share: __assign({
159
168
  url: (0, _commonUtil.addUrlQuery)(window.location.href, {
@@ -29,6 +29,7 @@
29
29
  width: 60px;
30
30
  height: 60px;
31
31
  z-index: 1;
32
+ cursor: pointer;
32
33
 
33
34
  img {
34
35
  width: 100%;
@@ -36,8 +37,8 @@
36
37
  }
37
38
 
38
39
  &.bottomLeft {
39
- left: 16px;
40
- bottom: 16px;
40
+ left: 12px;
41
+ bottom: 10px;
41
42
  transform: unset;
42
43
  top: unset;
43
44
  }
@@ -98,7 +98,6 @@ function (_super) {
98
98
 
99
99
  BannerMobile.prototype.render = function () {
100
100
  var data = this.props.data;
101
- console.log('data: ', data);
102
101
  return /*#__PURE__*/_react["default"].createElement("div", {
103
102
  className: "m-video-mobile"
104
103
  }, data.customize.layout.h5Layout == 'layout1' && /*#__PURE__*/_react["default"].createElement(_Layout["default"], {
@@ -77,6 +77,27 @@ function (_super) {
77
77
  /** 视频ref映射 */
78
78
 
79
79
  _this.videoRefMap = {};
80
+
81
+ _this.playOrPause = function (group) {
82
+ (0, _commonUtil.ensure)(function () {
83
+ if (_this.videoRefMap[group.id].playing) {
84
+ _this.videoRefMap[group.id].playing = false;
85
+
86
+ _this.videoRefMap[group.id].el.player.pause();
87
+ } else {
88
+ if (group.video.playPosition == 'Popup') {
89
+ _this.videoRefMap[group.id].el.fullPlay('pc');
90
+ } else {
91
+ _this.videoRefMap[group.id].playing = true;
92
+
93
+ _this.videoRefMap[group.id].el.player.play();
94
+ }
95
+ }
96
+
97
+ _this.setState({});
98
+ });
99
+ };
100
+
80
101
  return _this;
81
102
  }
82
103
 
@@ -90,7 +111,7 @@ function (_super) {
90
111
  return /*#__PURE__*/_react["default"].createElement("div", {
91
112
  className: "video-pc-layout1-wrap"
92
113
  }, /*#__PURE__*/_react["default"].createElement("div", null, data.groupSource.map(function (group) {
93
- var _a;
114
+ var _a, _b;
94
115
  /** 当前是否在播放 */
95
116
 
96
117
 
@@ -98,25 +119,6 @@ function (_super) {
98
119
  return /*#__PURE__*/_react["default"].createElement("div", {
99
120
  key: group.id,
100
121
  className: "video-item-wrap",
101
- onClick: function onClick() {
102
- (0, _commonUtil.ensure)(function () {
103
- if (_this.videoRefMap[group.id].playing) {
104
- _this.videoRefMap[group.id].playing = false;
105
-
106
- _this.videoRefMap[group.id].el.player.pause();
107
- } else {
108
- if (group.video.playPosition == 'Popup') {
109
- _this.videoRefMap[group.id].el.fullPlay('pc');
110
- } else {
111
- _this.videoRefMap[group.id].playing = true;
112
-
113
- _this.videoRefMap[group.id].el.player.play();
114
- }
115
- }
116
-
117
- _this.setState({});
118
- });
119
- },
120
122
  style: {
121
123
  height: data.pcHeight
122
124
  }
@@ -135,9 +137,13 @@ function (_super) {
135
137
  cover: (0, _coreUtil.getVideoCover)(group),
136
138
  source: group.video.sourceUrl
137
139
  }),
140
+ play: (_b = _this.videoRefMap[group.id]) === null || _b === void 0 ? void 0 : _b.playing,
138
141
  videoId: group.id
139
142
  }), !isPlaying && group.video.playButton == 'Middle' && /*#__PURE__*/_react["default"].createElement("div", {
140
- className: "play-btn center"
143
+ className: "play-btn center",
144
+ onClick: function onClick() {
145
+ _this.playOrPause(group);
146
+ }
141
147
  }, /*#__PURE__*/_react["default"].createElement("img", {
142
148
  alt: "",
143
149
  src: _playCircle["default"]
@@ -145,6 +151,9 @@ function (_super) {
145
151
  align: data.customize.align,
146
152
  data: group,
147
153
  noShare: true,
154
+ onPlayClick: function onPlayClick() {
155
+ return _this.playOrPause(group);
156
+ },
148
157
  padding: 48
149
158
  }), data.share.open && !hasPlaying && /*#__PURE__*/_react["default"].createElement(_ShareBtn["default"], {
150
159
  data: __assign({
@@ -27,6 +27,7 @@
27
27
  width: 170px;
28
28
  height: 170px;
29
29
  z-index: 1;
30
+ cursor: pointer;
30
31
 
31
32
  img {
32
33
  width: 100%;