@fonixtree/magic-design 0.0.168 → 0.0.169

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.
@@ -166,7 +166,7 @@ function (_super) {
166
166
  }, /*#__PURE__*/_react["default"].createElement(_NewImg["default"], {
167
167
  className: "product-img",
168
168
  lazy: true,
169
- src: (0, _commonUtil.convertImageUrl)(data.imgUrlContent || data.productImageUrlContent),
169
+ src: (0, _commonUtil.convertImageUrl)(data.productImg || data.imgUrlContent || data.productImageUrlContent),
170
170
  style: imgStyle
171
171
  }), /*#__PURE__*/_react["default"].createElement(_ImageLabel["default"], {
172
172
  labels: imgLabels,
@@ -58,7 +58,7 @@ var parseUrl = function parseUrl(url) {
58
58
  action: 'jump',
59
59
  data: {
60
60
  type: 'NAVIGATE',
61
- url: h5Link
61
+ url: link
62
62
  }
63
63
  };
64
64
  break;
@@ -134,7 +134,8 @@ var parseUrl = function parseUrl(url) {
134
134
  params = {
135
135
  action: 'jump',
136
136
  params: {
137
- type: map[url]
137
+ type: map[url],
138
+ link: link
138
139
  }
139
140
  };
140
141
  }
@@ -281,7 +281,11 @@ var navigateTo = function navigateTo(url) {
281
281
  return;
282
282
  }
283
283
 
284
- window.magicDesign.history.push(url);
284
+ if (url.startsWith('/')) {
285
+ window.magicDesign.history.push(url);
286
+ } else {
287
+ window.location.href = link;
288
+ }
285
289
  };
286
290
 
287
291
  exports.navigateTo = navigateTo;
@@ -321,11 +321,7 @@ var clickUrl = function clickUrl(url) {
321
321
  return;
322
322
  }
323
323
 
324
- if (link.startsWith('/')) {
325
- (0, _commonUtil.navigateTo)(newUrl);
326
- } else {
327
- window.location.href = newUrl;
328
- }
324
+ (0, _commonUtil.navigateTo)(link);
329
325
  }
330
326
  };
331
327
 
@@ -166,7 +166,7 @@ function (_super) {
166
166
  }, /*#__PURE__*/_react["default"].createElement(_NewImg["default"], {
167
167
  className: "product-img",
168
168
  lazy: true,
169
- src: (0, _commonUtil.convertImageUrl)(data.imgUrlContent || data.productImageUrlContent),
169
+ src: (0, _commonUtil.convertImageUrl)(data.productImg || data.imgUrlContent || data.productImageUrlContent),
170
170
  style: imgStyle
171
171
  }), /*#__PURE__*/_react["default"].createElement(_ImageLabel["default"], {
172
172
  labels: imgLabels,
@@ -58,7 +58,7 @@ var parseUrl = function parseUrl(url) {
58
58
  action: 'jump',
59
59
  data: {
60
60
  type: 'NAVIGATE',
61
- url: h5Link
61
+ url: link
62
62
  }
63
63
  };
64
64
  break;
@@ -134,7 +134,8 @@ var parseUrl = function parseUrl(url) {
134
134
  params = {
135
135
  action: 'jump',
136
136
  params: {
137
- type: map[url]
137
+ type: map[url],
138
+ link: link
138
139
  }
139
140
  };
140
141
  }
@@ -281,7 +281,11 @@ var navigateTo = function navigateTo(url) {
281
281
  return;
282
282
  }
283
283
 
284
- window.magicDesign.history.push(url);
284
+ if (url.startsWith('/')) {
285
+ window.magicDesign.history.push(url);
286
+ } else {
287
+ window.location.href = link;
288
+ }
285
289
  };
286
290
 
287
291
  exports.navigateTo = navigateTo;
@@ -321,11 +321,7 @@ var clickUrl = function clickUrl(url) {
321
321
  return;
322
322
  }
323
323
 
324
- if (link.startsWith('/')) {
325
- (0, _commonUtil.navigateTo)(newUrl);
326
- } else {
327
- window.location.href = newUrl;
328
- }
324
+ (0, _commonUtil.navigateTo)(link);
329
325
  }
330
326
  };
331
327
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fonixtree/magic-design",
3
3
  "author": "Cylon Team",
4
- "version": "0.0.168",
4
+ "version": "0.0.169",
5
5
  "description": "Magic Design",
6
6
  "license": "MIT",
7
7
  "module": "es/index.js",