pb-sxp-ui 1.10.2 → 1.10.3
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 +58 -31
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +58 -31
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +4 -4
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +4 -4
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +58 -31
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +4 -4
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/components/SxpPageRender/WaterFall/List.js +2 -2
- package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +2 -2
- package/es/core/components/SxpPageRender/index.js +2 -2
- package/es/core/context/SxpDataSourceProvider.d.ts +6 -0
- package/es/core/context/SxpDataSourceProvider.js +18 -1
- package/es/core/hooks/useEventReport.d.ts +1 -1
- package/es/core/hooks/useEventReport.js +10 -3
- package/es/materials/sxp/cta/AniLink/index.js +2 -2
- package/es/materials/sxp/cta/AniLinkPopup/index.js +2 -2
- package/es/materials/sxp/popup/AppointForm/index.js +2 -2
- package/es/materials/sxp/popup/CommodityDetail/index.js +2 -2
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +2 -2
- package/es/materials/sxp/popup/CommodityList/index.js +3 -3
- package/es/materials/sxp/popup/Prompt/index.js +2 -2
- package/es/materials/sxp/template/Link/index.js +1 -3
- package/es/materials/sxp/template/components/EventProvider.js +3 -3
- package/lib/core/components/SxpPageRender/WaterFall/List.js +2 -2
- package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +2 -2
- package/lib/core/components/SxpPageRender/index.js +2 -2
- package/lib/core/context/SxpDataSourceProvider.d.ts +6 -0
- package/lib/core/context/SxpDataSourceProvider.js +18 -1
- package/lib/core/hooks/useEventReport.d.ts +1 -1
- package/lib/core/hooks/useEventReport.js +10 -3
- package/lib/materials/sxp/cta/AniLink/index.js +2 -2
- package/lib/materials/sxp/cta/AniLinkPopup/index.js +2 -2
- package/lib/materials/sxp/popup/AppointForm/index.js +2 -2
- package/lib/materials/sxp/popup/CommodityDetail/index.js +2 -2
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +2 -2
- package/lib/materials/sxp/popup/CommodityList/index.js +3 -3
- package/lib/materials/sxp/popup/Prompt/index.js +2 -2
- package/lib/materials/sxp/template/Link/index.js +1 -3
- package/lib/materials/sxp/template/components/EventProvider.js +3 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -659,6 +659,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
659
659
|
const [showConsent, setShowConsent] = useState(false);
|
660
660
|
const [layoutVariantId, setLayoutVariantId] = useState();
|
661
661
|
const [channel, setChannel] = useState();
|
662
|
+
const [eventTimeList, setEventTimeList] = useState([]);
|
662
663
|
const isShowConsent = useMemo(() => {
|
663
664
|
var _a, _b, _c, _d;
|
664
665
|
return (((((_d = (_c = (_b = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.consent) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.item) === null || _c === void 0 ? void 0 : _c.props) === null || _d === void 0 ? void 0 : _d.privacy_necessity) && !isAgreePolicy && !isEditor) || isOpenConsent) &&
|
@@ -681,6 +682,24 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
681
682
|
})) !== null && _a !== void 0 ? _a : [];
|
682
683
|
return nList;
|
683
684
|
}, []);
|
685
|
+
useEffect(() => {
|
686
|
+
let intervalId;
|
687
|
+
if (eventTimeList.length > 0) {
|
688
|
+
// 定期检查数组中的时间
|
689
|
+
const checkTimes = () => {
|
690
|
+
const now = new Date(); // 获取当前时间
|
691
|
+
const threshold = 15 * 1000; // 15秒的毫秒数
|
692
|
+
// 过滤掉超过15秒的时间
|
693
|
+
setEventTimeList((prevArray) => prevArray.filter((item) => now - item.time <= threshold));
|
694
|
+
};
|
695
|
+
// 每秒检查一次
|
696
|
+
intervalId = setInterval(checkTimes, 1000);
|
697
|
+
}
|
698
|
+
// 清理函数
|
699
|
+
return () => {
|
700
|
+
clearInterval(intervalId);
|
701
|
+
};
|
702
|
+
}, [eventTimeList]); // 依赖于 timeArray
|
684
703
|
useEffect(() => {
|
685
704
|
const handleChangeThemeTag = (tag) => {
|
686
705
|
themeTag.current = tag;
|
@@ -1110,7 +1129,9 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
1110
1129
|
isEditor,
|
1111
1130
|
isNoMoreData,
|
1112
1131
|
updateChannel,
|
1113
|
-
channel
|
1132
|
+
channel,
|
1133
|
+
eventTimeList,
|
1134
|
+
setEventTimeList
|
1114
1135
|
} }, isShowConsent ? (React.createElement(Consent$4, Object.assign({}, (_e = (_d = (_c = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.consent) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.item) === null || _e === void 0 ? void 0 : _e.props))) : (render({
|
1115
1136
|
rtcList,
|
1116
1137
|
mutateLike: bffMutateLike,
|
@@ -1571,14 +1592,21 @@ var settingRender$d = [
|
|
1571
1592
|
* @Author: binruan@chatlabs.com
|
1572
1593
|
* @Date: 2024-03-12 10:59:06
|
1573
1594
|
* @LastEditors: binruan@chatlabs.com
|
1574
|
-
* @LastEditTime: 2024-
|
1595
|
+
* @LastEditTime: 2024-11-28 11:17:16
|
1575
1596
|
* @FilePath: \pb-sxp-ui\src\core\hooks\useEventReport.ts
|
1576
1597
|
*
|
1577
1598
|
*/
|
1578
1599
|
function useEventReport() {
|
1579
|
-
const { bffEventReport, popupDetailData,
|
1580
|
-
const jumpToWeb = useCallback((data, product, cta, position, traceInfo) => {
|
1600
|
+
const { bffEventReport, popupDetailData, isFromHashtag, eventTimeList, setEventTimeList } = useSxpDataSource();
|
1601
|
+
const jumpToWeb = useCallback((e, data, product, cta, position, traceInfo) => {
|
1581
1602
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13;
|
1603
|
+
const i = eventTimeList === null || eventTimeList === void 0 ? void 0 : eventTimeList.findIndex((item) => item.target === (e === null || e === void 0 ? void 0 : e.target));
|
1604
|
+
if (i !== -1) {
|
1605
|
+
return;
|
1606
|
+
}
|
1607
|
+
else if (e) {
|
1608
|
+
setEventTimeList === null || setEventTimeList === void 0 ? void 0 : setEventTimeList((prev) => [...prev, { target: e === null || e === void 0 ? void 0 : e.target, time: new Date() }]);
|
1609
|
+
}
|
1582
1610
|
let fromKName = '';
|
1583
1611
|
if (popupDetailData && (((_b = (_a = data === null || data === void 0 ? void 0 : data.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b.length) || ((_c = data === null || data === void 0 ? void 0 : data.video) === null || _c === void 0 ? void 0 : _c.bindProduct))) {
|
1584
1612
|
fromKName = 'pdpPage';
|
@@ -1606,7 +1634,7 @@ function useEventReport() {
|
|
1606
1634
|
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
1607
1635
|
eventInfo: Object.assign({ eventSubject: 'jumpToWeb', eventDescription: 'User jumped to website', productId: (_v = product === null || product === void 0 ? void 0 : product.itemId) !== null && _v !== void 0 ? _v : '', productName: (_w = product === null || product === void 0 ? void 0 : product.title) !== null && _w !== void 0 ? _w : '', price: (product === null || product === void 0 ? void 0 : product.price) ? (product === null || product === void 0 ? void 0 : product.price) + '' : '0', productCollection: (_x = product === null || product === void 0 ? void 0 : product.collection) !== null && _x !== void 0 ? _x : '', fromKName, fromKPage: location === null || location === void 0 ? void 0 : location.href, contentTags: contentTags ? JSON.stringify(contentTags) : '', position: position + '', contentId: (_z = (_y = data === null || data === void 0 ? void 0 : data.video) === null || _y === void 0 ? void 0 : _y.itemId) !== null && _z !== void 0 ? _z : '', ctatId: (_0 = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _0 !== void 0 ? _0 : '', traceInfo: (_13 = (_10 = (_8 = (_4 = (_1 = traceInfo !== null && traceInfo !== void 0 ? traceInfo : product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _1 !== void 0 ? _1 : (_3 = (_2 = data === null || data === void 0 ? void 0 : data.video) === null || _2 === void 0 ? void 0 : _2.bindProduct) === null || _3 === void 0 ? void 0 : _3.traceInfo) !== null && _4 !== void 0 ? _4 : (_7 = (_6 = (_5 = data === null || data === void 0 ? void 0 : data.video) === null || _5 === void 0 ? void 0 : _5.bindProducts) === null || _6 === void 0 ? void 0 : _6[0]) === null || _7 === void 0 ? void 0 : _7.traceInfo) !== null && _8 !== void 0 ? _8 : (_9 = data === null || data === void 0 ? void 0 : data.product) === null || _9 === void 0 ? void 0 : _9.traceInfo) !== null && _10 !== void 0 ? _10 : (_12 = (_11 = data === null || data === void 0 ? void 0 : data.video) === null || _11 === void 0 ? void 0 : _11.bindCta) === null || _12 === void 0 ? void 0 : _12.traceInfo) !== null && _13 !== void 0 ? _13 : '' }, (contentFormat && { contentFormat }))
|
1608
1636
|
});
|
1609
|
-
}, [bffEventReport, popupDetailData, isFromHashtag]);
|
1637
|
+
}, [bffEventReport, popupDetailData, isFromHashtag, eventTimeList]);
|
1610
1638
|
const productView = useCallback((data, product, cta, viewTime, position) => {
|
1611
1639
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
1612
1640
|
let fromKName = '';
|
@@ -1712,7 +1740,7 @@ const AppointForm$1 = (_a) => {
|
|
1712
1740
|
const { name, value } = e.target;
|
1713
1741
|
setFormData(Object.assign(Object.assign({}, formData), { [name]: value }));
|
1714
1742
|
}, [formData]);
|
1715
|
-
const handleSubmit = debounce(() => __awaiter(void 0, void 0, void 0, function* () {
|
1743
|
+
const handleSubmit = debounce((e) => __awaiter(void 0, void 0, void 0, function* () {
|
1716
1744
|
var _d, _e, _f, _g, _h;
|
1717
1745
|
const vals = formData;
|
1718
1746
|
if (!vals)
|
@@ -1735,7 +1763,7 @@ const AppointForm$1 = (_a) => {
|
|
1735
1763
|
const product = (_f = data === null || data === void 0 ? void 0 : data.video) === null || _f === void 0 ? void 0 : _f.bindProduct;
|
1736
1764
|
const cta = (_h = (_g = data === null || data === void 0 ? void 0 : data.video) === null || _g === void 0 ? void 0 : _g.bindProduct) === null || _h === void 0 ? void 0 : _h.bindCta;
|
1737
1765
|
const position = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
|
1738
|
-
jumpToWeb(data, product, cta, position);
|
1766
|
+
jumpToWeb(e, data, product, cta, position);
|
1739
1767
|
}
|
1740
1768
|
if (!isPopup) {
|
1741
1769
|
onClose === null || onClose === void 0 ? void 0 : onClose();
|
@@ -10182,9 +10210,9 @@ const CommodityDetail$1 = (_a) => {
|
|
10182
10210
|
product = p;
|
10183
10211
|
cta = p === null || p === void 0 ? void 0 : p.bindCta;
|
10184
10212
|
}
|
10185
|
-
const handleLink = () => {
|
10213
|
+
const handleLink = (e) => {
|
10186
10214
|
if (product === null || product === void 0 ? void 0 : product.link) {
|
10187
|
-
jumpToWeb(data, product, cta, position);
|
10215
|
+
jumpToWeb(e, data, product, cta, position);
|
10188
10216
|
if (!isPost) {
|
10189
10217
|
productView(data, product, cta, viewTime || curTimeRef.current, position);
|
10190
10218
|
}
|
@@ -10644,14 +10672,14 @@ const Prompt$1 = (_a) => {
|
|
10644
10672
|
const { popupDetailData } = useSxpDataSource();
|
10645
10673
|
const { jumpToWeb } = useEventReport();
|
10646
10674
|
const iconSrc = typeof icon === 'string' ? icon : getMediaValueByMode(icon);
|
10647
|
-
const handleOk = () => {
|
10675
|
+
const handleOk = (e) => {
|
10648
10676
|
var _a, _b, _c;
|
10649
10677
|
if (isExternalLink) {
|
10650
10678
|
const data = popupDetailData;
|
10651
10679
|
const product = (_a = data === null || data === void 0 ? void 0 : data.video) === null || _a === void 0 ? void 0 : _a.bindProduct;
|
10652
10680
|
const cta = (_c = (_b = data === null || data === void 0 ? void 0 : data.video) === null || _b === void 0 ? void 0 : _b.bindProduct) === null || _c === void 0 ? void 0 : _c.bindCta;
|
10653
10681
|
const position = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
|
10654
|
-
jumpToWeb(data, product, cta, position);
|
10682
|
+
jumpToWeb(e, data, product, cta, position);
|
10655
10683
|
}
|
10656
10684
|
if (!isPopup) {
|
10657
10685
|
onClose === null || onClose === void 0 ? void 0 : onClose();
|
@@ -11093,9 +11121,9 @@ const CommodityDetailDiroNew$1 = (_a) => {
|
|
11093
11121
|
product = p;
|
11094
11122
|
cta = p === null || p === void 0 ? void 0 : p.bindCta;
|
11095
11123
|
}
|
11096
|
-
const handleLink = () => {
|
11124
|
+
const handleLink = (e) => {
|
11097
11125
|
if (product === null || product === void 0 ? void 0 : product.link) {
|
11098
|
-
jumpToWeb(data, product, cta, position);
|
11126
|
+
jumpToWeb(e, data, product, cta, position);
|
11099
11127
|
if (!isPost) {
|
11100
11128
|
productView(data, product, cta, viewTime || curTimeRef.current, position);
|
11101
11129
|
}
|
@@ -11776,7 +11804,7 @@ const CommodityList$1 = (_a) => {
|
|
11776
11804
|
style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price
|
11777
11805
|
});
|
11778
11806
|
}, [(_d = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _d === void 0 ? void 0 : _d.enableFormattedPrice, globalConfig]);
|
11779
|
-
const handleClick = throttle((item, multiCheckIndex) => {
|
11807
|
+
const handleClick = throttle((item, multiCheckIndex, e) => {
|
11780
11808
|
ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
|
11781
11809
|
eventSubject: 'clickCta',
|
11782
11810
|
eventDescription: 'User clicked the CTA'
|
@@ -11784,7 +11812,7 @@ const CommodityList$1 = (_a) => {
|
|
11784
11812
|
setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, recData), { video: Object.assign(Object.assign({}, recData === null || recData === void 0 ? void 0 : recData.video), { bindProduct: item }), index, multiCheckIndex }));
|
11785
11813
|
if (isExternalLink) {
|
11786
11814
|
if (item === null || item === void 0 ? void 0 : item.link) {
|
11787
|
-
jumpToWeb(recData, item, item.bindCta, index);
|
11815
|
+
jumpToWeb(e, recData, item, item.bindCta, index);
|
11788
11816
|
window.location.href = window.getJointUtmLink(item.link);
|
11789
11817
|
}
|
11790
11818
|
}
|
@@ -11799,7 +11827,7 @@ const CommodityList$1 = (_a) => {
|
|
11799
11827
|
}, []);
|
11800
11828
|
return (React.createElement("ul", { role: 'list', className: css(Object.assign(Object.assign({}, style), { display: 'flex', flexDirection: 'column', gap: '10px', padding: '0 20px', marginTop: '50px', boxSizing: 'border-box' })) }, product === null || product === void 0 ? void 0 : product.map((item, index) => {
|
11801
11829
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
11802
|
-
return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement("li", { role: 'listitem', key: index, onClick: () => handleClick(item, index) },
|
11830
|
+
return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement("li", { role: 'listitem', key: index, onClick: (e) => handleClick(item, index, e) },
|
11803
11831
|
React.createElement("button", Object.assign({ role: 'button', "aria-label": item === null || item === void 0 ? void 0 : item.title, tabIndex: 0, className: css({
|
11804
11832
|
display: 'flex',
|
11805
11833
|
alignItems: 'normal',
|
@@ -12309,9 +12337,9 @@ const EventProvider = (_a) => {
|
|
12309
12337
|
const { setPopupDetailData, ctaEvent } = useSxpDataSource();
|
12310
12338
|
const { jumpToWeb } = useEventReport();
|
12311
12339
|
const [element, setElement] = useState(null);
|
12312
|
-
const handleClick = throttle((
|
12340
|
+
const handleClick = throttle((e) => {
|
12313
12341
|
var _a, _b, _c, _d, _e, _f;
|
12314
|
-
|
12342
|
+
e.preventDefault();
|
12315
12343
|
const item = multItem ? multItem : (_b = (_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.bindProduct) !== null && _b !== void 0 ? _b : rec === null || rec === void 0 ? void 0 : rec.video;
|
12316
12344
|
ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
|
12317
12345
|
eventSubject: 'clickCta',
|
@@ -12325,7 +12353,7 @@ const EventProvider = (_a) => {
|
|
12325
12353
|
if (jumpLink || link) {
|
12326
12354
|
const cta = ((_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.bindCta) || (multItem === null || multItem === void 0 ? void 0 : multItem.bindCta);
|
12327
12355
|
const product = ((_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.bindProduct) || multItem;
|
12328
|
-
jumpToWeb(rec, product, cta, index);
|
12356
|
+
jumpToWeb(e, rec, product, cta, index);
|
12329
12357
|
window.location.href = window.getJointUtmLink(jumpLink || link || '');
|
12330
12358
|
}
|
12331
12359
|
}
|
@@ -12624,8 +12652,7 @@ var styles$7 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__nkBlU","one
|
|
12624
12652
|
const Link$1 = (_a) => {
|
12625
12653
|
var _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
12626
12654
|
var { content, style, bgImg, recData, bottom_image, ctaTempStyles, index, customTitle, isActive } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "index", "customTitle", "isActive"]);
|
12627
|
-
const { sxpParameter
|
12628
|
-
useEventReport();
|
12655
|
+
const { sxpParameter } = useSxpDataSource();
|
12629
12656
|
const cta = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindCta;
|
12630
12657
|
(_c = recData === null || recData === void 0 ? void 0 : recData.video) === null || _c === void 0 ? void 0 : _c.bindProduct;
|
12631
12658
|
const src = (_e = (_d = cta === null || cta === void 0 ? void 0 : cta.icon) !== null && _d !== void 0 ? _d : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _e !== void 0 ? _e : bottom_image;
|
@@ -15059,12 +15086,12 @@ function WaterfallList$1(_a) {
|
|
15059
15086
|
(_a = scrollParent === null || scrollParent === void 0 ? void 0 : scrollParent.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('scroll', onScroll);
|
15060
15087
|
};
|
15061
15088
|
}, [onScroll, scrollParent]);
|
15062
|
-
const handleClickLink = () => {
|
15089
|
+
const handleClickLink = (e) => {
|
15063
15090
|
var _a, _b, _c, _d, _e;
|
15064
15091
|
if ((_a = data === null || data === void 0 ? void 0 : data.tag) === null || _a === void 0 ? void 0 : _a.link) {
|
15065
15092
|
reportTagsView();
|
15066
15093
|
const rec = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec;
|
15067
|
-
jumpToWeb(rec, (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.bindProduct, (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindCta, cacheActiveIndex, (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.traceInfo);
|
15094
|
+
jumpToWeb(e, rec, (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.bindProduct, (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindCta, cacheActiveIndex, (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.traceInfo);
|
15068
15095
|
window.location.href = window.getJointUtmLink((_e = data === null || data === void 0 ? void 0 : data.tag) === null || _e === void 0 ? void 0 : _e.link);
|
15069
15096
|
}
|
15070
15097
|
};
|
@@ -15290,12 +15317,12 @@ function WaterfallList(_a) {
|
|
15290
15317
|
// container?.removeEventListener('scroll', handleScroll); // 在组件卸载时移除事件监听器
|
15291
15318
|
// };
|
15292
15319
|
// }, [isLoadingData, containerRef, loadMoreData]);
|
15293
|
-
const handleClickLink = () => {
|
15320
|
+
const handleClickLink = (e) => {
|
15294
15321
|
var _a, _b, _c, _d, _e;
|
15295
15322
|
if ((_a = data === null || data === void 0 ? void 0 : data.tag) === null || _a === void 0 ? void 0 : _a.link) {
|
15296
15323
|
reportTagsView();
|
15297
15324
|
const rec = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec;
|
15298
|
-
jumpToWeb(rec, (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.bindProduct, (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindCta, cacheActiveIndex, (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.traceInfo);
|
15325
|
+
jumpToWeb(e, rec, (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.bindProduct, (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindCta, cacheActiveIndex, (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.traceInfo);
|
15299
15326
|
window.location.href = window.getJointUtmLink((_e = data === null || data === void 0 ? void 0 : data.tag) === null || _e === void 0 ? void 0 : _e.link);
|
15300
15327
|
}
|
15301
15328
|
};
|
@@ -15735,7 +15762,7 @@ const AniLink$1 = (_a) => {
|
|
15735
15762
|
const isOnScreen = useOnScreen(ref);
|
15736
15763
|
const cta = ((_d = (_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.bindCta) || ((_f = (_e = recData === null || recData === void 0 ? void 0 : recData.video) === null || _e === void 0 ? void 0 : _e.bindProduct) === null || _f === void 0 ? void 0 : _f.bindCta) || ((_g = recData === null || recData === void 0 ? void 0 : recData.video) === null || _g === void 0 ? void 0 : _g.bindCta);
|
15737
15764
|
const product = ((_j = (_h = recData === null || recData === void 0 ? void 0 : recData.video) === null || _h === void 0 ? void 0 : _h.bindProducts) === null || _j === void 0 ? void 0 : _j[0]) || ((_k = recData === null || recData === void 0 ? void 0 : recData.video) === null || _k === void 0 ? void 0 : _k.bindProduct);
|
15738
|
-
const handleTo = () => {
|
15765
|
+
const handleTo = (e) => {
|
15739
15766
|
var _a, _b, _c, _d;
|
15740
15767
|
const item = ((_b = (_a = recData === null || recData === void 0 ? void 0 : recData.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b[0]) || ((_c = recData === null || recData === void 0 ? void 0 : recData.video) === null || _c === void 0 ? void 0 : _c.bindProduct) || (recData === null || recData === void 0 ? void 0 : recData.video);
|
15741
15768
|
ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
|
@@ -15746,7 +15773,7 @@ const AniLink$1 = (_a) => {
|
|
15746
15773
|
if (isExternalLink) {
|
15747
15774
|
const link = (product === null || product === void 0 ? void 0 : product.link) || ((_d = item === null || item === void 0 ? void 0 : item.bindCta) === null || _d === void 0 ? void 0 : _d.link);
|
15748
15775
|
if (link) {
|
15749
|
-
jumpToWeb(recData, product, cta, index);
|
15776
|
+
jumpToWeb(e, recData, product, cta, index);
|
15750
15777
|
window.location.href = window.getJointUtmLink(link);
|
15751
15778
|
}
|
15752
15779
|
}
|
@@ -16182,7 +16209,7 @@ const AniLinkPopup$1 = (_a) => {
|
|
16182
16209
|
const [visible, setVisible] = useState(true);
|
16183
16210
|
const cta = ((_d = (_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.bindCta) || ((_f = (_e = recData === null || recData === void 0 ? void 0 : recData.video) === null || _e === void 0 ? void 0 : _e.bindProduct) === null || _f === void 0 ? void 0 : _f.bindCta) || ((_g = recData === null || recData === void 0 ? void 0 : recData.video) === null || _g === void 0 ? void 0 : _g.bindCta);
|
16184
16211
|
const product = ((_j = (_h = recData === null || recData === void 0 ? void 0 : recData.video) === null || _h === void 0 ? void 0 : _h.bindProducts) === null || _j === void 0 ? void 0 : _j[0]) || ((_k = recData === null || recData === void 0 ? void 0 : recData.video) === null || _k === void 0 ? void 0 : _k.bindProduct);
|
16185
|
-
const handleTo = () => {
|
16212
|
+
const handleTo = (e) => {
|
16186
16213
|
var _a, _b, _c, _d;
|
16187
16214
|
const item = ((_b = (_a = recData === null || recData === void 0 ? void 0 : recData.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b[0]) || ((_c = recData === null || recData === void 0 ? void 0 : recData.video) === null || _c === void 0 ? void 0 : _c.bindProduct) || (recData === null || recData === void 0 ? void 0 : recData.video);
|
16188
16215
|
ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
|
@@ -16193,7 +16220,7 @@ const AniLinkPopup$1 = (_a) => {
|
|
16193
16220
|
if (isExternalLink) {
|
16194
16221
|
const link = (product === null || product === void 0 ? void 0 : product.link) || ((_d = item === null || item === void 0 ? void 0 : item.bindCta) === null || _d === void 0 ? void 0 : _d.link);
|
16195
16222
|
if (link) {
|
16196
|
-
jumpToWeb(recData, product, cta, index);
|
16223
|
+
jumpToWeb(e, recData, product, cta, index);
|
16197
16224
|
window.location.href = window.getJointUtmLink(link);
|
16198
16225
|
}
|
16199
16226
|
}
|
@@ -18094,10 +18121,10 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
18094
18121
|
const isExternalLink = ((_d = (_c = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoBar) === null || _c === void 0 ? void 0 : _c.onClick) === null || _d === void 0 ? void 0 : _d.linkType) === 'externalLink';
|
18095
18122
|
const rec = visList[activeIndex];
|
18096
18123
|
return (React.createElement("div", Object.assign({ className: 'clc-sxp-logo-banner', style: { backgroundColor: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.color } }, (link && {
|
18097
|
-
onClick: () => {
|
18124
|
+
onClick: (e) => {
|
18098
18125
|
var _a, _b, _c, _d;
|
18099
18126
|
if (isExternalLink) {
|
18100
|
-
jumpToWeb(rec, (_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.bindProduct, (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.bindCta, activeIndex, ((_c = rec === null || rec === void 0 ? void 0 : rec.product) === null || _c === void 0 ? void 0 : _c.traceInfo) || ((_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.traceInfo));
|
18127
|
+
jumpToWeb(e, rec, (_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.bindProduct, (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.bindCta, activeIndex, ((_c = rec === null || rec === void 0 ? void 0 : rec.product) === null || _c === void 0 ? void 0 : _c.traceInfo) || ((_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.traceInfo));
|
18101
18128
|
}
|
18102
18129
|
new Function(link)();
|
18103
18130
|
}
|