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
|
@@ -49,9 +49,13 @@ const CommodityDetail = (_a) => {
|
|
|
49
49
|
cta_action_type: 'open_internal_popup',
|
|
50
50
|
target_content_id: product === null || product === void 0 ? void 0 : product.itemId
|
|
51
51
|
});
|
|
52
|
+
console.log('[CommodityDetail] 打开加购弹窗:', addToCartPopupId);
|
|
52
53
|
if (typeof window !== 'undefined' && window.sxpPopup) {
|
|
53
54
|
window.sxpPopup(addToCartPopupId);
|
|
54
55
|
}
|
|
56
|
+
else {
|
|
57
|
+
console.warn('[CommodityDetail] sxpPopup 方法不存在');
|
|
58
|
+
}
|
|
55
59
|
return;
|
|
56
60
|
}
|
|
57
61
|
if (product === null || product === void 0 ? void 0 : product.link) {
|
|
@@ -78,6 +82,13 @@ const CommodityDetail = (_a) => {
|
|
|
78
82
|
}
|
|
79
83
|
window.location.href = window.getJointUtmLink(product.link);
|
|
80
84
|
}
|
|
85
|
+
else {
|
|
86
|
+
console.warn('[CommodityDetail] 商品未配置跳转链接,且未启用加购功能', {
|
|
87
|
+
productId: product === null || product === void 0 ? void 0 : product.itemId,
|
|
88
|
+
enableAddToCart,
|
|
89
|
+
addToCartPopupId
|
|
90
|
+
});
|
|
91
|
+
}
|
|
81
92
|
};
|
|
82
93
|
useEffect(() => {
|
|
83
94
|
var _a, _b;
|
|
@@ -51,9 +51,13 @@ const CommodityDetail = (_a) => {
|
|
|
51
51
|
cta_action_type: 'open_internal_popup',
|
|
52
52
|
target_content_id: product === null || product === void 0 ? void 0 : product.itemId
|
|
53
53
|
});
|
|
54
|
+
console.log('[CommodityDetail] 打开加购弹窗:', addToCartPopupId);
|
|
54
55
|
if (typeof window !== 'undefined' && window.sxpPopup) {
|
|
55
56
|
window.sxpPopup(addToCartPopupId);
|
|
56
57
|
}
|
|
58
|
+
else {
|
|
59
|
+
console.warn('[CommodityDetail] sxpPopup 方法不存在');
|
|
60
|
+
}
|
|
57
61
|
return;
|
|
58
62
|
}
|
|
59
63
|
if (product === null || product === void 0 ? void 0 : product.link) {
|
|
@@ -80,6 +84,13 @@ const CommodityDetail = (_a) => {
|
|
|
80
84
|
}
|
|
81
85
|
window.location.href = window.getJointUtmLink(product.link);
|
|
82
86
|
}
|
|
87
|
+
else {
|
|
88
|
+
console.warn('[CommodityDetail] 商品未配置跳转链接,且未启用加购功能', {
|
|
89
|
+
productId: product === null || product === void 0 ? void 0 : product.itemId,
|
|
90
|
+
enableAddToCart,
|
|
91
|
+
addToCartPopupId
|
|
92
|
+
});
|
|
93
|
+
}
|
|
83
94
|
};
|
|
84
95
|
(0, react_1.useEffect)(() => {
|
|
85
96
|
var _a, _b;
|