pb-sxp-ui 1.20.19 → 1.20.20

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/pb-ui.js CHANGED
@@ -11711,10 +11711,14 @@
11711
11711
  cta_action_type: 'open_internal_popup',
11712
11712
  target_content_id: product === null || product === void 0 ? void 0 : product.itemId
11713
11713
  });
11714
+ console.log('[CommodityDetail] 打开加购弹窗:', addToCartPopupId);
11714
11715
  // 打开加购弹窗
11715
11716
  if (typeof window !== 'undefined' && window.sxpPopup) {
11716
11717
  window.sxpPopup(addToCartPopupId);
11717
11718
  }
11719
+ else {
11720
+ console.warn('[CommodityDetail] sxpPopup 方法不存在');
11721
+ }
11718
11722
  return;
11719
11723
  }
11720
11724
  // 默认行为:跳转到商品链接
@@ -11742,6 +11746,14 @@
11742
11746
  }
11743
11747
  window.location.href = window.getJointUtmLink(product.link);
11744
11748
  }
11749
+ else {
11750
+ // 如果没有配置链接也没有启用加购功能,给出提示
11751
+ console.warn('[CommodityDetail] 商品未配置跳转链接,且未启用加购功能', {
11752
+ productId: product === null || product === void 0 ? void 0 : product.itemId,
11753
+ enableAddToCart,
11754
+ addToCartPopupId
11755
+ });
11756
+ }
11745
11757
  };
11746
11758
  React.useEffect(() => {
11747
11759
  var _a, _b;