@fonixtree/magic-design 2.0.151 → 2.0.153

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.
@@ -43,14 +43,6 @@ function BundleItem(props) {
43
43
  var data = props.data;
44
44
  var spu = data.spu;
45
45
 
46
- var _b = (0, _react.useState)(false),
47
- specVisible = _b[0],
48
- setSpecVisible = _b[1];
49
-
50
- var _c = (0, _react.useState)(null),
51
- offer = _c[0],
52
- setOffer = _c[1];
53
-
54
46
  var onBuyNow = function onBuyNow() {
55
47
  var checkoutOrder = [{
56
48
  storeId: data.storeId,
@@ -97,6 +89,7 @@ function BundleItem(props) {
97
89
  return /*#__PURE__*/_react["default"].createElement(_BundleProdItem["default"], _extends({
98
90
  isOpen: isOpen
99
91
  }, productObj, {
92
+ offerId: off.offerId,
100
93
  offerName: off.offerName
101
94
  }));
102
95
  })), /*#__PURE__*/_react["default"].createElement("div", {
@@ -9,6 +9,8 @@ var _react = _interopRequireDefault(require("react"));
9
9
 
10
10
  require("./index.less");
11
11
 
12
+ var _coreUtil = require("../../../../../../utils/coreUtil");
13
+
12
14
  var _common = require("../../../../../../common");
13
15
 
14
16
  var _currencyUtil = require("../../../../../../utils/currencyUtil");
@@ -19,7 +21,9 @@ function BundleProdItem(props) {
19
21
  var isOpen = props.isOpen,
20
22
  imgUrl = props.imgUrl,
21
23
  offerName = props.offerName,
22
- salesPrice = props.salesPrice;
24
+ salesPrice = props.salesPrice,
25
+ offerId = props.offerId,
26
+ productId = props.productId;
23
27
  return isOpen ? /*#__PURE__*/_react["default"].createElement("div", {
24
28
  className: "bundleItemDetailWrap"
25
29
  }, /*#__PURE__*/_react["default"].createElement("div", {
@@ -31,6 +35,9 @@ function BundleProdItem(props) {
31
35
  })), /*#__PURE__*/_react["default"].createElement("img", {
32
36
  alt: "",
33
37
  className: "imgWrap",
38
+ onClick: function onClick() {
39
+ (0, _coreUtil.clickUrl)("proDetail-" + offerId + "-" + (productId || ''));
40
+ },
34
41
  src: imgUrl
35
42
  }), /*#__PURE__*/_react["default"].createElement("div", {
36
43
  className: "prodInfoWrap"
@@ -42,6 +49,9 @@ function BundleProdItem(props) {
42
49
  className: "itemWrap"
43
50
  }, /*#__PURE__*/_react["default"].createElement("img", {
44
51
  alt: "",
52
+ onClick: function onClick() {
53
+ (0, _coreUtil.clickUrl)("proDetail-" + offerId + "-" + (productId || ''));
54
+ },
45
55
  src: imgUrl
46
56
  }), /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
47
57
  className: "iconPlus",
@@ -378,6 +378,7 @@ var clickUrl = function clickUrl(url, state) {
378
378
 
379
379
  return;
380
380
  } // 判断是否是nuri, nuri跳外链需要带token
381
+ // 判断是否是pto, pto跳外链需要带token
381
382
 
382
383
 
383
384
  if (((_a = window === null || window === void 0 ? void 0 : window.magicDesign) === null || _a === void 0 ? void 0 : _a.projectCode) === 'nuri') {
@@ -401,12 +402,7 @@ var clickUrl = function clickUrl(url, state) {
401
402
  } else {
402
403
  (0, _commonUtil.navigateTo)(link, state);
403
404
  }
404
- } else {
405
- (0, _commonUtil.navigateTo)(link, state);
406
- } // 判断是否是pto, pto跳外链需要带token
407
-
408
-
409
- if (((_b = window === null || window === void 0 ? void 0 : window.magicDesign) === null || _b === void 0 ? void 0 : _b.projectCode) === 'pto') {
405
+ } else if (((_b = window === null || window === void 0 ? void 0 : window.magicDesign) === null || _b === void 0 ? void 0 : _b.projectCode) === 'pto') {
410
406
  // 输入的是完整的跳转地址
411
407
  if (isUrl(link)) {
412
408
  if (!link.includes(window.location.host)) {
@@ -43,14 +43,6 @@ function BundleItem(props) {
43
43
  var data = props.data;
44
44
  var spu = data.spu;
45
45
 
46
- var _b = (0, _react.useState)(false),
47
- specVisible = _b[0],
48
- setSpecVisible = _b[1];
49
-
50
- var _c = (0, _react.useState)(null),
51
- offer = _c[0],
52
- setOffer = _c[1];
53
-
54
46
  var onBuyNow = function onBuyNow() {
55
47
  var checkoutOrder = [{
56
48
  storeId: data.storeId,
@@ -97,6 +89,7 @@ function BundleItem(props) {
97
89
  return /*#__PURE__*/_react["default"].createElement(_BundleProdItem["default"], _extends({
98
90
  isOpen: isOpen
99
91
  }, productObj, {
92
+ offerId: off.offerId,
100
93
  offerName: off.offerName
101
94
  }));
102
95
  })), /*#__PURE__*/_react["default"].createElement("div", {
@@ -9,6 +9,8 @@ var _react = _interopRequireDefault(require("react"));
9
9
 
10
10
  require("./index.less");
11
11
 
12
+ var _coreUtil = require("../../../../../../utils/coreUtil");
13
+
12
14
  var _common = require("../../../../../../common");
13
15
 
14
16
  var _currencyUtil = require("../../../../../../utils/currencyUtil");
@@ -19,7 +21,9 @@ function BundleProdItem(props) {
19
21
  var isOpen = props.isOpen,
20
22
  imgUrl = props.imgUrl,
21
23
  offerName = props.offerName,
22
- salesPrice = props.salesPrice;
24
+ salesPrice = props.salesPrice,
25
+ offerId = props.offerId,
26
+ productId = props.productId;
23
27
  return isOpen ? /*#__PURE__*/_react["default"].createElement("div", {
24
28
  className: "bundleItemDetailWrap"
25
29
  }, /*#__PURE__*/_react["default"].createElement("div", {
@@ -31,6 +35,9 @@ function BundleProdItem(props) {
31
35
  })), /*#__PURE__*/_react["default"].createElement("img", {
32
36
  alt: "",
33
37
  className: "imgWrap",
38
+ onClick: function onClick() {
39
+ (0, _coreUtil.clickUrl)("proDetail-" + offerId + "-" + (productId || ''));
40
+ },
34
41
  src: imgUrl
35
42
  }), /*#__PURE__*/_react["default"].createElement("div", {
36
43
  className: "prodInfoWrap"
@@ -42,6 +49,9 @@ function BundleProdItem(props) {
42
49
  className: "itemWrap"
43
50
  }, /*#__PURE__*/_react["default"].createElement("img", {
44
51
  alt: "",
52
+ onClick: function onClick() {
53
+ (0, _coreUtil.clickUrl)("proDetail-" + offerId + "-" + (productId || ''));
54
+ },
45
55
  src: imgUrl
46
56
  }), /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
47
57
  className: "iconPlus",
@@ -378,6 +378,7 @@ var clickUrl = function clickUrl(url, state) {
378
378
 
379
379
  return;
380
380
  } // 判断是否是nuri, nuri跳外链需要带token
381
+ // 判断是否是pto, pto跳外链需要带token
381
382
 
382
383
 
383
384
  if (((_a = window === null || window === void 0 ? void 0 : window.magicDesign) === null || _a === void 0 ? void 0 : _a.projectCode) === 'nuri') {
@@ -401,12 +402,7 @@ var clickUrl = function clickUrl(url, state) {
401
402
  } else {
402
403
  (0, _commonUtil.navigateTo)(link, state);
403
404
  }
404
- } else {
405
- (0, _commonUtil.navigateTo)(link, state);
406
- } // 判断是否是pto, pto跳外链需要带token
407
-
408
-
409
- if (((_b = window === null || window === void 0 ? void 0 : window.magicDesign) === null || _b === void 0 ? void 0 : _b.projectCode) === 'pto') {
405
+ } else if (((_b = window === null || window === void 0 ? void 0 : window.magicDesign) === null || _b === void 0 ? void 0 : _b.projectCode) === 'pto') {
410
406
  // 输入的是完整的跳转地址
411
407
  if (isUrl(link)) {
412
408
  if (!link.includes(window.location.host)) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fonixtree/magic-design",
3
3
  "author": "Cylon Team",
4
- "version": "2.0.151",
4
+ "version": "2.0.153",
5
5
  "description": "Magic Design",
6
6
  "license": "MIT",
7
7
  "module": "es/index.js",