component-sanzhizhou 1.2.11 → 1.2.12
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/dist/lib/Tool.js
CHANGED
|
@@ -43,7 +43,7 @@ export var getProductDetailUrl = function getProductDetailUrl(_ref) {
|
|
|
43
43
|
var platform = _ref.platform,
|
|
44
44
|
skuId = _ref.skuId,
|
|
45
45
|
query = _ref.query;
|
|
46
|
-
if (skuId
|
|
46
|
+
if (!skuId) {
|
|
47
47
|
return '';
|
|
48
48
|
}
|
|
49
49
|
var build = PLATFORM_URL_BUILDERS[platform];
|
|
@@ -75,13 +75,15 @@ var ProductDetailLink = function ProductDetailLink(_ref2) {
|
|
|
75
75
|
// 客户端内通过桥接在本机浏览器打开,避免新开浏览器标签页
|
|
76
76
|
if (isInClient()) {
|
|
77
77
|
var _window$getBridge, _window;
|
|
78
|
+
console.log('ProductDetailLink handleClick in client:', event);
|
|
78
79
|
var bridge = (_window$getBridge = (_window = window).getBridge) === null || _window$getBridge === void 0 ? void 0 : _window$getBridge.call(_window);
|
|
79
80
|
if (bridge !== null && bridge !== void 0 && bridge.openLocalBrowser) {
|
|
80
81
|
event.preventDefault();
|
|
81
82
|
bridge.openLocalBrowser(href);
|
|
83
|
+
return;
|
|
82
84
|
}
|
|
83
85
|
}
|
|
84
|
-
onClick === null || onClick === void 0
|
|
86
|
+
return onClick === null || onClick === void 0 ? void 0 : onClick(event);
|
|
85
87
|
};
|
|
86
88
|
return /*#__PURE__*/React.createElement("a", _extends({
|
|
87
89
|
href: href,
|