@fonixtree/magic-design 1.0.73 → 1.0.74

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.
@@ -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
- event_label: (0, _ConfigPanel.getSecondConfigName)(data, item.id),
216
- promotion_name: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
217
+ event_section: data.type,
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
- return (0, _coreUtil.clickUrl)("proDetail-" + item.offerId + "-" + (item.sppProductId || ''));
426
+ if (window.magicDesign.pushGA) {
427
+ window.magicDesign.pushGA({}, 'select_promotion', {
428
+ event_section: list.type,
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: data.type,
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, 'select_item', {
645
- event_action: 'Select Item'
644
+ window.magicDesign.pushGA(item, 'GA_SENSOR_select_item', {
645
+ event_action: 'Select Item',
646
+ event_section: data.type,
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: data.type,
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: {
@@ -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
- event_label: (0, _ConfigPanel.getSecondConfigName)(data, item.id),
216
- promotion_name: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
217
+ event_section: data.type,
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
- return (0, _coreUtil.clickUrl)("proDetail-" + item.offerId + "-" + (item.sppProductId || ''));
426
+ if (window.magicDesign.pushGA) {
427
+ window.magicDesign.pushGA({}, 'select_promotion', {
428
+ event_section: list.type,
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: data.type,
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, 'select_item', {
645
- event_action: 'Select Item'
644
+ window.magicDesign.pushGA(item, 'GA_SENSOR_select_item', {
645
+ event_action: 'Select Item',
646
+ event_section: data.type,
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: data.type,
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: {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fonixtree/magic-design",
3
3
  "author": "Cylon Team",
4
- "version": "1.0.73",
4
+ "version": "1.0.74",
5
5
  "description": "Magic Design",
6
6
  "license": "MIT",
7
7
  "module": "es/index.js",
Binary file
Binary file