pb-sxp-ui 1.20.19 → 1.20.21
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.css +2 -0
- 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.cjs
CHANGED
|
@@ -11718,10 +11718,14 @@ const CommodityDetail$1 = (_a) => {
|
|
|
11718
11718
|
cta_action_type: 'open_internal_popup',
|
|
11719
11719
|
target_content_id: product === null || product === void 0 ? void 0 : product.itemId
|
|
11720
11720
|
});
|
|
11721
|
+
console.log('[CommodityDetail] 打开加购弹窗:', addToCartPopupId);
|
|
11721
11722
|
// 打开加购弹窗
|
|
11722
11723
|
if (typeof window !== 'undefined' && window.sxpPopup) {
|
|
11723
11724
|
window.sxpPopup(addToCartPopupId);
|
|
11724
11725
|
}
|
|
11726
|
+
else {
|
|
11727
|
+
console.warn('[CommodityDetail] sxpPopup 方法不存在');
|
|
11728
|
+
}
|
|
11725
11729
|
return;
|
|
11726
11730
|
}
|
|
11727
11731
|
// 默认行为:跳转到商品链接
|
|
@@ -11749,6 +11753,14 @@ const CommodityDetail$1 = (_a) => {
|
|
|
11749
11753
|
}
|
|
11750
11754
|
window.location.href = window.getJointUtmLink(product.link);
|
|
11751
11755
|
}
|
|
11756
|
+
else {
|
|
11757
|
+
// 如果没有配置链接也没有启用加购功能,给出提示
|
|
11758
|
+
console.warn('[CommodityDetail] 商品未配置跳转链接,且未启用加购功能', {
|
|
11759
|
+
productId: product === null || product === void 0 ? void 0 : product.itemId,
|
|
11760
|
+
enableAddToCart,
|
|
11761
|
+
addToCartPopupId
|
|
11762
|
+
});
|
|
11763
|
+
}
|
|
11752
11764
|
};
|
|
11753
11765
|
React.useEffect(() => {
|
|
11754
11766
|
var _a, _b;
|