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/index.cjs +12 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +6 -6
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +6 -6
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +12 -0
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +6 -6
- package/dist/pb-ui.min.js.map +1 -1
- package/es/materials/sxp/popup/CommodityDetail/index.js +11 -0
- package/lib/materials/sxp/popup/CommodityDetail/index.js +11 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -11696,10 +11696,14 @@ const CommodityDetail$1 = (_a) => {
|
|
|
11696
11696
|
cta_action_type: 'open_internal_popup',
|
|
11697
11697
|
target_content_id: product === null || product === void 0 ? void 0 : product.itemId
|
|
11698
11698
|
});
|
|
11699
|
+
console.log('[CommodityDetail] 打开加购弹窗:', addToCartPopupId);
|
|
11699
11700
|
// 打开加购弹窗
|
|
11700
11701
|
if (typeof window !== 'undefined' && window.sxpPopup) {
|
|
11701
11702
|
window.sxpPopup(addToCartPopupId);
|
|
11702
11703
|
}
|
|
11704
|
+
else {
|
|
11705
|
+
console.warn('[CommodityDetail] sxpPopup 方法不存在');
|
|
11706
|
+
}
|
|
11703
11707
|
return;
|
|
11704
11708
|
}
|
|
11705
11709
|
// 默认行为:跳转到商品链接
|
|
@@ -11727,6 +11731,14 @@ const CommodityDetail$1 = (_a) => {
|
|
|
11727
11731
|
}
|
|
11728
11732
|
window.location.href = window.getJointUtmLink(product.link);
|
|
11729
11733
|
}
|
|
11734
|
+
else {
|
|
11735
|
+
// 如果没有配置链接也没有启用加购功能,给出提示
|
|
11736
|
+
console.warn('[CommodityDetail] 商品未配置跳转链接,且未启用加购功能', {
|
|
11737
|
+
productId: product === null || product === void 0 ? void 0 : product.itemId,
|
|
11738
|
+
enableAddToCart,
|
|
11739
|
+
addToCartPopupId
|
|
11740
|
+
});
|
|
11741
|
+
}
|
|
11730
11742
|
};
|
|
11731
11743
|
useEffect(() => {
|
|
11732
11744
|
var _a, _b;
|