pb-sxp-ui 1.10.2 → 1.10.4
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 +133 -75
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +133 -75
- 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 +133 -75
- 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 +26 -18
- package/es/core/context/SxpDataSourceProvider.d.ts +6 -0
- package/es/core/context/SxpDataSourceProvider.js +62 -16
- package/es/core/hooks/useEventReport.d.ts +1 -1
- package/es/core/hooks/useEventReport.js +10 -3
- package/es/materials/sxp/MultiPosts/index.js +6 -12
- 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 +26 -18
- package/lib/core/context/SxpDataSourceProvider.d.ts +6 -0
- package/lib/core/context/SxpDataSourceProvider.js +62 -16
- package/lib/core/hooks/useEventReport.d.ts +1 -1
- package/lib/core/hooks/useEventReport.js +10 -3
- package/lib/materials/sxp/MultiPosts/index.js +6 -12
- 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.cjs
CHANGED
@@ -677,10 +677,13 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
677
677
|
const popupCurTimeRef = React.useRef(null);
|
678
678
|
const [isNoMoreData, setIsNoMoreData] = React.useState(false);
|
679
679
|
const [globalConfig, setGlobalConfig] = React.useState((_b = (_a = data === null || data === void 0 ? void 0 : data.data) === null || _a === void 0 ? void 0 : _a.sxpPageConf) === null || _b === void 0 ? void 0 : _b.globalConfig);
|
680
|
-
const [pageData, setPageData] = React.useState(
|
680
|
+
const [pageData, setPageData] = React.useState();
|
681
681
|
const [showConsent, setShowConsent] = React.useState(false);
|
682
682
|
const [layoutVariantId, setLayoutVariantId] = React.useState();
|
683
683
|
const [channel, setChannel] = React.useState();
|
684
|
+
const [eventTimeList, setEventTimeList] = React.useState([]);
|
685
|
+
const [playbookType, setPlaybookType] = React.useState();
|
686
|
+
const finalPageData = React.useMemo(() => pageData !== null && pageData !== void 0 ? pageData : data, [pageData, data]);
|
684
687
|
const isShowConsent = React.useMemo(() => {
|
685
688
|
var _a, _b, _c, _d;
|
686
689
|
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) &&
|
@@ -703,6 +706,24 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
703
706
|
})) !== null && _a !== void 0 ? _a : [];
|
704
707
|
return nList;
|
705
708
|
}, []);
|
709
|
+
React.useEffect(() => {
|
710
|
+
let intervalId;
|
711
|
+
if (eventTimeList.length > 0) {
|
712
|
+
// 定期检查数组中的时间
|
713
|
+
const checkTimes = () => {
|
714
|
+
const now = new Date(); // 获取当前时间
|
715
|
+
const threshold = 15 * 1000; // 15秒的毫秒数
|
716
|
+
// 过滤掉超过15秒的时间
|
717
|
+
setEventTimeList((prevArray) => prevArray.filter((item) => now - item.time <= threshold));
|
718
|
+
};
|
719
|
+
// 每秒检查一次
|
720
|
+
intervalId = setInterval(checkTimes, 1000);
|
721
|
+
}
|
722
|
+
// 清理函数
|
723
|
+
return () => {
|
724
|
+
clearInterval(intervalId);
|
725
|
+
};
|
726
|
+
}, [eventTimeList]); // 依赖于 timeArray
|
706
727
|
React.useEffect(() => {
|
707
728
|
const handleChangeThemeTag = (tag) => {
|
708
729
|
themeTag.current = tag;
|
@@ -849,7 +870,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
849
870
|
};
|
850
871
|
}
|
851
872
|
const sessionID = storeAndLoadFeSessionId();
|
852
|
-
const ef = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ sessionID, rtc: curReqInfo.rtc, requestId: curReqInfo.requestId }, eventInfo), (getDevice$1() && { sxpDevice: getDevice$1() })), (getSystem() && { sxpSystem: getSystem() })), (getBrowserInfo() && { sxpBrowser: getBrowserInfo() })), {
|
873
|
+
const ef = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ sessionID, rtc: curReqInfo.rtc, requestId: curReqInfo.requestId }, { playbookType }), eventInfo), (getDevice$1() && { sxpDevice: getDevice$1() })), (getSystem() && { sxpSystem: getSystem() })), (getBrowserInfo() && { sxpBrowser: getBrowserInfo() })), (layoutVariantId && reportLayId && { layoutVariantId })), ((eventInfo === null || eventInfo === void 0 ? void 0 : eventInfo.position) && channel && { position: Number(eventInfo === null || eventInfo === void 0 ? void 0 : eventInfo.position) + 1 + '' }));
|
853
874
|
const realUserInfo = Object.entries(userInfo).map(([k, v]) => ({ name: k, value: v }));
|
854
875
|
const realEventInfo = Object.entries(ef)
|
855
876
|
.map(([k, v]) => v && { name: k, value: v })
|
@@ -863,7 +884,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
863
884
|
body: { userInfo: realUserInfo, eventInfo: realEventInfo },
|
864
885
|
type: 'beacon'
|
865
886
|
});
|
866
|
-
}, [bffFetch, curReqInfo, enableReportEvent, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview, layoutVariantId]);
|
887
|
+
}, [bffFetch, curReqInfo, enableReportEvent, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview, layoutVariantId, globalConfig, playbookType]);
|
867
888
|
const bffFbReport = React.useCallback(({ eventName, product }) => {
|
868
889
|
var _a, _b, _c, _d, _e;
|
869
890
|
if (!enableReportEvent ||
|
@@ -1024,17 +1045,14 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
1024
1045
|
return;
|
1025
1046
|
setLoading(true);
|
1026
1047
|
let layId;
|
1048
|
+
let pbType;
|
1027
1049
|
getRecommendVideos()
|
1028
1050
|
.then((data) => {
|
1029
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
1051
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
1030
1052
|
if (data) {
|
1031
1053
|
const list = getFilterRecList(data);
|
1032
|
-
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.playbook) === 'organic menu' && !channel) {
|
1033
|
-
list.unshift('organic menu');
|
1034
|
-
}
|
1035
|
-
setRtcList(list);
|
1036
|
-
setCacheRtcList(list);
|
1037
1054
|
let curData;
|
1055
|
+
let gldata;
|
1038
1056
|
if (data === null || data === void 0 ? void 0 : data.layoutVariantId) {
|
1039
1057
|
const id = (_b = (_a = data === null || data === void 0 ? void 0 : data.layoutVariantId) === null || _a === void 0 ? void 0 : _a.split('-')) === null || _b === void 0 ? void 0 : _b[1];
|
1040
1058
|
if (id) {
|
@@ -1044,19 +1062,49 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
1044
1062
|
if (curData) {
|
1045
1063
|
setPageData(curData);
|
1046
1064
|
document.title = (_c = curData === null || curData === void 0 ? void 0 : curData.name) !== null && _c !== void 0 ? _c : 'home';
|
1047
|
-
|
1065
|
+
gldata = (_e = (_d = curData === null || curData === void 0 ? void 0 : curData.data) === null || _d === void 0 ? void 0 : _d.sxpPageConf) === null || _e === void 0 ? void 0 : _e.globalConfig;
|
1066
|
+
setGlobalConfig(gldata);
|
1048
1067
|
onUpdateSchema === null || onUpdateSchema === void 0 ? void 0 : onUpdateSchema(curData === null || curData === void 0 ? void 0 : curData.data);
|
1049
|
-
if ((
|
1068
|
+
if ((_j = (_h = (_g = (_f = gldata === null || gldata === void 0 ? void 0 : gldata.consent) === null || _f === void 0 ? void 0 : _f[0]) === null || _g === void 0 ? void 0 : _g.item) === null || _h === void 0 ? void 0 : _h.props) === null || _j === void 0 ? void 0 : _j.privacy_necessity)
|
1050
1069
|
setShowConsent(true);
|
1051
1070
|
}
|
1071
|
+
else {
|
1072
|
+
setShowConsent(true);
|
1073
|
+
}
|
1074
|
+
}
|
1075
|
+
}
|
1076
|
+
else {
|
1077
|
+
setShowConsent(true);
|
1078
|
+
}
|
1079
|
+
if (!channel) {
|
1080
|
+
if ((gldata === null || gldata === void 0 ? void 0 : gldata.playbook) === 'organic menu' || (!gldata && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.playbook) === 'organic menu')) {
|
1081
|
+
setPlaybookType('organicMenu');
|
1082
|
+
list.unshift('organic menu');
|
1083
|
+
pbType = 'organicMenu';
|
1052
1084
|
}
|
1085
|
+
else {
|
1086
|
+
setPlaybookType('paidMedia');
|
1087
|
+
pbType = 'paidMedia';
|
1088
|
+
}
|
1089
|
+
}
|
1090
|
+
setRtcList(list);
|
1091
|
+
setCacheRtcList(list);
|
1092
|
+
bffGetTagList(curData !== null && curData !== void 0 ? curData : finalPageData);
|
1093
|
+
if (channel) {
|
1094
|
+
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
1095
|
+
eventInfo: {
|
1096
|
+
eventSubject: 'multiPostClick',
|
1097
|
+
eventDescription: 'multiPostClick',
|
1098
|
+
traceInfo: (_m = (_l = (_k = list === null || list === void 0 ? void 0 : list[0]) === null || _k === void 0 ? void 0 : _k.video) === null || _l === void 0 ? void 0 : _l.traceInfo) !== null && _m !== void 0 ? _m : '',
|
1099
|
+
branchfeed: channel
|
1100
|
+
}
|
1101
|
+
});
|
1053
1102
|
}
|
1054
|
-
bffGetTagList(curData !== null && curData !== void 0 ? curData : pageData);
|
1055
1103
|
}
|
1056
1104
|
})
|
1057
1105
|
.finally(() => {
|
1058
1106
|
bffEventReport({
|
1059
|
-
eventInfo: Object.assign({ eventSubject: 'apiRequest', eventDescription: 'api request succeed' }, (layId && { layoutVariantId: layId }))
|
1107
|
+
eventInfo: Object.assign(Object.assign({ eventSubject: 'apiRequest', eventDescription: 'api request succeed' }, (layId && { layoutVariantId: layId })), (pbType && { playbookType: pbType }))
|
1060
1108
|
});
|
1061
1109
|
setLoading(false);
|
1062
1110
|
});
|
@@ -1066,7 +1114,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
1066
1114
|
if (!isPreview)
|
1067
1115
|
return;
|
1068
1116
|
setLoading(true);
|
1069
|
-
bffGetTagList(
|
1117
|
+
bffGetTagList(data);
|
1070
1118
|
getRecommendVideos()
|
1071
1119
|
.then((data) => {
|
1072
1120
|
if (data) {
|
@@ -1132,14 +1180,16 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
1132
1180
|
isEditor,
|
1133
1181
|
isNoMoreData,
|
1134
1182
|
updateChannel,
|
1135
|
-
channel
|
1183
|
+
channel,
|
1184
|
+
eventTimeList,
|
1185
|
+
setEventTimeList
|
1136
1186
|
} }, 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({
|
1137
1187
|
rtcList,
|
1138
1188
|
mutateLike: bffMutateLike,
|
1139
1189
|
mutateUnlike: bffMutateUnlike,
|
1140
1190
|
submitForm: bffSubmitForm,
|
1141
1191
|
tagList,
|
1142
|
-
pageData
|
1192
|
+
pageData: finalPageData
|
1143
1193
|
}))));
|
1144
1194
|
};
|
1145
1195
|
var SxpDataSourceProvider$1 = React.memo(SxpDataSourceProvider);
|
@@ -1593,14 +1643,21 @@ var settingRender$d = [
|
|
1593
1643
|
* @Author: binruan@chatlabs.com
|
1594
1644
|
* @Date: 2024-03-12 10:59:06
|
1595
1645
|
* @LastEditors: binruan@chatlabs.com
|
1596
|
-
* @LastEditTime: 2024-
|
1646
|
+
* @LastEditTime: 2024-11-28 11:17:16
|
1597
1647
|
* @FilePath: \pb-sxp-ui\src\core\hooks\useEventReport.ts
|
1598
1648
|
*
|
1599
1649
|
*/
|
1600
1650
|
function useEventReport() {
|
1601
|
-
const { bffEventReport, popupDetailData,
|
1602
|
-
const jumpToWeb = React.useCallback((data, product, cta, position, traceInfo) => {
|
1651
|
+
const { bffEventReport, popupDetailData, isFromHashtag, eventTimeList, setEventTimeList } = useSxpDataSource();
|
1652
|
+
const jumpToWeb = React.useCallback((e, data, product, cta, position, traceInfo) => {
|
1603
1653
|
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;
|
1654
|
+
const i = eventTimeList === null || eventTimeList === void 0 ? void 0 : eventTimeList.findIndex((item) => item.target === (e === null || e === void 0 ? void 0 : e.target));
|
1655
|
+
if (i !== -1) {
|
1656
|
+
return;
|
1657
|
+
}
|
1658
|
+
else if (e) {
|
1659
|
+
setEventTimeList === null || setEventTimeList === void 0 ? void 0 : setEventTimeList((prev) => [...prev, { target: e === null || e === void 0 ? void 0 : e.target, time: new Date() }]);
|
1660
|
+
}
|
1604
1661
|
let fromKName = '';
|
1605
1662
|
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))) {
|
1606
1663
|
fromKName = 'pdpPage';
|
@@ -1628,7 +1685,7 @@ function useEventReport() {
|
|
1628
1685
|
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
1629
1686
|
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 }))
|
1630
1687
|
});
|
1631
|
-
}, [bffEventReport, popupDetailData, isFromHashtag]);
|
1688
|
+
}, [bffEventReport, popupDetailData, isFromHashtag, eventTimeList]);
|
1632
1689
|
const productView = React.useCallback((data, product, cta, viewTime, position) => {
|
1633
1690
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
1634
1691
|
let fromKName = '';
|
@@ -1734,7 +1791,7 @@ const AppointForm$1 = (_a) => {
|
|
1734
1791
|
const { name, value } = e.target;
|
1735
1792
|
setFormData(Object.assign(Object.assign({}, formData), { [name]: value }));
|
1736
1793
|
}, [formData]);
|
1737
|
-
const handleSubmit = lodash.debounce(() => __awaiter(void 0, void 0, void 0, function* () {
|
1794
|
+
const handleSubmit = lodash.debounce((e) => __awaiter(void 0, void 0, void 0, function* () {
|
1738
1795
|
var _d, _e, _f, _g, _h;
|
1739
1796
|
const vals = formData;
|
1740
1797
|
if (!vals)
|
@@ -1757,7 +1814,7 @@ const AppointForm$1 = (_a) => {
|
|
1757
1814
|
const product = (_f = data === null || data === void 0 ? void 0 : data.video) === null || _f === void 0 ? void 0 : _f.bindProduct;
|
1758
1815
|
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;
|
1759
1816
|
const position = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
|
1760
|
-
jumpToWeb(data, product, cta, position);
|
1817
|
+
jumpToWeb(e, data, product, cta, position);
|
1761
1818
|
}
|
1762
1819
|
if (!isPopup) {
|
1763
1820
|
onClose === null || onClose === void 0 ? void 0 : onClose();
|
@@ -10204,9 +10261,9 @@ const CommodityDetail$1 = (_a) => {
|
|
10204
10261
|
product = p;
|
10205
10262
|
cta = p === null || p === void 0 ? void 0 : p.bindCta;
|
10206
10263
|
}
|
10207
|
-
const handleLink = () => {
|
10264
|
+
const handleLink = (e) => {
|
10208
10265
|
if (product === null || product === void 0 ? void 0 : product.link) {
|
10209
|
-
jumpToWeb(data, product, cta, position);
|
10266
|
+
jumpToWeb(e, data, product, cta, position);
|
10210
10267
|
if (!isPost) {
|
10211
10268
|
productView(data, product, cta, viewTime || curTimeRef.current, position);
|
10212
10269
|
}
|
@@ -10666,14 +10723,14 @@ const Prompt$1 = (_a) => {
|
|
10666
10723
|
const { popupDetailData } = useSxpDataSource();
|
10667
10724
|
const { jumpToWeb } = useEventReport();
|
10668
10725
|
const iconSrc = typeof icon === 'string' ? icon : getMediaValueByMode(icon);
|
10669
|
-
const handleOk = () => {
|
10726
|
+
const handleOk = (e) => {
|
10670
10727
|
var _a, _b, _c;
|
10671
10728
|
if (isExternalLink) {
|
10672
10729
|
const data = popupDetailData;
|
10673
10730
|
const product = (_a = data === null || data === void 0 ? void 0 : data.video) === null || _a === void 0 ? void 0 : _a.bindProduct;
|
10674
10731
|
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;
|
10675
10732
|
const position = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
|
10676
|
-
jumpToWeb(data, product, cta, position);
|
10733
|
+
jumpToWeb(e, data, product, cta, position);
|
10677
10734
|
}
|
10678
10735
|
if (!isPopup) {
|
10679
10736
|
onClose === null || onClose === void 0 ? void 0 : onClose();
|
@@ -11115,9 +11172,9 @@ const CommodityDetailDiroNew$1 = (_a) => {
|
|
11115
11172
|
product = p;
|
11116
11173
|
cta = p === null || p === void 0 ? void 0 : p.bindCta;
|
11117
11174
|
}
|
11118
|
-
const handleLink = () => {
|
11175
|
+
const handleLink = (e) => {
|
11119
11176
|
if (product === null || product === void 0 ? void 0 : product.link) {
|
11120
|
-
jumpToWeb(data, product, cta, position);
|
11177
|
+
jumpToWeb(e, data, product, cta, position);
|
11121
11178
|
if (!isPost) {
|
11122
11179
|
productView(data, product, cta, viewTime || curTimeRef.current, position);
|
11123
11180
|
}
|
@@ -11798,7 +11855,7 @@ const CommodityList$1 = (_a) => {
|
|
11798
11855
|
style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price
|
11799
11856
|
});
|
11800
11857
|
}, [(_d = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _d === void 0 ? void 0 : _d.enableFormattedPrice, globalConfig]);
|
11801
|
-
const handleClick = lodash.throttle((item, multiCheckIndex) => {
|
11858
|
+
const handleClick = lodash.throttle((item, multiCheckIndex, e) => {
|
11802
11859
|
ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
|
11803
11860
|
eventSubject: 'clickCta',
|
11804
11861
|
eventDescription: 'User clicked the CTA'
|
@@ -11806,7 +11863,7 @@ const CommodityList$1 = (_a) => {
|
|
11806
11863
|
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 }));
|
11807
11864
|
if (isExternalLink) {
|
11808
11865
|
if (item === null || item === void 0 ? void 0 : item.link) {
|
11809
|
-
jumpToWeb(recData, item, item.bindCta, index);
|
11866
|
+
jumpToWeb(e, recData, item, item.bindCta, index);
|
11810
11867
|
window.location.href = window.getJointUtmLink(item.link);
|
11811
11868
|
}
|
11812
11869
|
}
|
@@ -11821,7 +11878,7 @@ const CommodityList$1 = (_a) => {
|
|
11821
11878
|
}, []);
|
11822
11879
|
return (React.createElement("ul", { role: 'list', className: css.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) => {
|
11823
11880
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
11824
|
-
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) },
|
11881
|
+
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) },
|
11825
11882
|
React.createElement("button", Object.assign({ role: 'button', "aria-label": item === null || item === void 0 ? void 0 : item.title, tabIndex: 0, className: css.css({
|
11826
11883
|
display: 'flex',
|
11827
11884
|
alignItems: 'normal',
|
@@ -12331,9 +12388,9 @@ const EventProvider = (_a) => {
|
|
12331
12388
|
const { setPopupDetailData, ctaEvent } = useSxpDataSource();
|
12332
12389
|
const { jumpToWeb } = useEventReport();
|
12333
12390
|
const [element, setElement] = React.useState(null);
|
12334
|
-
const handleClick = lodash.throttle((
|
12391
|
+
const handleClick = lodash.throttle((e) => {
|
12335
12392
|
var _a, _b, _c, _d, _e, _f;
|
12336
|
-
|
12393
|
+
e.preventDefault();
|
12337
12394
|
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;
|
12338
12395
|
ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
|
12339
12396
|
eventSubject: 'clickCta',
|
@@ -12347,7 +12404,7 @@ const EventProvider = (_a) => {
|
|
12347
12404
|
if (jumpLink || link) {
|
12348
12405
|
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);
|
12349
12406
|
const product = ((_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.bindProduct) || multItem;
|
12350
|
-
jumpToWeb(rec, product, cta, index);
|
12407
|
+
jumpToWeb(e, rec, product, cta, index);
|
12351
12408
|
window.location.href = window.getJointUtmLink(jumpLink || link || '');
|
12352
12409
|
}
|
12353
12410
|
}
|
@@ -12646,8 +12703,7 @@ var styles$7 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__nkBlU","one
|
|
12646
12703
|
const Link$1 = (_a) => {
|
12647
12704
|
var _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
12648
12705
|
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"]);
|
12649
|
-
const { sxpParameter
|
12650
|
-
useEventReport();
|
12706
|
+
const { sxpParameter } = useSxpDataSource();
|
12651
12707
|
const cta = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindCta;
|
12652
12708
|
(_c = recData === null || recData === void 0 ? void 0 : recData.video) === null || _c === void 0 ? void 0 : _c.bindProduct;
|
12653
12709
|
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;
|
@@ -15081,12 +15137,12 @@ function WaterfallList$1(_a) {
|
|
15081
15137
|
(_a = scrollParent === null || scrollParent === void 0 ? void 0 : scrollParent.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('scroll', onScroll);
|
15082
15138
|
};
|
15083
15139
|
}, [onScroll, scrollParent]);
|
15084
|
-
const handleClickLink = () => {
|
15140
|
+
const handleClickLink = (e) => {
|
15085
15141
|
var _a, _b, _c, _d, _e;
|
15086
15142
|
if ((_a = data === null || data === void 0 ? void 0 : data.tag) === null || _a === void 0 ? void 0 : _a.link) {
|
15087
15143
|
reportTagsView();
|
15088
15144
|
const rec = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec;
|
15089
|
-
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);
|
15145
|
+
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);
|
15090
15146
|
window.location.href = window.getJointUtmLink((_e = data === null || data === void 0 ? void 0 : data.tag) === null || _e === void 0 ? void 0 : _e.link);
|
15091
15147
|
}
|
15092
15148
|
};
|
@@ -15312,12 +15368,12 @@ function WaterfallList(_a) {
|
|
15312
15368
|
// container?.removeEventListener('scroll', handleScroll); // 在组件卸载时移除事件监听器
|
15313
15369
|
// };
|
15314
15370
|
// }, [isLoadingData, containerRef, loadMoreData]);
|
15315
|
-
const handleClickLink = () => {
|
15371
|
+
const handleClickLink = (e) => {
|
15316
15372
|
var _a, _b, _c, _d, _e;
|
15317
15373
|
if ((_a = data === null || data === void 0 ? void 0 : data.tag) === null || _a === void 0 ? void 0 : _a.link) {
|
15318
15374
|
reportTagsView();
|
15319
15375
|
const rec = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec;
|
15320
|
-
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);
|
15376
|
+
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);
|
15321
15377
|
window.location.href = window.getJointUtmLink((_e = data === null || data === void 0 ? void 0 : data.tag) === null || _e === void 0 ? void 0 : _e.link);
|
15322
15378
|
}
|
15323
15379
|
};
|
@@ -15757,7 +15813,7 @@ const AniLink$1 = (_a) => {
|
|
15757
15813
|
const isOnScreen = useOnScreen(ref);
|
15758
15814
|
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);
|
15759
15815
|
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);
|
15760
|
-
const handleTo = () => {
|
15816
|
+
const handleTo = (e) => {
|
15761
15817
|
var _a, _b, _c, _d;
|
15762
15818
|
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);
|
15763
15819
|
ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
|
@@ -15768,7 +15824,7 @@ const AniLink$1 = (_a) => {
|
|
15768
15824
|
if (isExternalLink) {
|
15769
15825
|
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);
|
15770
15826
|
if (link) {
|
15771
|
-
jumpToWeb(recData, product, cta, index);
|
15827
|
+
jumpToWeb(e, recData, product, cta, index);
|
15772
15828
|
window.location.href = window.getJointUtmLink(link);
|
15773
15829
|
}
|
15774
15830
|
}
|
@@ -16204,7 +16260,7 @@ const AniLinkPopup$1 = (_a) => {
|
|
16204
16260
|
const [visible, setVisible] = React.useState(true);
|
16205
16261
|
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);
|
16206
16262
|
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);
|
16207
|
-
const handleTo = () => {
|
16263
|
+
const handleTo = (e) => {
|
16208
16264
|
var _a, _b, _c, _d;
|
16209
16265
|
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);
|
16210
16266
|
ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
|
@@ -16215,7 +16271,7 @@ const AniLinkPopup$1 = (_a) => {
|
|
16215
16271
|
if (isExternalLink) {
|
16216
16272
|
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);
|
16217
16273
|
if (link) {
|
16218
|
-
jumpToWeb(recData, product, cta, index);
|
16274
|
+
jumpToWeb(e, recData, product, cta, index);
|
16219
16275
|
window.location.href = window.getJointUtmLink(link);
|
16220
16276
|
}
|
16221
16277
|
}
|
@@ -16823,7 +16879,7 @@ const MultiPosts$1 = (_a) => {
|
|
16823
16879
|
const { isActive } = useSwiperSlide() || {};
|
16824
16880
|
const initRef = React.useRef(false);
|
16825
16881
|
const viewTime = React.useRef();
|
16826
|
-
const
|
16882
|
+
const traceInfo = (_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.traceInfo) !== null && _c !== void 0 ? _c : '';
|
16827
16883
|
const getPropsVal = React.useCallback((index, str) => {
|
16828
16884
|
try {
|
16829
16885
|
return new Function('props', 'str', `if (str) {
|
@@ -16839,14 +16895,6 @@ const MultiPosts$1 = (_a) => {
|
|
16839
16895
|
const value = v === null || v === void 0 ? void 0 : v.value;
|
16840
16896
|
if (!value)
|
16841
16897
|
return;
|
16842
|
-
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
16843
|
-
eventInfo: {
|
16844
|
-
eventSubject: 'multiPostClick',
|
16845
|
-
eventDescription: 'multiPostClick',
|
16846
|
-
traceinfo,
|
16847
|
-
branchfeed: (v === null || v === void 0 ? void 0 : v.linkType) === 'recommendFlow' && value ? value : ''
|
16848
|
-
}
|
16849
|
-
});
|
16850
16898
|
if ((v === null || v === void 0 ? void 0 : v.linkType) === 'recommendFlow') {
|
16851
16899
|
endMultiPost('multipostClick');
|
16852
16900
|
updateChannel === null || updateChannel === void 0 ? void 0 : updateChannel(value);
|
@@ -16864,7 +16912,7 @@ const MultiPosts$1 = (_a) => {
|
|
16864
16912
|
eventDescription: 'startMultiPost',
|
16865
16913
|
contentFormat: 'IMAGE',
|
16866
16914
|
position: '0',
|
16867
|
-
|
16915
|
+
traceInfo
|
16868
16916
|
}
|
16869
16917
|
});
|
16870
16918
|
}, []);
|
@@ -16875,7 +16923,7 @@ const MultiPosts$1 = (_a) => {
|
|
16875
16923
|
eventDescription: 'endMultiPost',
|
16876
16924
|
contentFormat: 'IMAGE',
|
16877
16925
|
position: '0',
|
16878
|
-
|
16926
|
+
traceInfo,
|
16879
16927
|
nextStep: nextStep || 'others',
|
16880
16928
|
timeOnSite: Math.floor((new Date() - (viewTime === null || viewTime === void 0 ? void 0 : viewTime.current)) / 1000) + ''
|
16881
16929
|
}
|
@@ -16891,6 +16939,8 @@ const MultiPosts$1 = (_a) => {
|
|
16891
16939
|
}
|
16892
16940
|
}, [isActive]);
|
16893
16941
|
React.useEffect(() => {
|
16942
|
+
if (!isActive)
|
16943
|
+
return;
|
16894
16944
|
const onShow = () => startMultiPost();
|
16895
16945
|
const onHide = () => endMultiPost();
|
16896
16946
|
SXP_EVENT_BUS.on(SXP_EVENT_TYPE.PAGE_DID_SHOW, onShow);
|
@@ -16901,7 +16951,7 @@ const MultiPosts$1 = (_a) => {
|
|
16901
16951
|
};
|
16902
16952
|
}, [isActive]);
|
16903
16953
|
return (React.createElement("div", { className: 'multiposts', style: Object.assign(Object.assign({}, style), getBgStyle(bgImgUrl)) }, Array.from({ length: 4 }, (_, index) => {
|
16904
|
-
return (React.createElement("button", { className: 'multiposts-btn', role: 'button', "aria-label": `multiposts-${index + 1}`, onClick: () => handleClick(index) },
|
16954
|
+
return (React.createElement("button", { hidden: !getPropsVal(index, 'Url'), className: 'multiposts-btn', role: 'button', "aria-label": `multiposts-${index + 1}`, onClick: () => handleClick(index) },
|
16905
16955
|
React.createElement("img", { className: 'multiposts-btn-img', src: getPropsVal(index, 'Url'), alt: `multiposts-img-${index + 1}` })));
|
16906
16956
|
})));
|
16907
16957
|
};
|
@@ -17935,7 +17985,7 @@ var NavBack$1 = React.memo(NavBack);
|
|
17935
17985
|
* @Author: binruan@chatlabs.com
|
17936
17986
|
* @Date: 2024-03-20 10:27:31
|
17937
17987
|
* @LastEditors: binruan@chatlabs.com
|
17938
|
-
* @LastEditTime: 2024-
|
17988
|
+
* @LastEditTime: 2024-12-03 14:41:51
|
17939
17989
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
|
17940
17990
|
*
|
17941
17991
|
*/
|
@@ -18027,20 +18077,22 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
18027
18077
|
else if (item === null || item === void 0 ? void 0 : item.product) {
|
18028
18078
|
fromKName = 'productPage';
|
18029
18079
|
}
|
18030
|
-
|
18031
|
-
|
18032
|
-
|
18033
|
-
|
18034
|
-
|
18035
|
-
|
18036
|
-
|
18037
|
-
|
18038
|
-
|
18039
|
-
|
18040
|
-
|
18041
|
-
|
18042
|
-
|
18043
|
-
|
18080
|
+
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.playbook) !== 'organic menu' || activeIndex !== 0) {
|
18081
|
+
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
18082
|
+
eventInfo: {
|
18083
|
+
sessionDuration: Math.floor((new Date() - curTime.current) / 1000) + '',
|
18084
|
+
eventSubject: 'sessionCompleted',
|
18085
|
+
eventDescription: 'Session completed',
|
18086
|
+
contentId: (_m = item === null || item === void 0 ? void 0 : item.video) === null || _m === void 0 ? void 0 : _m.itemId,
|
18087
|
+
productId: (_o = item === null || item === void 0 ? void 0 : item.product) === null || _o === void 0 ? void 0 : _o.itemId,
|
18088
|
+
position: activeIndex + '',
|
18089
|
+
fromKName,
|
18090
|
+
fromKPage: location === null || location === void 0 ? void 0 : location.href,
|
18091
|
+
ctatId: (_r = (_q = (_p = item === null || item === void 0 ? void 0 : item.video) === null || _p === void 0 ? void 0 : _p.bindCta) === null || _q === void 0 ? void 0 : _q.itemId) !== null && _r !== void 0 ? _r : '',
|
18092
|
+
traceInfo: (_v = (_t = (_s = item === null || item === void 0 ? void 0 : item.video) === null || _s === void 0 ? void 0 : _s.traceInfo) !== null && _t !== void 0 ? _t : (_u = item === null || item === void 0 ? void 0 : item.product) === null || _u === void 0 ? void 0 : _u.traceInfo) !== null && _v !== void 0 ? _v : ''
|
18093
|
+
}
|
18094
|
+
});
|
18095
|
+
}
|
18044
18096
|
}
|
18045
18097
|
else if (document.visibilityState === 'visible') {
|
18046
18098
|
if (skipLinkRef.current === true) {
|
@@ -18116,10 +18168,10 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
18116
18168
|
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';
|
18117
18169
|
const rec = visList[activeIndex];
|
18118
18170
|
return (React.createElement("div", Object.assign({ className: 'clc-sxp-logo-banner', style: { backgroundColor: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.color } }, (link && {
|
18119
|
-
onClick: () => {
|
18171
|
+
onClick: (e) => {
|
18120
18172
|
var _a, _b, _c, _d;
|
18121
18173
|
if (isExternalLink) {
|
18122
|
-
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));
|
18174
|
+
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));
|
18123
18175
|
}
|
18124
18176
|
new Function(link)();
|
18125
18177
|
}
|
@@ -18222,9 +18274,12 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
18222
18274
|
if (!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLike) || !visible)
|
18223
18275
|
return;
|
18224
18276
|
let top = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconY) !== null && _a !== void 0 ? _a : 400;
|
18225
|
-
if (waterFallData && top < 40 && globalConfig.likeIconYPosit === 'top') {
|
18277
|
+
if (waterFallData && top < 40 && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconYPosit) === 'top') {
|
18226
18278
|
top += 40;
|
18227
18279
|
}
|
18280
|
+
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconYPosit) === 'top') {
|
18281
|
+
top += minusHeight;
|
18282
|
+
}
|
18228
18283
|
if (rec === null || rec === void 0 ? void 0 : rec.video) {
|
18229
18284
|
return (React.createElement(LikeButton$1, { key: rec.position, activeIcon: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIcon, unActicveIcon: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unlikeIcon, active: rec.isCollected, recData: rec, className: 'clc-sxp-like-button', style: {
|
18230
18285
|
position: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconFixed) ? 'fixed' : 'absolute',
|
@@ -18396,6 +18451,9 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
18396
18451
|
if (waterFallData && top < 40 && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconYPosit) === 'top') {
|
18397
18452
|
top += 40;
|
18398
18453
|
}
|
18454
|
+
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconYPosit) === 'top') {
|
18455
|
+
top += minusHeight;
|
18456
|
+
}
|
18399
18457
|
return (((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowMute) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowMute) === true) && (React.createElement(ToggleButton$1, { style: {
|
18400
18458
|
position: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed) ? 'fixed' : 'absolute',
|
18401
18459
|
visibility: ((_c = (_b = visList === null || visList === void 0 ? void 0 : visList[activeIndex]) === null || _b === void 0 ? void 0 : _b.video) === null || _c === void 0 ? void 0 : _c.url) ? 'visible' : 'hidden',
|
@@ -18455,7 +18513,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
18455
18513
|
eventInfo: {
|
18456
18514
|
eventSubject: 'backMultiPostClick',
|
18457
18515
|
eventDescription: 'backMultiPostClick',
|
18458
|
-
|
18516
|
+
traceInfo: (_c = (_b = (_a = data === null || data === void 0 ? void 0 : data[0]) === null || _a === void 0 ? void 0 : _a.video) === null || _b === void 0 ? void 0 : _b.traceInfo) !== null && _c !== void 0 ? _c : ''
|
18459
18517
|
}
|
18460
18518
|
});
|
18461
18519
|
location === null || location === void 0 ? void 0 : location.reload();
|