@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.
- package/es/composite-comp/common/components/ProductItem/index.js +1 -1
- package/es/utils/businessUtil.js +3 -2
- package/es/utils/commonUtil.js +5 -1
- package/es/utils/coreUtil.js +1 -5
- package/lib/composite-comp/common/components/ProductItem/index.js +1 -1
- package/lib/utils/businessUtil.js +3 -2
- package/lib/utils/commonUtil.js +5 -1
- package/lib/utils/coreUtil.js +1 -5
- package/package.json +1 -1
|
@@ -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,
|
package/es/utils/businessUtil.js
CHANGED
|
@@ -58,7 +58,7 @@ var parseUrl = function parseUrl(url) {
|
|
|
58
58
|
action: 'jump',
|
|
59
59
|
data: {
|
|
60
60
|
type: 'NAVIGATE',
|
|
61
|
-
url:
|
|
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
|
}
|
package/es/utils/commonUtil.js
CHANGED
|
@@ -281,7 +281,11 @@ var navigateTo = function navigateTo(url) {
|
|
|
281
281
|
return;
|
|
282
282
|
}
|
|
283
283
|
|
|
284
|
-
|
|
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;
|
package/es/utils/coreUtil.js
CHANGED
|
@@ -321,11 +321,7 @@ var clickUrl = function clickUrl(url) {
|
|
|
321
321
|
return;
|
|
322
322
|
}
|
|
323
323
|
|
|
324
|
-
|
|
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:
|
|
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
|
}
|
package/lib/utils/commonUtil.js
CHANGED
|
@@ -281,7 +281,11 @@ var navigateTo = function navigateTo(url) {
|
|
|
281
281
|
return;
|
|
282
282
|
}
|
|
283
283
|
|
|
284
|
-
|
|
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;
|
package/lib/utils/coreUtil.js
CHANGED
|
@@ -321,11 +321,7 @@ var clickUrl = function clickUrl(url) {
|
|
|
321
321
|
return;
|
|
322
322
|
}
|
|
323
323
|
|
|
324
|
-
|
|
325
|
-
(0, _commonUtil.navigateTo)(newUrl);
|
|
326
|
-
} else {
|
|
327
|
-
window.location.href = newUrl;
|
|
328
|
-
}
|
|
324
|
+
(0, _commonUtil.navigateTo)(link);
|
|
329
325
|
}
|
|
330
326
|
};
|
|
331
327
|
|