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
@@ -1161,7 +1161,7 @@ if (window) {
1161
1161
  setTimeout(function () {
1162
1162
  if (!window.getBridge) {
1163
1163
  window.getBridge = function () {
1164
- return window.bridge;
1164
+ return window.bridge || window.WdAppBridge;
1165
1165
  };
1166
1166
  }
1167
1167
  }, 1e3);
@@ -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 === undefined || skuId === null || 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 || onClick(event);
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,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "component-sanzhizhou",
3
- "version": "1.2.11",
3
+ "version": "1.2.12",
4
4
  "description": "",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",