pb-sxp-ui 1.17.0 → 1.18.0
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 +396 -324
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +7 -15
- package/dist/index.js +396 -324
- 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 +396 -324
- 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/core/components/DiyPortalPreview/VideoWidget.js +10 -8
- package/es/core/components/DiyPortalPreview/index.js +3 -5
- package/es/core/components/DiyStoryPreview/index.js +18 -7
- package/es/core/components/SxpPageRender/ExpandableText.js +2 -2
- package/es/core/components/SxpPageRender/LikeButton/index.js +18 -16
- package/es/core/components/SxpPageRender/PictureGroup/index.d.ts +5 -0
- package/es/core/components/SxpPageRender/PictureGroup/index.js +39 -13
- package/es/core/components/SxpPageRender/RenderCard.d.ts +1 -0
- package/es/core/components/SxpPageRender/RenderCard.js +2 -14
- package/es/core/components/SxpPageRender/VideoWidget/index.js +32 -45
- package/es/core/components/SxpPageRender/WaterFall/index.js +4 -3
- package/es/core/components/SxpPageRender/index.js +57 -41
- package/es/core/context/SxpDataSourceProvider.d.ts +5 -12
- package/es/core/context/SxpDataSourceProvider.js +62 -35
- package/es/core/hooks/useEventReport.js +6 -5
- package/es/materials/sxp/consentPopup/Display/index.js +1 -1
- package/es/materials/sxp/cta/AniLinkPopup/material.js +3 -2
- package/es/materials/sxp/popup/CommodityDetail/material.js +2 -1
- package/es/materials/sxp/popup/CommodityList/index.js +5 -4
- package/es/materials/sxp/popup/CommodityList/material.js +1 -1
- package/es/materials/sxp/popup/CommodityList/settingRender.js +1 -1
- package/es/materials/sxp/template/Appoint/material.js +2 -1
- package/es/materials/sxp/template/Commodity/material.js +3 -2
- package/es/materials/sxp/template/CommodityDiro/material.js +3 -2
- package/es/materials/sxp/template/CommodityDiroNew/material.js +4 -2
- package/es/materials/sxp/template/Link/material.js +4 -2
- package/es/materials/sxp/template/MultiCommodity/index.js +1 -1
- package/es/materials/sxp/template/MultiCommodity/material.js +2 -1
- package/es/materials/sxp/template/MultiCommodityDiro/index.js +1 -1
- package/es/materials/sxp/template/MultiCommodityDiro/material.js +3 -2
- package/es/materials/sxp/template/MultiCommodityDiroNew/index.js +1 -1
- package/es/materials/sxp/template/MultiCommodityDiroNew/material.js +4 -2
- package/es/materials/sxp/template/NineCommodity/material.js +3 -2
- package/es/materials/sxp/template/components/CommodityGroup.js +1 -1
- package/es/materials/sxp/template/components/settingRender.js +1 -1
- package/lib/core/components/DiyPortalPreview/VideoWidget.js +10 -8
- package/lib/core/components/DiyPortalPreview/index.js +3 -5
- package/lib/core/components/DiyStoryPreview/index.js +18 -7
- package/lib/core/components/SxpPageRender/ExpandableText.js +2 -2
- package/lib/core/components/SxpPageRender/LikeButton/index.js +18 -16
- package/lib/core/components/SxpPageRender/PictureGroup/index.d.ts +5 -0
- package/lib/core/components/SxpPageRender/PictureGroup/index.js +38 -12
- package/lib/core/components/SxpPageRender/RenderCard.d.ts +1 -0
- package/lib/core/components/SxpPageRender/RenderCard.js +2 -14
- package/lib/core/components/SxpPageRender/VideoWidget/index.js +32 -45
- package/lib/core/components/SxpPageRender/WaterFall/index.js +4 -3
- package/lib/core/components/SxpPageRender/index.js +57 -41
- package/lib/core/context/SxpDataSourceProvider.d.ts +5 -12
- package/lib/core/context/SxpDataSourceProvider.js +62 -35
- package/lib/core/hooks/useEventReport.js +6 -5
- package/lib/materials/sxp/consentPopup/Display/index.js +1 -1
- package/lib/materials/sxp/cta/AniLinkPopup/material.js +2 -1
- package/lib/materials/sxp/popup/CommodityDetail/material.js +2 -1
- package/lib/materials/sxp/popup/CommodityList/index.js +5 -4
- package/lib/materials/sxp/popup/CommodityList/material.js +1 -1
- package/lib/materials/sxp/popup/CommodityList/settingRender.js +1 -1
- package/lib/materials/sxp/template/Appoint/material.js +2 -1
- package/lib/materials/sxp/template/Commodity/material.js +3 -2
- package/lib/materials/sxp/template/CommodityDiro/material.js +3 -2
- package/lib/materials/sxp/template/CommodityDiroNew/material.js +4 -2
- package/lib/materials/sxp/template/Link/material.js +4 -2
- package/lib/materials/sxp/template/MultiCommodity/index.js +1 -1
- package/lib/materials/sxp/template/MultiCommodity/material.js +2 -1
- package/lib/materials/sxp/template/MultiCommodityDiro/index.js +1 -1
- package/lib/materials/sxp/template/MultiCommodityDiro/material.js +3 -2
- package/lib/materials/sxp/template/MultiCommodityDiroNew/index.js +1 -1
- package/lib/materials/sxp/template/MultiCommodityDiroNew/material.js +4 -2
- package/lib/materials/sxp/template/NineCommodity/material.js +3 -2
- package/lib/materials/sxp/template/components/CommodityGroup.js +1 -1
- package/lib/materials/sxp/template/components/settingRender.js +1 -1
- package/package.json +1 -1
package/dist/pb-ui.js
CHANGED
@@ -637,6 +637,7 @@
|
|
637
637
|
const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false, enabledMetaConversionApi = false, consentHeight, consentWidth, isOpenConsent = false, isEditor = false, utmParameter, channelQueryList, data, dataList, isDiyH5, onUpdateSchema, onUpdateChannel }) => {
|
638
638
|
var _a, _b, _c, _d, _e;
|
639
639
|
const [rtcList, setRtcList] = React.useState([]);
|
640
|
+
const [firstRtcList, setFirstRtcList] = React.useState([]);
|
640
641
|
const [tagList, setTagList] = React.useState([]);
|
641
642
|
const [loading, setLoading] = React.useState(true);
|
642
643
|
const [curReqInfo, setCurReqInfo] = React.useState({ rtc: '', requestId: '' });
|
@@ -668,6 +669,10 @@
|
|
668
669
|
const [chatlabsId, setChatlabsId] = React.useState();
|
669
670
|
const finalPageData = React.useMemo(() => pageData !== null && pageData !== void 0 ? pageData : data, [pageData, data]);
|
670
671
|
const pixelPvStatusRef = React.useRef(false);
|
672
|
+
const isDiyPage = React.useMemo(() => {
|
673
|
+
var _a, _b, _c;
|
674
|
+
return isDiyH5 && !((_c = (_b = (_a = finalPageData === null || finalPageData === void 0 ? void 0 : finalPageData.data) === null || _a === void 0 ? void 0 : _a.sxpPageConf) === null || _b === void 0 ? void 0 : _b.globalConfig) === null || _c === void 0 ? void 0 : _c.enablePreview);
|
675
|
+
}, [isDiyH5, finalPageData]);
|
671
676
|
const isShowConsent = React.useMemo(() => {
|
672
677
|
var _a, _b, _c, _d;
|
673
678
|
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) &&
|
@@ -730,7 +735,7 @@
|
|
730
735
|
}, [bffDataSource]);
|
731
736
|
// bff API 请求方法
|
732
737
|
const bffFetch = React.useCallback((path, options, isBota = true) => {
|
733
|
-
var _a;
|
738
|
+
var _a, _b;
|
734
739
|
if (!bffDataSource)
|
735
740
|
return;
|
736
741
|
const url = bffDataSource.url;
|
@@ -743,8 +748,9 @@
|
|
743
748
|
val.split('=')[0];
|
744
749
|
val.split('=')[1];
|
745
750
|
});
|
751
|
+
options.body = Object.assign(Object.assign({}, options.body), { productUserId: fakeUserId });
|
746
752
|
return window
|
747
|
-
.fetch(`${url}/api/${path}`, Object.assign({ headers: Object.assign({ 'Content-Type': 'application/json', 'x-user-id': fakeUserId }, bffDataSource.headers), method: options.method, body: options.type === 'beacon' && isBota
|
753
|
+
.fetch(`${url}/api/${path}`, Object.assign({ headers: Object.assign({ 'Content-Type': 'application/json', 'x-user-id': fakeUserId, 'tenant-id': (_b = bffDataSource === null || bffDataSource === void 0 ? void 0 : bffDataSource.headers) === null || _b === void 0 ? void 0 : _b['x-app-id'] }, bffDataSource.headers), method: options.method, body: options.type === 'beacon' && isBota
|
748
754
|
? JSON.stringify({
|
749
755
|
body: btoa(encodeURIComponent(JSON.stringify(Object.assign(Object.assign(Object.assign({}, options.body), bffDataSource.headers), { 'x-user-id': fakeUserId }))))
|
750
756
|
})
|
@@ -984,8 +990,8 @@
|
|
984
990
|
}, [bffDataSource]);
|
985
991
|
// 获取推荐视频数据
|
986
992
|
const getRecommendVideos = React.useCallback((query) => __awaiter(void 0, void 0, void 0, function* () {
|
987
|
-
var _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
|
988
|
-
query = Object.assign(Object.assign({ maxSize: (_f = query === null || query === void 0 ? void 0 : query.maxSize) !== null && _f !== void 0 ? _f : maxSize, defaultSize: (_g = query === null || query === void 0 ? void 0 : query.defaultSize) !== null && _g !== void 0 ? _g : defaultSize, hashTag: query === null || query === void 0 ? void 0 : query.hashTag, traceInfo: query === null || query === void 0 ? void 0 : query.traceInfo, themeTag: query === null || query === void 0 ? void 0 : query.themeTag, pageNum: query === null || query === void 0 ? void 0 : query.pageNum, contentFilter: query === null || query === void 0 ? void 0 : query.contentFilter, productFilter: query === null || query === void 0 ? void 0 : query.productFilter }, (chatlabsId && { chatlabsId })), (
|
993
|
+
var _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
|
994
|
+
query = Object.assign(Object.assign({ maxSize: (_f = query === null || query === void 0 ? void 0 : query.maxSize) !== null && _f !== void 0 ? _f : maxSize, defaultSize: (_g = query === null || query === void 0 ? void 0 : query.defaultSize) !== null && _g !== void 0 ? _g : defaultSize, hashTag: query === null || query === void 0 ? void 0 : query.hashTag, traceInfo: query === null || query === void 0 ? void 0 : query.traceInfo, themeTag: query === null || query === void 0 ? void 0 : query.themeTag, pageNum: query === null || query === void 0 ? void 0 : query.pageNum, contentFilter: query === null || query === void 0 ? void 0 : query.contentFilter, productFilter: query === null || query === void 0 ? void 0 : query.productFilter }, (chatlabsId && { chatlabsId })), (isDiyPage && { type: 'story' }));
|
989
995
|
if (channel) {
|
990
996
|
query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(channel) });
|
991
997
|
}
|
@@ -998,9 +1004,10 @@
|
|
998
1004
|
if (val)
|
999
1005
|
query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(val) });
|
1000
1006
|
}
|
1007
|
+
const isDiy = isDiyH5 && ((_o = (_m = (_l = finalPageData === null || finalPageData === void 0 ? void 0 : finalPageData.data) === null || _l === void 0 ? void 0 : _l.sxpPageConf) === null || _m === void 0 ? void 0 : _m.globalConfig) === null || _o === void 0 ? void 0 : _o.enablePreview);
|
1001
1008
|
if (isEditor) {
|
1002
1009
|
let pageNum = 1;
|
1003
|
-
query = Object.assign(Object.assign(Object.assign({}, query), { directPage: true, level: 1 }), (!utmVal && channelQueryList && (channelQueryList === null || channelQueryList === void 0 ? void 0 : channelQueryList.length) > 0 && { channel: channelQueryList === null || channelQueryList === void 0 ? void 0 : channelQueryList[0] }));
|
1010
|
+
query = Object.assign(Object.assign(Object.assign(Object.assign({}, query), { directPage: true, level: 1 }), (!utmVal && channelQueryList && (channelQueryList === null || channelQueryList === void 0 ? void 0 : channelQueryList.length) > 0 && { channel: channelQueryList === null || channelQueryList === void 0 ? void 0 : channelQueryList[0] })), (isDiy && { maxRecs: query === null || query === void 0 ? void 0 : query.maxSize }));
|
1004
1011
|
if (!(query === null || query === void 0 ? void 0 : query.channel) || isInit.current) {
|
1005
1012
|
return undefined;
|
1006
1013
|
}
|
@@ -1008,19 +1015,22 @@
|
|
1008
1015
|
let list = [];
|
1009
1016
|
let result = null;
|
1010
1017
|
const recurveRecList = (query) => __awaiter(void 0, void 0, void 0, function* () {
|
1011
|
-
var
|
1018
|
+
var _y, _z, _0, _1, _2, _3;
|
1012
1019
|
query.pageNum = pageNum;
|
1013
|
-
result = yield (
|
1020
|
+
result = isDiy ? yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v3/recommend/direct/page/view', { method: 'POST', body: query })) : yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('recommend/direct_page', { method: 'POST', body: query }));
|
1014
1021
|
if (!(result === null || result === void 0 ? void 0 : result.success)) {
|
1015
1022
|
return undefined;
|
1016
1023
|
}
|
1017
1024
|
setLoading(false);
|
1018
|
-
list = list.concat((
|
1025
|
+
list = list.concat((_1 = (_0 = (_z = (_y = result === null || result === void 0 ? void 0 : result.data) === null || _y === void 0 ? void 0 : _y.recList) === null || _z === void 0 ? void 0 : _z.filter) === null || _0 === void 0 ? void 0 : _0.call(_z, (item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video))) !== null && _1 !== void 0 ? _1 : []);
|
1019
1026
|
if ((rtcList === null || rtcList === void 0 ? void 0 : rtcList.length) === 0) {
|
1020
1027
|
setRtcList(getFilterRecList(Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list })));
|
1021
1028
|
setCacheRtcList(getFilterRecList(Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list })));
|
1029
|
+
if (isDiyPage) {
|
1030
|
+
setFirstRtcList(getFilterRecList(Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list })));
|
1031
|
+
}
|
1022
1032
|
}
|
1023
|
-
const isNotNullList = (
|
1033
|
+
const isNotNullList = (_3 = (_2 = result === null || result === void 0 ? void 0 : result.data) === null || _2 === void 0 ? void 0 : _2.recList) === null || _3 === void 0 ? void 0 : _3.some((item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video));
|
1024
1034
|
if (isNotNullList) {
|
1025
1035
|
pageNum = pageNum + 1;
|
1026
1036
|
yield recurveRecList(query);
|
@@ -1028,13 +1038,13 @@
|
|
1028
1038
|
});
|
1029
1039
|
yield recurveRecList(query);
|
1030
1040
|
if (!(query === null || query === void 0 ? void 0 : query.hashTag) && result)
|
1031
|
-
setCurReqInfo({ rtc: (
|
1041
|
+
setCurReqInfo({ rtc: (_p = result === null || result === void 0 ? void 0 : result.data) === null || _p === void 0 ? void 0 : _p.rtc, requestId: (_q = result === null || result === void 0 ? void 0 : result.data) === null || _q === void 0 ? void 0 : _q.requestId });
|
1032
1042
|
return Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list });
|
1033
1043
|
}
|
1034
1044
|
if (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) {
|
1035
|
-
query = Object.assign(Object.assign({}, query), { directPage: true, level: 1, pageNum: (
|
1045
|
+
query = Object.assign(Object.assign(Object.assign({}, query), { directPage: true, level: 1, pageNum: (_r = query === null || query === void 0 ? void 0 : query.pageNum) !== null && _r !== void 0 ? _r : 1 }), (isDiy && { maxRecs: query === null || query === void 0 ? void 0 : query.maxSize }));
|
1036
1046
|
}
|
1037
|
-
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/recommend/list', {
|
1047
|
+
const result = isDiy ? yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v3/recommend/direct/page/view', { method: 'POST', body: query })) : yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/recommend/list', {
|
1038
1048
|
method: 'POST',
|
1039
1049
|
body: query
|
1040
1050
|
}));
|
@@ -1044,26 +1054,31 @@
|
|
1044
1054
|
if (!(query === null || query === void 0 ? void 0 : query.hashTag))
|
1045
1055
|
setCurReqInfo({ rtc: result.data.rtc, requestId: result.data.requestId });
|
1046
1056
|
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) && !isEditor) {
|
1047
|
-
const isNotNullList = (
|
1057
|
+
const isNotNullList = (_t = (_s = result === null || result === void 0 ? void 0 : result.data) === null || _s === void 0 ? void 0 : _s.recList) === null || _t === void 0 ? void 0 : _t.some((item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video));
|
1048
1058
|
if (!isNotNullList) {
|
1049
1059
|
setIsNoMoreData(true);
|
1050
1060
|
}
|
1051
1061
|
}
|
1052
1062
|
let list = [];
|
1053
|
-
list = list.concat((
|
1063
|
+
list = list.concat((_x = (_w = (_v = (_u = result === null || result === void 0 ? void 0 : result.data) === null || _u === void 0 ? void 0 : _u.recList) === null || _v === void 0 ? void 0 : _v.filter) === null || _w === void 0 ? void 0 : _w.call(_v, (item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video))) !== null && _x !== void 0 ? _x : []);
|
1054
1064
|
return Object.assign(Object.assign({}, result.data), { recList: list });
|
1055
|
-
}), [bffFetch, utmVal, maxSize, defaultSize, channelQueryList, channel, chatlabsId, bffFetchAdmin]);
|
1065
|
+
}), [bffFetch, utmVal, maxSize, defaultSize, channelQueryList, channel, chatlabsId, bffFetchAdmin, isDiyPage, finalPageData, isDiyH5]);
|
1056
1066
|
const loadVideos = React.useCallback((pageNum) => __awaiter(void 0, void 0, void 0, function* () {
|
1057
|
-
var
|
1067
|
+
var _4, _5, _6, _7;
|
1058
1068
|
if (rtcList.length <= 0) {
|
1059
1069
|
return;
|
1060
1070
|
}
|
1071
|
+
if (isDiyPage && (firstRtcList === null || firstRtcList === void 0 ? void 0 : firstRtcList.length) > 0) {
|
1072
|
+
setRtcList(rtcList.concat(firstRtcList));
|
1073
|
+
setCacheRtcList(cacheRtcList.concat(firstRtcList));
|
1074
|
+
return;
|
1075
|
+
}
|
1061
1076
|
const lastItem = rtcList === null || rtcList === void 0 ? void 0 : rtcList[(rtcList === null || rtcList === void 0 ? void 0 : rtcList.length) - 1];
|
1062
|
-
const data = yield getRecommendVideos(Object.assign(Object.assign(Object.assign(Object.assign({ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag }, (((
|
1077
|
+
const data = yield getRecommendVideos(Object.assign(Object.assign(Object.assign(Object.assign({ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag }, (((_4 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.product) === null || _4 === void 0 ? void 0 : _4.itemId) && { productFilter: [(_5 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.product) === null || _5 === void 0 ? void 0 : _5.itemId] })), (((_6 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.video) === null || _6 === void 0 ? void 0 : _6.itemId) && { contentFilter: [(_7 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.video) === null || _7 === void 0 ? void 0 : _7.itemId] })), { themeTag: themeTag.current }), ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) && !isEditor && { pageNum })));
|
1063
1078
|
setRtcList(rtcList.concat(getFilterRecList(data)));
|
1064
1079
|
setCacheRtcList(cacheRtcList.concat(getFilterRecList(data)));
|
1065
1080
|
return data;
|
1066
|
-
}), [getRecommendVideos, rtcList, waterFallData, cacheRtcList]);
|
1081
|
+
}), [getRecommendVideos, rtcList, waterFallData, cacheRtcList, isDiyPage, firstRtcList]);
|
1067
1082
|
const refreshFeSession = React.useCallback((enableReSid, event) => {
|
1068
1083
|
var _a, _b, _c, _d, _e;
|
1069
1084
|
let expire = false;
|
@@ -1094,8 +1109,8 @@
|
|
1094
1109
|
// 用户信息都是公共的
|
1095
1110
|
if (!userInfo) {
|
1096
1111
|
userInfo = {
|
1097
|
-
|
1098
|
-
|
1112
|
+
productUserId: fakeUserId // 后端逻辑会从请求头获取,所以不需要传
|
1113
|
+
// tpChannelId: 'H5' // 后端处理
|
1099
1114
|
};
|
1100
1115
|
}
|
1101
1116
|
const sessionID = storeAndLoadFeSessionId();
|
@@ -1129,7 +1144,8 @@
|
|
1129
1144
|
layoutVariantId,
|
1130
1145
|
globalConfig,
|
1131
1146
|
playbookType,
|
1132
|
-
bffDataSource
|
1147
|
+
bffDataSource,
|
1148
|
+
fakeUserId
|
1133
1149
|
]);
|
1134
1150
|
const getEventParamsByJson = React.useCallback((json, product) => {
|
1135
1151
|
var _a, _b, _c;
|
@@ -1262,38 +1278,40 @@
|
|
1262
1278
|
}
|
1263
1279
|
}, [bffFetch, enableReportEvent, enabledMetaConversionApi, globalConfig, bffDataSource, getEventParamsByJson]);
|
1264
1280
|
const bffMutateLike = React.useCallback((body) => __awaiter(void 0, void 0, void 0, function* () {
|
1281
|
+
body = Object.assign(Object.assign({}, body), { productUserId: fakeUserId });
|
1265
1282
|
const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/recommend/like', { method: 'POST', body }));
|
1266
1283
|
return res === null || res === void 0 ? void 0 : res.success;
|
1267
|
-
}), [bffFetch]);
|
1284
|
+
}), [bffFetch, fakeUserId]);
|
1268
1285
|
const bffMutateUnlike = React.useCallback((body) => __awaiter(void 0, void 0, void 0, function* () {
|
1286
|
+
body = Object.assign(Object.assign({}, body), { productUserId: fakeUserId });
|
1269
1287
|
const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/recommend/unlike', { method: 'POST', body }));
|
1270
1288
|
return res === null || res === void 0 ? void 0 : res.success;
|
1271
|
-
}), [bffFetch]);
|
1289
|
+
}), [bffFetch, fakeUserId]);
|
1272
1290
|
const bffSubmitForm = React.useCallback((body) => __awaiter(void 0, void 0, void 0, function* () {
|
1273
1291
|
const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/customform', { method: 'POST', body }));
|
1274
1292
|
return res === null || res === void 0 ? void 0 : res.success;
|
1275
1293
|
}), [bffFetch]);
|
1276
1294
|
// 获取 Tag
|
1277
1295
|
const bffGetTagList = React.useCallback((data) => __awaiter(void 0, void 0, void 0, function* () {
|
1278
|
-
var
|
1279
|
-
const isShowTag = !!((
|
1296
|
+
var _8, _9, _10, _11, _12, _13, _14, _15;
|
1297
|
+
const isShowTag = !!((_10 = (_9 = (_8 = data === null || data === void 0 ? void 0 : data.data) === null || _8 === void 0 ? void 0 : _8.sxpPageConf) === null || _9 === void 0 ? void 0 : _9.globalConfig) === null || _10 === void 0 ? void 0 : _10.isShowTag);
|
1280
1298
|
if (!utmVal || !isShowTag)
|
1281
1299
|
return;
|
1282
1300
|
try {
|
1283
|
-
const val = (
|
1301
|
+
const val = (_13 = (_12 = (_11 = splitUrlParams(utmVal)) === null || _11 === void 0 ? void 0 : _11.filter((val) => {
|
1284
1302
|
var _a, _b;
|
1285
1303
|
const key = val.split('=')[0];
|
1286
1304
|
return (_b = ((_a = utmParameter === null || utmParameter === void 0 ? void 0 : utmParameter.channels) !== null && _a !== void 0 ? _a : [])) === null || _b === void 0 ? void 0 : _b.includes(key);
|
1287
|
-
})) === null ||
|
1305
|
+
})) === null || _12 === void 0 ? void 0 : _12.join('&')) !== null && _13 !== void 0 ? _13 : '';
|
1288
1306
|
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/tag/list', { method: 'GET', query: { channel: decodeURIComponent(val) } }));
|
1289
|
-
setTagList((
|
1307
|
+
setTagList((_15 = (_14 = result === null || result === void 0 ? void 0 : result.data) === null || _14 === void 0 ? void 0 : _14.tags) !== null && _15 !== void 0 ? _15 : []);
|
1290
1308
|
}
|
1291
1309
|
catch (e) {
|
1292
1310
|
console.log('e', e);
|
1293
1311
|
}
|
1294
1312
|
}), [bffFetch, utmVal]);
|
1295
1313
|
const ctaEvent = React.useCallback((eventInfo, rec, product, position) => {
|
1296
|
-
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;
|
1314
|
+
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, _14;
|
1297
1315
|
const cta = product === null || product === void 0 ? void 0 : product.bindCta;
|
1298
1316
|
const isProd = ((_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.bindProducts) && ((_d = (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProducts) === null || _d === void 0 ? void 0 : _d.length) > 0);
|
1299
1317
|
let fromKName = '';
|
@@ -1311,7 +1329,7 @@
|
|
1311
1329
|
}
|
1312
1330
|
const contentTags = (_p = (_m = (_h = product === null || product === void 0 ? void 0 : product.tags) !== null && _h !== void 0 ? _h : (_l = (_k = (_j = rec === null || rec === void 0 ? void 0 : rec.video) === null || _j === void 0 ? void 0 : _j.bindProducts) === null || _k === void 0 ? void 0 : _k[0]) === null || _l === void 0 ? void 0 : _l.tags) !== null && _m !== void 0 ? _m : (_o = rec === null || rec === void 0 ? void 0 : rec.video) === null || _o === void 0 ? void 0 : _o.tags) !== null && _p !== void 0 ? _p : (_q = rec === null || rec === void 0 ? void 0 : rec.product) === null || _q === void 0 ? void 0 : _q.tags;
|
1313
1331
|
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
1314
|
-
eventInfo: Object.assign(Object.assign({}, eventInfo), { ctaId: (_r = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _r !== void 0 ? _r : '', ctaName: (_s = cta === null || cta === void 0 ? void 0 : cta.title) !== null && _s !== void 0 ? _s : '', contentTags: contentTags ? JSON.stringify(contentTags) : '', position: position + '', contentId: (_u = (_t = rec === null || rec === void 0 ? void 0 : rec.video) === null || _t === void 0 ? void 0 : _t.itemId) !== null && _u !== void 0 ? _u : '', productId: isProd ? product === null || product === void 0 ? void 0 : product.itemId : '', traceInfo: (
|
1332
|
+
eventInfo: Object.assign(Object.assign({}, eventInfo), { ctaId: (_r = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _r !== void 0 ? _r : '', ctaName: (_s = cta === null || cta === void 0 ? void 0 : cta.title) !== null && _s !== void 0 ? _s : '', contentTags: contentTags ? JSON.stringify(contentTags) : '', position: position + '', contentId: (_u = (_t = rec === null || rec === void 0 ? void 0 : rec.video) === null || _t === void 0 ? void 0 : _t.itemId) !== null && _u !== void 0 ? _u : '', sceneId: (_x = (_w = (_v = rec === null || rec === void 0 ? void 0 : rec.video) === null || _v === void 0 ? void 0 : _v.scene) === null || _w === void 0 ? void 0 : _w.sceneId) !== null && _x !== void 0 ? _x : '', productId: isProd ? product === null || product === void 0 ? void 0 : product.itemId : '', traceInfo: (_13 = (_10 = (_5 = (_1 = (_y = cta === null || cta === void 0 ? void 0 : cta.traceInfo) !== null && _y !== void 0 ? _y : (_0 = (_z = rec === null || rec === void 0 ? void 0 : rec.video) === null || _z === void 0 ? void 0 : _z.bindCta) === null || _0 === void 0 ? void 0 : _0.traceInfo) !== null && _1 !== void 0 ? _1 : (_4 = (_3 = (_2 = rec === null || rec === void 0 ? void 0 : rec.video) === null || _2 === void 0 ? void 0 : _2.bindProduct) === null || _3 === void 0 ? void 0 : _3.bindCta) === null || _4 === void 0 ? void 0 : _4.traceInfo) !== null && _5 !== void 0 ? _5 : (_9 = (_8 = (_7 = (_6 = rec === null || rec === void 0 ? void 0 : rec.video) === null || _6 === void 0 ? void 0 : _6.bindProducts) === null || _7 === void 0 ? void 0 : _7[0]) === null || _8 === void 0 ? void 0 : _8.bindCta) === null || _9 === void 0 ? void 0 : _9.traceInfo) !== null && _10 !== void 0 ? _10 : (_12 = (_11 = rec === null || rec === void 0 ? void 0 : rec.product) === null || _11 === void 0 ? void 0 : _11.bindCta) === null || _12 === void 0 ? void 0 : _12.traceInfo) !== null && _13 !== void 0 ? _13 : '', fromKName, fromKPage: (_14 = location === null || location === void 0 ? void 0 : location.href) !== null && _14 !== void 0 ? _14 : '', contentFormat })
|
1315
1333
|
});
|
1316
1334
|
}, [bffEventReport, isFromHashtag]);
|
1317
1335
|
const h5EnterLink = React.useCallback(() => {
|
@@ -1346,10 +1364,10 @@
|
|
1346
1364
|
});
|
1347
1365
|
}, [bffEventReport]);
|
1348
1366
|
const getAccount = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
|
1349
|
-
var
|
1367
|
+
var _16, _17;
|
1350
1368
|
const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/account', { method: 'GET' }));
|
1351
|
-
setChatlabsId((
|
1352
|
-
return ((
|
1369
|
+
setChatlabsId((_16 = res === null || res === void 0 ? void 0 : res.data) === null || _16 === void 0 ? void 0 : _16.chatLabsId);
|
1370
|
+
return ((_17 = res === null || res === void 0 ? void 0 : res.data) === null || _17 === void 0 ? void 0 : _17.consentResult) === 'true';
|
1353
1371
|
}), [bffFetch]);
|
1354
1372
|
const accountSonsent = React.useCallback((consentResult) => __awaiter(void 0, void 0, void 0, function* () {
|
1355
1373
|
const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/account/consent', {
|
@@ -1413,6 +1431,9 @@
|
|
1413
1431
|
}
|
1414
1432
|
setRtcList(list);
|
1415
1433
|
setCacheRtcList(list);
|
1434
|
+
if (isDiyPage) {
|
1435
|
+
setFirstRtcList(list);
|
1436
|
+
}
|
1416
1437
|
bffGetTagList(curData !== null && curData !== void 0 ? curData : finalPageData);
|
1417
1438
|
if (channel) {
|
1418
1439
|
const item = list === null || list === void 0 ? void 0 : list[0];
|
@@ -1432,7 +1453,7 @@
|
|
1432
1453
|
});
|
1433
1454
|
setLoading(false);
|
1434
1455
|
});
|
1435
|
-
}, [isShowConsent, channel]);
|
1456
|
+
}, [isShowConsent, channel, isDiyPage]);
|
1436
1457
|
// cms预览
|
1437
1458
|
React.useEffect(() => {
|
1438
1459
|
if (!isPreview)
|
@@ -1448,12 +1469,15 @@
|
|
1448
1469
|
}
|
1449
1470
|
setRtcList(list);
|
1450
1471
|
setCacheRtcList(list);
|
1472
|
+
if (isDiyPage) {
|
1473
|
+
setFirstRtcList(list);
|
1474
|
+
}
|
1451
1475
|
}
|
1452
1476
|
})
|
1453
1477
|
.finally(() => {
|
1454
1478
|
setLoading(false);
|
1455
1479
|
});
|
1456
|
-
}, [getRecommendVideos, bffGetTagList, channel]);
|
1480
|
+
}, [getRecommendVideos, bffGetTagList, channel, isDiyPage]);
|
1457
1481
|
const defaultLoadingImage = useIconLink('/pb_static/a65d23c5893c49d7aaaa81681d3179e2.gif', appDomain);
|
1458
1482
|
return (React.createElement(SxpDataSourceContext.Provider, { value: {
|
1459
1483
|
rtcList,
|
@@ -1511,7 +1535,8 @@
|
|
1511
1535
|
refreshFeSession,
|
1512
1536
|
getAccount,
|
1513
1537
|
accountSonsent,
|
1514
|
-
isDiyH5
|
1538
|
+
isDiyH5: isDiyPage,
|
1539
|
+
firstRtcList
|
1515
1540
|
} }, 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({
|
1516
1541
|
rtcList,
|
1517
1542
|
mutateLike: bffMutateLike,
|
@@ -1972,14 +1997,14 @@
|
|
1972
1997
|
* @Author: binruan@chatlabs.com
|
1973
1998
|
* @Date: 2024-03-12 10:59:06
|
1974
1999
|
* @LastEditors: binruan@chatlabs.com
|
1975
|
-
* @LastEditTime:
|
2000
|
+
* @LastEditTime: 2025-05-09 15:30:59
|
1976
2001
|
* @FilePath: \pb-sxp-ui\src\core\hooks\useEventReport.ts
|
1977
2002
|
*
|
1978
2003
|
*/
|
1979
2004
|
function useEventReport() {
|
1980
2005
|
const { bffEventReport, popupDetailData, isFromHashtag, eventTimeList, setEventTimeList } = useSxpDataSource();
|
1981
2006
|
const jumpToWeb = React.useCallback((e, data, product, cta, position, traceInfo) => {
|
1982
|
-
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;
|
2007
|
+
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, _14, _15, _16;
|
1983
2008
|
const i = eventTimeList === null || eventTimeList === void 0 ? void 0 : eventTimeList.findIndex((item) => item.target === (e === null || e === void 0 ? void 0 : e.target));
|
1984
2009
|
if (i !== -1) {
|
1985
2010
|
return;
|
@@ -2012,11 +2037,11 @@
|
|
2012
2037
|
contentFormat = 'image';
|
2013
2038
|
}
|
2014
2039
|
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
2015
|
-
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 : '',
|
2040
|
+
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 : '', sceneId: (_2 = (_1 = (_0 = data === null || data === void 0 ? void 0 : data.video) === null || _0 === void 0 ? void 0 : _0.scene) === null || _1 === void 0 ? void 0 : _1.sceneId) !== null && _2 !== void 0 ? _2 : '', ctatId: (_3 = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _3 !== void 0 ? _3 : '', traceInfo: (_16 = (_13 = (_11 = (_7 = (_4 = traceInfo !== null && traceInfo !== void 0 ? traceInfo : product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _4 !== void 0 ? _4 : (_6 = (_5 = data === null || data === void 0 ? void 0 : data.video) === null || _5 === void 0 ? void 0 : _5.bindProduct) === null || _6 === void 0 ? void 0 : _6.traceInfo) !== null && _7 !== void 0 ? _7 : (_10 = (_9 = (_8 = data === null || data === void 0 ? void 0 : data.video) === null || _8 === void 0 ? void 0 : _8.bindProducts) === null || _9 === void 0 ? void 0 : _9[0]) === null || _10 === void 0 ? void 0 : _10.traceInfo) !== null && _11 !== void 0 ? _11 : (_12 = data === null || data === void 0 ? void 0 : data.product) === null || _12 === void 0 ? void 0 : _12.traceInfo) !== null && _13 !== void 0 ? _13 : (_15 = (_14 = data === null || data === void 0 ? void 0 : data.video) === null || _14 === void 0 ? void 0 : _14.bindCta) === null || _15 === void 0 ? void 0 : _15.traceInfo) !== null && _16 !== void 0 ? _16 : '' }, (contentFormat && { contentFormat }))
|
2016
2041
|
});
|
2017
2042
|
}, [bffEventReport, popupDetailData, isFromHashtag, eventTimeList]);
|
2018
2043
|
const productView = React.useCallback((data, product, cta, viewTime, position) => {
|
2019
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
2044
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
2020
2045
|
let fromKName = '';
|
2021
2046
|
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))) {
|
2022
2047
|
fromKName = 'pdpPage';
|
@@ -2035,8 +2060,9 @@
|
|
2035
2060
|
contentTags: JSON.stringify(product === null || product === void 0 ? void 0 : product.tags),
|
2036
2061
|
position: position + '',
|
2037
2062
|
contentId: (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.itemId,
|
2063
|
+
sceneId: (_g = (_f = (_e = data === null || data === void 0 ? void 0 : data.video) === null || _e === void 0 ? void 0 : _e.scene) === null || _f === void 0 ? void 0 : _f.sceneId) !== null && _g !== void 0 ? _g : '',
|
2038
2064
|
ctatId: cta === null || cta === void 0 ? void 0 : cta.itemId,
|
2039
|
-
traceInfo: (
|
2065
|
+
traceInfo: (_s = (_q = (_l = (_h = product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _h !== void 0 ? _h : (_k = (_j = data === null || data === void 0 ? void 0 : data.video) === null || _j === void 0 ? void 0 : _j.bindProduct) === null || _k === void 0 ? void 0 : _k.traceInfo) !== null && _l !== void 0 ? _l : (_p = (_o = (_m = data === null || data === void 0 ? void 0 : data.video) === null || _m === void 0 ? void 0 : _m.bindProducts) === null || _o === void 0 ? void 0 : _o[0]) === null || _p === void 0 ? void 0 : _p.traceInfo) !== null && _q !== void 0 ? _q : (_r = data === null || data === void 0 ? void 0 : data.product) === null || _r === void 0 ? void 0 : _r.traceInfo) !== null && _s !== void 0 ? _s : '',
|
2040
2066
|
timeOnSite: Math.floor((new Date() - viewTime) / 1000) + '',
|
2041
2067
|
eventSubject: 'productView',
|
2042
2068
|
eventDescription: 'User browsed the product'
|
@@ -2632,35 +2658,6 @@
|
|
2632
2658
|
}
|
2633
2659
|
];
|
2634
2660
|
|
2635
|
-
/*
|
2636
|
-
* @Author: binruan@chatlabs.com
|
2637
|
-
* @Date: 2024-07-09 14:35:10
|
2638
|
-
* @LastEditors: binruan@chatlabs.com
|
2639
|
-
* @LastEditTime: 2024-07-12 17:53:02
|
2640
|
-
* @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetail\interactionRender.tsx
|
2641
|
-
*
|
2642
|
-
*/
|
2643
|
-
/*
|
2644
|
-
* @Author: binruan@chatlabs.com
|
2645
|
-
* @Date: 2024-07-05 14:08:41
|
2646
|
-
* @LastEditors: binruan@chatlabs.com
|
2647
|
-
* @LastEditTime: 2024-07-09 14:34:49
|
2648
|
-
* @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLink\interactionRender.tsx
|
2649
|
-
*
|
2650
|
-
*/
|
2651
|
-
var interactionRender$g = [
|
2652
|
-
{
|
2653
|
-
title: '滑动事件',
|
2654
|
-
child: [
|
2655
|
-
{
|
2656
|
-
type: 'Switch',
|
2657
|
-
label: '滑动铺满全屏',
|
2658
|
-
name: ['isScrollFullScreen']
|
2659
|
-
}
|
2660
|
-
]
|
2661
|
-
}
|
2662
|
-
];
|
2663
|
-
|
2664
2661
|
/**
|
2665
2662
|
* SSR Window 4.0.2
|
2666
2663
|
* Better handling for window object in SSR environment
|
@@ -10239,7 +10236,7 @@
|
|
10239
10236
|
return (React.createElement(React.Fragment, null, (item === null || item === void 0 ? void 0 : item.bindCta) ? (React.createElement(SwiperSlide, { className: css.css({
|
10240
10237
|
width: '50px',
|
10241
10238
|
height: '50px',
|
10242
|
-
|
10239
|
+
marginRight: '10px'
|
10243
10240
|
}), onClick: () => {
|
10244
10241
|
handleClick(item, index);
|
10245
10242
|
}, key: index },
|
@@ -10493,7 +10490,7 @@
|
|
10493
10490
|
display: '-webkit-box',
|
10494
10491
|
WebkitBoxOrient: 'vertical'
|
10495
10492
|
})), { wordBreak: 'break-word', textRendering: 'geometricPrecision', fontKerning: 'none', textSizeAdjust: '100%', boxSizing: 'border-box', contain: 'content' }), dangerouslySetInnerHTML: { __html: setFontForText(text === null || text === void 0 ? void 0 : text.replace(/\n/g, '</br>'), textStyle) } }),
|
10496
|
-
React.createElement("div", { ref: realRef, style: {
|
10493
|
+
isPost && (React.createElement("div", { ref: realRef, style: {
|
10497
10494
|
wordBreak: 'break-word',
|
10498
10495
|
textRendering: 'geometricPrecision',
|
10499
10496
|
fontKerning: 'none',
|
@@ -10505,7 +10502,7 @@
|
|
10505
10502
|
clipPath: 'inset(100%)',
|
10506
10503
|
transform: 'translateX(-9999px)'
|
10507
10504
|
// position: 'absolute'
|
10508
|
-
}, dangerouslySetInnerHTML: { __html: setFontForText(text === null || text === void 0 ? void 0 : text.replace(/\n/g, '</br>'), textStyle) } }),
|
10505
|
+
}, dangerouslySetInnerHTML: { __html: setFontForText(text === null || text === void 0 ? void 0 : text.replace(/\n/g, '</br>'), textStyle) } })),
|
10509
10506
|
text && isPost && isShow && (React.createElement("button", { "aria-label": isShowMore ? unfoldText || 'show less' : foldText || 'show more', style: { textDecoration: 'underline', cursor: 'pointer' }, onClick: onClick !== null && onClick !== void 0 ? onClick : handleClick, dangerouslySetInnerHTML: {
|
10510
10507
|
__html: setFontForText(isShowMore ? unfoldText || 'show less' : foldText || 'show more', textStyle)
|
10511
10508
|
} }))));
|
@@ -10838,6 +10835,35 @@
|
|
10838
10835
|
};
|
10839
10836
|
var CommodityDetailComponent = React.memo(CommodityDetail$1);
|
10840
10837
|
|
10838
|
+
/*
|
10839
|
+
* @Author: binruan@chatlabs.com
|
10840
|
+
* @Date: 2024-07-09 14:35:10
|
10841
|
+
* @LastEditors: binruan@chatlabs.com
|
10842
|
+
* @LastEditTime: 2024-07-12 17:53:02
|
10843
|
+
* @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetail\interactionRender.tsx
|
10844
|
+
*
|
10845
|
+
*/
|
10846
|
+
/*
|
10847
|
+
* @Author: binruan@chatlabs.com
|
10848
|
+
* @Date: 2024-07-05 14:08:41
|
10849
|
+
* @LastEditors: binruan@chatlabs.com
|
10850
|
+
* @LastEditTime: 2024-07-09 14:34:49
|
10851
|
+
* @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLink\interactionRender.tsx
|
10852
|
+
*
|
10853
|
+
*/
|
10854
|
+
var interactionRender$g = [
|
10855
|
+
{
|
10856
|
+
title: '滑动事件',
|
10857
|
+
child: [
|
10858
|
+
{
|
10859
|
+
type: 'Switch',
|
10860
|
+
label: '滑动铺满全屏',
|
10861
|
+
name: ['isScrollFullScreen']
|
10862
|
+
}
|
10863
|
+
]
|
10864
|
+
}
|
10865
|
+
];
|
10866
|
+
|
10841
10867
|
/*
|
10842
10868
|
* @Author: binruan@chatlabs.com
|
10843
10869
|
* @Date: 2023-07-28 18:29:57
|
@@ -10884,6 +10910,7 @@
|
|
10884
10910
|
taxInfo: {
|
10885
10911
|
color: '#000',
|
10886
10912
|
fontSize: 13,
|
10913
|
+
textAlign: 'left',
|
10887
10914
|
marginBottom: '10px'
|
10888
10915
|
}
|
10889
10916
|
},
|
@@ -11975,7 +12002,7 @@ Made in Italy` })));
|
|
11975
12002
|
type: 'Number',
|
11976
12003
|
label: '与右侧边距',
|
11977
12004
|
addonAfter: 'px',
|
11978
|
-
name: ['props', 'commodityPicture', '
|
12005
|
+
name: ['props', 'commodityPicture', 'marginRight']
|
11979
12006
|
},
|
11980
12007
|
{
|
11981
12008
|
label: '居中垂直偏移',
|
@@ -12261,11 +12288,12 @@ Made in Italy` })));
|
|
12261
12288
|
React.createElement("button", Object.assign({ role: 'button', "aria-label": item === null || item === void 0 ? void 0 : item.title, tabIndex: 0, className: css.css({
|
12262
12289
|
display: 'flex',
|
12263
12290
|
alignItems: 'normal',
|
12264
|
-
width: '100%'
|
12291
|
+
width: '100%',
|
12292
|
+
textAlign: 'left'
|
12265
12293
|
}) }, props),
|
12266
12294
|
React.createElement(Img$1, { src: (_d = (_c = (_a = item === null || item === void 0 ? void 0 : item.cover) !== null && _a !== void 0 ? _a : (_b = item === null || item === void 0 ? void 0 : item.homePage) === null || _b === void 0 ? void 0 : _b[0]) !== null && _c !== void 0 ? _c : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _d !== void 0 ? _d : bottom_image, rec: recData, item: item, index: index, translateY: translateY, imgStyle: commodityPicture, enableEventReport: false }),
|
12267
12295
|
React.createElement("div", { style: {
|
12268
|
-
width: `calc(100% - ${(_e = commodityPicture === null || commodityPicture === void 0 ? void 0 : commodityPicture.width) !== null && _e !== void 0 ? _e : 0}px - ${(_f = commodityPicture === null || commodityPicture === void 0 ? void 0 : commodityPicture.
|
12296
|
+
width: `calc(100% - ${(_e = commodityPicture === null || commodityPicture === void 0 ? void 0 : commodityPicture.width) !== null && _e !== void 0 ? _e : 0}px - ${(_f = commodityPicture === null || commodityPicture === void 0 ? void 0 : commodityPicture.marginRight) !== null && _f !== void 0 ? _f : 0}px)`,
|
12269
12297
|
display: 'flex',
|
12270
12298
|
flexDirection: 'column',
|
12271
12299
|
justifyContent: 'space-between'
|
@@ -12346,7 +12374,7 @@ Made in Italy` })));
|
|
12346
12374
|
commodityPicture: {
|
12347
12375
|
width: 100,
|
12348
12376
|
height: 100,
|
12349
|
-
|
12377
|
+
marginRight: 10
|
12350
12378
|
},
|
12351
12379
|
commodityStyles: {
|
12352
12380
|
price: {
|
@@ -12592,7 +12620,7 @@ Made in Italy` })));
|
|
12592
12620
|
type: 'Number',
|
12593
12621
|
label: '与右侧边距',
|
12594
12622
|
addonAfter: 'px',
|
12595
|
-
name: ['props', 'ctaTempStyles', 'img', '
|
12623
|
+
name: ['props', 'ctaTempStyles', 'img', 'marginRight']
|
12596
12624
|
},
|
12597
12625
|
{
|
12598
12626
|
label: '居中垂直偏移',
|
@@ -12853,11 +12881,12 @@ Made in Italy` })));
|
|
12853
12881
|
borderRadius: 3,
|
12854
12882
|
width: 60,
|
12855
12883
|
height: 60,
|
12856
|
-
|
12884
|
+
marginRight: 8
|
12857
12885
|
},
|
12858
12886
|
title: {
|
12859
12887
|
fontSize: 12,
|
12860
|
-
color: '#fff'
|
12888
|
+
color: '#fff',
|
12889
|
+
textAlign: 'left'
|
12861
12890
|
},
|
12862
12891
|
ctaTitle: {
|
12863
12892
|
fontSize: 10,
|
@@ -12935,11 +12964,12 @@ Made in Italy` })));
|
|
12935
12964
|
borderRadius: 3,
|
12936
12965
|
width: 30,
|
12937
12966
|
height: 30,
|
12938
|
-
|
12967
|
+
marginRight: 8
|
12939
12968
|
},
|
12940
12969
|
ctaTitle: {
|
12941
12970
|
fontSize: 12,
|
12942
12971
|
color: '#fff',
|
12972
|
+
textAlign: 'left',
|
12943
12973
|
width: 130,
|
12944
12974
|
height: 20
|
12945
12975
|
}
|
@@ -13075,27 +13105,6 @@ Made in Italy` })));
|
|
13075
13105
|
}
|
13076
13106
|
];
|
13077
13107
|
|
13078
|
-
/*
|
13079
|
-
* @Author: binruan@chatlabs.com
|
13080
|
-
* @Date: 2024-08-09 16:59:38
|
13081
|
-
* @LastEditors: binruan@chatlabs.com
|
13082
|
-
* @LastEditTime: 2024-09-09 13:59:50
|
13083
|
-
* @FilePath: \pb-sxp-ui\src\materials\sxp\template\Link\interactionRender.tsx
|
13084
|
-
*
|
13085
|
-
*/
|
13086
|
-
var interactionRender$a = [
|
13087
|
-
{
|
13088
|
-
title: '点击事件',
|
13089
|
-
child: [
|
13090
|
-
{
|
13091
|
-
type: 'link',
|
13092
|
-
name: 'onClick',
|
13093
|
-
hiddenUrl: true
|
13094
|
-
}
|
13095
|
-
]
|
13096
|
-
}
|
13097
|
-
];
|
13098
|
-
|
13099
13108
|
var styles$8 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__nkBlU","one-line-ellipsis":"index-module_one-line-ellipsis__buFw1"};
|
13100
13109
|
|
13101
13110
|
const Link$1 = (_a) => {
|
@@ -13123,6 +13132,27 @@ Made in Italy` })));
|
|
13123
13132
|
};
|
13124
13133
|
var LinkComponent = React.memo(Link$1);
|
13125
13134
|
|
13135
|
+
/*
|
13136
|
+
* @Author: binruan@chatlabs.com
|
13137
|
+
* @Date: 2024-08-09 16:59:38
|
13138
|
+
* @LastEditors: binruan@chatlabs.com
|
13139
|
+
* @LastEditTime: 2024-09-09 13:59:50
|
13140
|
+
* @FilePath: \pb-sxp-ui\src\materials\sxp\template\Link\interactionRender.tsx
|
13141
|
+
*
|
13142
|
+
*/
|
13143
|
+
var interactionRender$a = [
|
13144
|
+
{
|
13145
|
+
title: '点击事件',
|
13146
|
+
child: [
|
13147
|
+
{
|
13148
|
+
type: 'link',
|
13149
|
+
name: 'onClick',
|
13150
|
+
hiddenUrl: true
|
13151
|
+
}
|
13152
|
+
]
|
13153
|
+
}
|
13154
|
+
];
|
13155
|
+
|
13126
13156
|
var _a;
|
13127
13157
|
const Link = createMaterial(LinkComponent, {
|
13128
13158
|
displayName: '普通CTA',
|
@@ -13141,17 +13171,19 @@ Made in Italy` })));
|
|
13141
13171
|
borderRadius: 3,
|
13142
13172
|
width: 60,
|
13143
13173
|
height: 60,
|
13144
|
-
|
13174
|
+
marginRight: 8
|
13145
13175
|
},
|
13146
13176
|
ctaTitle: {
|
13147
13177
|
fontSize: 12,
|
13148
13178
|
color: '#fff',
|
13179
|
+
textAlign: 'left',
|
13149
13180
|
width: 130,
|
13150
13181
|
height: 20
|
13151
13182
|
}
|
13152
13183
|
},
|
13153
13184
|
customTitle: {
|
13154
13185
|
style: {
|
13186
|
+
textAlign: 'left',
|
13155
13187
|
textDecoration: 'underline',
|
13156
13188
|
fontWeight: 'bold',
|
13157
13189
|
width: 130,
|
@@ -13241,11 +13273,12 @@ Made in Italy` })));
|
|
13241
13273
|
borderRadius: 3,
|
13242
13274
|
width: 60,
|
13243
13275
|
height: 60,
|
13244
|
-
|
13276
|
+
marginRight: 8
|
13245
13277
|
},
|
13246
13278
|
title: {
|
13247
13279
|
fontSize: 12,
|
13248
|
-
color: '#000'
|
13280
|
+
color: '#000',
|
13281
|
+
textAlign: 'left'
|
13249
13282
|
},
|
13250
13283
|
ctaTitle: {
|
13251
13284
|
fontSize: 10,
|
@@ -13336,17 +13369,19 @@ Made in Italy` })));
|
|
13336
13369
|
borderRadius: 8,
|
13337
13370
|
width: 78,
|
13338
13371
|
height: 78,
|
13339
|
-
|
13372
|
+
marginRight: 16
|
13340
13373
|
},
|
13341
13374
|
title: {
|
13342
13375
|
fontSize: 13,
|
13343
|
-
color: '#000'
|
13376
|
+
color: '#000',
|
13377
|
+
textAlign: 'left'
|
13344
13378
|
},
|
13345
13379
|
ctaTitle: {
|
13346
13380
|
textDecoration: 'underline',
|
13347
13381
|
fontSize: 14,
|
13348
13382
|
fontWeight: 'bold',
|
13349
13383
|
color: '#000',
|
13384
|
+
textAlign: 'left',
|
13350
13385
|
width: 150,
|
13351
13386
|
height: 20
|
13352
13387
|
}
|
@@ -13388,7 +13423,7 @@ Made in Italy` })));
|
|
13388
13423
|
const [products] = React.useState((_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [1, 2]);
|
13389
13424
|
return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item, itemIndex) => {
|
13390
13425
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
13391
|
-
return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, { key: itemIndex, className: css.css(Object.assign(Object.assign({}, style), { flexShrink: 0,
|
13426
|
+
return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, { key: itemIndex, className: css.css(Object.assign(Object.assign({}, style), { flexShrink: 0, marginLeft: 0, marginRight: '8px' })), tag: 'li', role: 'listitem' },
|
13392
13427
|
React.createElement(EventProvider$1, Object.assign({ rec: recData, multItem: item, multiCheckIndex: itemIndex, index: index }, props),
|
13393
13428
|
React.createElement(Img$1, { src: (_d = (_c = (_a = item === null || item === void 0 ? void 0 : item.cover) !== null && _a !== void 0 ? _a : (_b = item === null || item === void 0 ? void 0 : item.homePage) === null || _b === void 0 ? void 0 : _b[0]) !== null && _c !== void 0 ? _c : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _d !== void 0 ? _d : bottom_image, rec: recData, item: item, index: index, translateY: translateY, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img, isActive: isActive }),
|
13394
13429
|
React.createElement("div", { className: css.css({
|
@@ -13434,11 +13469,12 @@ Made in Italy` })));
|
|
13434
13469
|
borderRadius: 3,
|
13435
13470
|
width: 60,
|
13436
13471
|
height: 60,
|
13437
|
-
|
13472
|
+
marginRight: 8
|
13438
13473
|
},
|
13439
13474
|
title: {
|
13440
13475
|
fontSize: 12,
|
13441
|
-
color: '#000'
|
13476
|
+
color: '#000',
|
13477
|
+
textAlign: 'left'
|
13442
13478
|
},
|
13443
13479
|
ctaTitle: {
|
13444
13480
|
fontSize: 10,
|
@@ -13486,7 +13522,7 @@ Made in Italy` })));
|
|
13486
13522
|
const [products] = React.useState((_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [1, 2]);
|
13487
13523
|
return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item, itemIndex) => {
|
13488
13524
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
13489
|
-
return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, { key: itemIndex, className: css.css(Object.assign(Object.assign({}, style), { flexShrink: 0,
|
13525
|
+
return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, { key: itemIndex, className: css.css(Object.assign(Object.assign({}, style), { flexShrink: 0, marginLeft: 0, marginRight: '8px' })), tag: 'li', role: 'listitem' },
|
13490
13526
|
React.createElement(EventProvider$1, Object.assign({ rec: recData, multItem: item, multiCheckIndex: itemIndex, index: index }, props),
|
13491
13527
|
React.createElement(Img$1, { src: (_d = (_c = (_a = item === null || item === void 0 ? void 0 : item.cover) !== null && _a !== void 0 ? _a : (_b = item === null || item === void 0 ? void 0 : item.homePage) === null || _b === void 0 ? void 0 : _b[0]) !== null && _c !== void 0 ? _c : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _d !== void 0 ? _d : bottom_image, rec: recData, item: item, index: index, translateY: translateY, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img, isActive: isActive }),
|
13492
13528
|
React.createElement("div", { className: css.css({
|
@@ -13532,11 +13568,12 @@ Made in Italy` })));
|
|
13532
13568
|
borderRadius: 3,
|
13533
13569
|
width: 60,
|
13534
13570
|
height: 60,
|
13535
|
-
|
13571
|
+
marginRight: 8
|
13536
13572
|
},
|
13537
13573
|
title: {
|
13538
13574
|
fontSize: 12,
|
13539
13575
|
color: '#fff',
|
13576
|
+
textAlign: 'left'
|
13540
13577
|
},
|
13541
13578
|
ctaTitle: {
|
13542
13579
|
fontSize: 10,
|
@@ -13592,7 +13629,7 @@ Made in Italy` })));
|
|
13592
13629
|
const [products] = React.useState((_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [1, 2]);
|
13593
13630
|
return (React.createElement(Scroll$1, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item, itemIndex) => {
|
13594
13631
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
13595
|
-
return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, { key: itemIndex, className: css.css(Object.assign(Object.assign({}, style), { flexShrink: 0,
|
13632
|
+
return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, { key: itemIndex, className: css.css(Object.assign(Object.assign({}, style), { flexShrink: 0, marginLeft: 0, marginRight: '8px' })), tag: 'li', role: 'listitem' },
|
13596
13633
|
React.createElement(EventProvider$1, Object.assign({ rec: recData, multItem: item, multiCheckIndex: itemIndex, index: index }, props),
|
13597
13634
|
React.createElement(Img$1, { src: (_d = (_c = (_a = item === null || item === void 0 ? void 0 : item.cover) !== null && _a !== void 0 ? _a : (_b = item === null || item === void 0 ? void 0 : item.homePage) === null || _b === void 0 ? void 0 : _b[0]) !== null && _c !== void 0 ? _c : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _d !== void 0 ? _d : bottom_image, rec: recData, item: item, index: index, translateY: translateY, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img, isActive: isActive }),
|
13598
13635
|
React.createElement("div", { className: css.css({
|
@@ -13639,17 +13676,19 @@ Made in Italy` })));
|
|
13639
13676
|
borderRadius: 8,
|
13640
13677
|
width: 78,
|
13641
13678
|
height: 78,
|
13642
|
-
|
13679
|
+
marginRight: 16
|
13643
13680
|
},
|
13644
13681
|
title: {
|
13645
13682
|
fontSize: 12,
|
13646
|
-
color: '#000'
|
13683
|
+
color: '#000',
|
13684
|
+
textAlign: 'left'
|
13647
13685
|
},
|
13648
13686
|
ctaTitle: {
|
13649
13687
|
textDecoration: 'underline',
|
13650
13688
|
fontSize: 12,
|
13651
13689
|
fontWeight: 'bold',
|
13652
13690
|
color: '#000',
|
13691
|
+
textAlign: 'left',
|
13653
13692
|
width: 150,
|
13654
13693
|
height: 20
|
13655
13694
|
}
|
@@ -13744,11 +13783,12 @@ Made in Italy` })));
|
|
13744
13783
|
borderRadius: 3,
|
13745
13784
|
width: 60,
|
13746
13785
|
height: 60,
|
13747
|
-
|
13786
|
+
marginRight: 8
|
13748
13787
|
},
|
13749
13788
|
title: {
|
13750
13789
|
fontSize: 12,
|
13751
|
-
color: '#fff'
|
13790
|
+
color: '#fff',
|
13791
|
+
textAlign: 'left'
|
13752
13792
|
},
|
13753
13793
|
ctaTitle: {
|
13754
13794
|
fontSize: 10,
|
@@ -15837,7 +15877,7 @@ Made in Italy` })));
|
|
15837
15877
|
* @Author: binruan@chatlabs.com
|
15838
15878
|
* @Date: 2024-01-10 10:58:24
|
15839
15879
|
* @LastEditors: binruan@chatlabs.com
|
15840
|
-
* @LastEditTime: 2025-
|
15880
|
+
* @LastEditTime: 2025-05-09 15:30:41
|
15841
15881
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\WaterFall\index.tsx
|
15842
15882
|
*
|
15843
15883
|
*/
|
@@ -15875,7 +15915,7 @@ Made in Italy` })));
|
|
15875
15915
|
}
|
15876
15916
|
}, [waterFallData]);
|
15877
15917
|
const reportTagsView = React.useCallback(() => {
|
15878
|
-
var _a, _b, _c, _d, _e, _f;
|
15918
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
15879
15919
|
const rec = recData === null || recData === void 0 ? void 0 : recData.rec;
|
15880
15920
|
if (!rec)
|
15881
15921
|
return;
|
@@ -15895,9 +15935,10 @@ Made in Italy` })));
|
|
15895
15935
|
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
15896
15936
|
eventInfo: {
|
15897
15937
|
contentId: (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.itemId,
|
15938
|
+
sceneId: (_g = (_f = (_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.scene) === null || _f === void 0 ? void 0 : _f.sceneId) !== null && _g !== void 0 ? _g : '',
|
15898
15939
|
position: cacheActiveIndex + '',
|
15899
|
-
contentTags: JSON.stringify((
|
15900
|
-
traceInfo: (
|
15940
|
+
contentTags: JSON.stringify((_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.tags),
|
15941
|
+
traceInfo: (_j = rec === null || rec === void 0 ? void 0 : rec.video) === null || _j === void 0 ? void 0 : _j.traceInfo,
|
15901
15942
|
hashTags: JSON.stringify([recData === null || recData === void 0 ? void 0 : recData.hashTag]),
|
15902
15943
|
fromKName,
|
15903
15944
|
fromKPage: location === null || location === void 0 ? void 0 : location.href,
|
@@ -16668,60 +16709,6 @@ Made in Italy` })));
|
|
16668
16709
|
}
|
16669
16710
|
];
|
16670
16711
|
|
16671
|
-
/*
|
16672
|
-
* @Author: binruan@chatlabs.com
|
16673
|
-
* @Date: 2024-07-24 14:58:40
|
16674
|
-
* @LastEditors: binruan@chatlabs.com
|
16675
|
-
* @LastEditTime: 2024-09-09 13:54:35
|
16676
|
-
* @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLinkPopup\interactionRender.tsx
|
16677
|
-
*
|
16678
|
-
*/
|
16679
|
-
var interactionRender$2 = [
|
16680
|
-
{
|
16681
|
-
title: '点击事件',
|
16682
|
-
child: [
|
16683
|
-
{
|
16684
|
-
type: 'link',
|
16685
|
-
name: 'onClick',
|
16686
|
-
hiddenUrl: true
|
16687
|
-
}
|
16688
|
-
]
|
16689
|
-
},
|
16690
|
-
{
|
16691
|
-
title: '动画效果',
|
16692
|
-
child: [
|
16693
|
-
{
|
16694
|
-
type: 'Select',
|
16695
|
-
name: ['animation', 'name'],
|
16696
|
-
label: '动画',
|
16697
|
-
options: [
|
16698
|
-
{
|
16699
|
-
label: '默认',
|
16700
|
-
value: 1
|
16701
|
-
}
|
16702
|
-
],
|
16703
|
-
fieldProps: {
|
16704
|
-
style: {
|
16705
|
-
width: '100%'
|
16706
|
-
}
|
16707
|
-
}
|
16708
|
-
},
|
16709
|
-
{
|
16710
|
-
type: 'Number',
|
16711
|
-
label: '动画启动时间',
|
16712
|
-
name: ['animation', 'delay'],
|
16713
|
-
addonAfter: 'ms'
|
16714
|
-
},
|
16715
|
-
{
|
16716
|
-
type: 'Number',
|
16717
|
-
label: '动画持续时间',
|
16718
|
-
name: ['animation', 'duration'],
|
16719
|
-
addonAfter: 'ms'
|
16720
|
-
}
|
16721
|
-
]
|
16722
|
-
}
|
16723
|
-
];
|
16724
|
-
|
16725
16712
|
var styles = {"aniLinkPopup":"index-module_aniLinkPopup__YT7kj","animated-fadeIn":"index-module_animated-fadeIn__8ZCbq","fadeIn":"index-module_fadeIn__2E-dk","animated-fadeOut":"index-module_animated-fadeOut__iK4oc","fadeOut":"index-module_fadeOut__MgevT","one-line-ellipsis":"index-module_one-line-ellipsis__NRiVV","two-line-ellipsis":"index-module_two-line-ellipsis__k-YGB","modal-icon-wrapper":"index-module_modal-icon-wrapper__tu3BY","modal-icon-wrapper-img":"index-module_modal-icon-wrapper-img__4b7qZ"};
|
16726
16713
|
|
16727
16714
|
const closeIcon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII=';
|
@@ -16794,6 +16781,60 @@ Made in Italy` })));
|
|
16794
16781
|
};
|
16795
16782
|
var AniLinkPopupComponent = React.memo(AniLinkPopup$1);
|
16796
16783
|
|
16784
|
+
/*
|
16785
|
+
* @Author: binruan@chatlabs.com
|
16786
|
+
* @Date: 2024-07-24 14:58:40
|
16787
|
+
* @LastEditors: binruan@chatlabs.com
|
16788
|
+
* @LastEditTime: 2024-09-09 13:54:35
|
16789
|
+
* @FilePath: \pb-sxp-ui\src\materials\sxp\cta\AniLinkPopup\interactionRender.tsx
|
16790
|
+
*
|
16791
|
+
*/
|
16792
|
+
var interactionRender$2 = [
|
16793
|
+
{
|
16794
|
+
title: '点击事件',
|
16795
|
+
child: [
|
16796
|
+
{
|
16797
|
+
type: 'link',
|
16798
|
+
name: 'onClick',
|
16799
|
+
hiddenUrl: true
|
16800
|
+
}
|
16801
|
+
]
|
16802
|
+
},
|
16803
|
+
{
|
16804
|
+
title: '动画效果',
|
16805
|
+
child: [
|
16806
|
+
{
|
16807
|
+
type: 'Select',
|
16808
|
+
name: ['animation', 'name'],
|
16809
|
+
label: '动画',
|
16810
|
+
options: [
|
16811
|
+
{
|
16812
|
+
label: '默认',
|
16813
|
+
value: 1
|
16814
|
+
}
|
16815
|
+
],
|
16816
|
+
fieldProps: {
|
16817
|
+
style: {
|
16818
|
+
width: '100%'
|
16819
|
+
}
|
16820
|
+
}
|
16821
|
+
},
|
16822
|
+
{
|
16823
|
+
type: 'Number',
|
16824
|
+
label: '动画启动时间',
|
16825
|
+
name: ['animation', 'delay'],
|
16826
|
+
addonAfter: 'ms'
|
16827
|
+
},
|
16828
|
+
{
|
16829
|
+
type: 'Number',
|
16830
|
+
label: '动画持续时间',
|
16831
|
+
name: ['animation', 'duration'],
|
16832
|
+
addonAfter: 'ms'
|
16833
|
+
}
|
16834
|
+
]
|
16835
|
+
}
|
16836
|
+
];
|
16837
|
+
|
16797
16838
|
/*
|
16798
16839
|
* @Author: binruan@chatlabs.com
|
16799
16840
|
* @Date: 2024-07-24 14:58:40
|
@@ -16832,6 +16873,7 @@ Made in Italy` })));
|
|
16832
16873
|
title: {
|
16833
16874
|
fontSize: 14,
|
16834
16875
|
color: '#000',
|
16876
|
+
textAlign: 'left',
|
16835
16877
|
lineHeight: 2.6
|
16836
16878
|
},
|
16837
16879
|
ctaTitle: {
|
@@ -17060,7 +17102,7 @@ Made in Italy` })));
|
|
17060
17102
|
React.createElement("span", { style: content === null || content === void 0 ? void 0 : content.style, dangerouslySetInnerHTML: {
|
17061
17103
|
__html: setFontForText((_b = content === null || content === void 0 ? void 0 : content.text) === null || _b === void 0 ? void 0 : _b.replace(/\n/g, '</br>'), content === null || content === void 0 ? void 0 : content.style)
|
17062
17104
|
} }),
|
17063
|
-
React.createElement("span", { style: Object.assign(Object.assign({}, interaction === null || interaction === void 0 ? void 0 : interaction.style), {
|
17105
|
+
React.createElement("span", { style: Object.assign(Object.assign({}, interaction === null || interaction === void 0 ? void 0 : interaction.style), { marginLeft: '5px' }), dangerouslySetInnerHTML: {
|
17064
17106
|
__html: setFontForText((_c = interaction === null || interaction === void 0 ? void 0 : interaction.text) === null || _c === void 0 ? void 0 : _c.replace(/\n/g, '</br>'), interaction === null || interaction === void 0 ? void 0 : interaction.style)
|
17065
17107
|
}, onClick: handleClick })),
|
17066
17108
|
isShowClose && (React.createElement("button", { "aria-label": 'close', className: 'consentPopupDisplay-close', onClick: handleClickClose },
|
@@ -17978,21 +18020,22 @@ Made in Italy` })));
|
|
17978
18020
|
const likeIcon = useIconLink(defaultLikeIconPath$2);
|
17979
18021
|
const unlikeIcon = useIconLink(defaultUnLikeIconPath$2);
|
17980
18022
|
const handleClick = lodash.debounce(() => __awaiter(void 0, void 0, void 0, function* () {
|
17981
|
-
var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
|
18023
|
+
var _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;
|
17982
18024
|
if (state) {
|
17983
18025
|
// 先设置状态
|
17984
18026
|
setState(false);
|
17985
|
-
const result = (_e = (yield (mutateUnlike === null || mutateUnlike === void 0 ? void 0 : mutateUnlike({
|
18027
|
+
const result = (_e = (yield (mutateUnlike === null || mutateUnlike === void 0 ? void 0 : mutateUnlike({ itemId: (_d = (_c = recData === null || recData === void 0 ? void 0 : recData.video) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '' })))) !== null && _e !== void 0 ? _e : false;
|
17986
18028
|
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
17987
18029
|
eventInfo: {
|
17988
18030
|
eventSubject: 'favoriteContentCanceled',
|
17989
18031
|
eventDescription: 'This content was unfavorite by the user',
|
17990
18032
|
contentId: (_g = (_f = recData === null || recData === void 0 ? void 0 : recData.video) === null || _f === void 0 ? void 0 : _f.itemId) !== null && _g !== void 0 ? _g : '',
|
17991
|
-
|
17992
|
-
|
18033
|
+
sceneId: (_k = (_j = (_h = recData === null || recData === void 0 ? void 0 : recData.video) === null || _h === void 0 ? void 0 : _h.scene) === null || _j === void 0 ? void 0 : _j.sceneId) !== null && _k !== void 0 ? _k : '',
|
18034
|
+
contentName: (_m = (_l = recData === null || recData === void 0 ? void 0 : recData.video) === null || _l === void 0 ? void 0 : _l.title) !== null && _m !== void 0 ? _m : '',
|
18035
|
+
contentTags: JSON.stringify((_p = (_o = recData === null || recData === void 0 ? void 0 : recData.video) === null || _o === void 0 ? void 0 : _o.tags) !== null && _p !== void 0 ? _p : []),
|
17993
18036
|
position: position + '',
|
17994
|
-
contentFormat: ((
|
17995
|
-
traceInfo: (
|
18037
|
+
contentFormat: ((_q = recData === null || recData === void 0 ? void 0 : recData.video) === null || _q === void 0 ? void 0 : _q.url) ? 'video' : 'image',
|
18038
|
+
traceInfo: (_r = recData === null || recData === void 0 ? void 0 : recData.video) === null || _r === void 0 ? void 0 : _r.traceInfo
|
17996
18039
|
}
|
17997
18040
|
});
|
17998
18041
|
// 如果接口调用失败,则回滚状态
|
@@ -18000,40 +18043,41 @@ Made in Italy` })));
|
|
18000
18043
|
setState(true);
|
18001
18044
|
}
|
18002
18045
|
else {
|
18003
|
-
const nRtcList = (
|
18046
|
+
const nRtcList = (_s = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
|
18004
18047
|
if (index === position) {
|
18005
18048
|
item.isCollected = false;
|
18006
18049
|
}
|
18007
18050
|
return item;
|
18008
|
-
})) !== null &&
|
18051
|
+
})) !== null && _s !== void 0 ? _s : [];
|
18009
18052
|
setCacheRtcList === null || setCacheRtcList === void 0 ? void 0 : setCacheRtcList(nRtcList);
|
18010
18053
|
}
|
18011
18054
|
}
|
18012
18055
|
else {
|
18013
18056
|
setState(true);
|
18014
|
-
const result = (
|
18057
|
+
const result = (_v = (yield (mutateLike === null || mutateLike === void 0 ? void 0 : mutateLike({ content: JSON.stringify(recData), itemId: (_u = (_t = recData === null || recData === void 0 ? void 0 : recData.video) === null || _t === void 0 ? void 0 : _t.itemId) !== null && _u !== void 0 ? _u : '' })))) !== null && _v !== void 0 ? _v : false;
|
18015
18058
|
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
18016
18059
|
eventInfo: {
|
18017
18060
|
eventSubject: 'favoriteContent',
|
18018
18061
|
eventDescription: 'This content was favorite by the user',
|
18019
|
-
contentId: (
|
18020
|
-
|
18021
|
-
|
18062
|
+
contentId: (_x = (_w = recData === null || recData === void 0 ? void 0 : recData.video) === null || _w === void 0 ? void 0 : _w.itemId) !== null && _x !== void 0 ? _x : '',
|
18063
|
+
sceneId: (_0 = (_z = (_y = recData === null || recData === void 0 ? void 0 : recData.video) === null || _y === void 0 ? void 0 : _y.scene) === null || _z === void 0 ? void 0 : _z.sceneId) !== null && _0 !== void 0 ? _0 : '',
|
18064
|
+
contentName: (_2 = (_1 = recData === null || recData === void 0 ? void 0 : recData.video) === null || _1 === void 0 ? void 0 : _1.title) !== null && _2 !== void 0 ? _2 : '',
|
18065
|
+
contentTags: JSON.stringify((_4 = (_3 = recData === null || recData === void 0 ? void 0 : recData.video) === null || _3 === void 0 ? void 0 : _3.tags) !== null && _4 !== void 0 ? _4 : []),
|
18022
18066
|
position: position + '',
|
18023
|
-
contentFormat: ((
|
18024
|
-
traceInfo: (
|
18067
|
+
contentFormat: ((_5 = recData === null || recData === void 0 ? void 0 : recData.video) === null || _5 === void 0 ? void 0 : _5.url) ? 'video' : 'image',
|
18068
|
+
traceInfo: (_6 = recData === null || recData === void 0 ? void 0 : recData.video) === null || _6 === void 0 ? void 0 : _6.traceInfo
|
18025
18069
|
}
|
18026
18070
|
});
|
18027
18071
|
if (!result) {
|
18028
18072
|
setState(false);
|
18029
18073
|
}
|
18030
18074
|
else {
|
18031
|
-
const nRtcList = (
|
18075
|
+
const nRtcList = (_7 = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
|
18032
18076
|
if (index === position) {
|
18033
18077
|
item.isCollected = true;
|
18034
18078
|
}
|
18035
18079
|
return item;
|
18036
|
-
})) !== null &&
|
18080
|
+
})) !== null && _7 !== void 0 ? _7 : [];
|
18037
18081
|
setCacheRtcList === null || setCacheRtcList === void 0 ? void 0 : setCacheRtcList(nRtcList);
|
18038
18082
|
}
|
18039
18083
|
}
|
@@ -18070,7 +18114,7 @@ Made in Italy` })));
|
|
18070
18114
|
const VideoWidget$4 = React.forwardRef(({ rec, index, height, data, muted, activeIndex, videoPostConfig, videoPlayIcon, loopPlay, swiperRef }, ref) => {
|
18071
18115
|
var _a, _b;
|
18072
18116
|
const [isPauseVideo, setIsPauseVideo] = React.useState(false);
|
18073
|
-
const { bffEventReport, sxpParameter,
|
18117
|
+
const { bffEventReport, sxpParameter, firstRtcList, openHashtag, bffFbReport, isDiyH5 } = useSxpDataSource();
|
18074
18118
|
const videoStartTime = React.useRef(0);
|
18075
18119
|
const [isLoadFinish, setIsLoadFinish] = React.useState(false);
|
18076
18120
|
const { isActive } = useSwiperSlide();
|
@@ -18136,6 +18180,23 @@ Made in Italy` })));
|
|
18136
18180
|
return;
|
18137
18181
|
(_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
|
18138
18182
|
}, [videoRef === null || videoRef === void 0 ? void 0 : videoRef.current]);
|
18183
|
+
const handleEnd = () => {
|
18184
|
+
var _a, _b, _c, _d, _e, _f;
|
18185
|
+
if (!videoRef.current)
|
18186
|
+
return;
|
18187
|
+
if (isDiyH5) {
|
18188
|
+
(_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.pause();
|
18189
|
+
if (!loopPlayRef.current)
|
18190
|
+
return;
|
18191
|
+
if (firstRtcList && index < (firstRtcList === null || firstRtcList === void 0 ? void 0 : firstRtcList.length) - 1) {
|
18192
|
+
const i = (_c = (_b = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _b === void 0 ? void 0 : _b.swiper) === null || _c === void 0 ? void 0 : _c.activeIndex;
|
18193
|
+
(_e = (_d = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _d === void 0 ? void 0 : _d.swiper) === null || _e === void 0 ? void 0 : _e.slideTo(i + 1);
|
18194
|
+
}
|
18195
|
+
}
|
18196
|
+
else {
|
18197
|
+
(_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.play();
|
18198
|
+
}
|
18199
|
+
};
|
18139
18200
|
const PAUSE_ICON = useIconLink('/pb_static/06f28a2025c74c1cb49be6767316d827.png');
|
18140
18201
|
const handlePlaying = React.useCallback(() => {
|
18141
18202
|
if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
|
@@ -18144,7 +18205,7 @@ Made in Italy` })));
|
|
18144
18205
|
setIsLoadFinish(true);
|
18145
18206
|
}, []);
|
18146
18207
|
const handleStartPlay = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
|
18147
|
-
var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
18208
|
+
var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
18148
18209
|
if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
|
18149
18210
|
return;
|
18150
18211
|
setIsPauseVideo(false);
|
@@ -18155,16 +18216,11 @@ Made in Italy` })));
|
|
18155
18216
|
const videoCurrentTime = ((_h = (_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.currentTime) !== null && _h !== void 0 ? _h : 0).toFixed(2);
|
18156
18217
|
const playType = (isFirstPlayRef === null || isFirstPlayRef === void 0 ? void 0 : isFirstPlayRef.current) ? '0' : '1';
|
18157
18218
|
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
18158
|
-
eventInfo: Object.assign({ eventSubject: 'playVideo', eventDescription: 'User played the video', contentId: (_k = (_j = item === null || item === void 0 ? void 0 : item.video) === null || _j === void 0 ? void 0 : _j.itemId) !== null && _k !== void 0 ? _k : '',
|
18219
|
+
eventInfo: Object.assign({ eventSubject: 'playVideo', eventDescription: 'User played the video', contentId: (_k = (_j = item === null || item === void 0 ? void 0 : item.video) === null || _j === void 0 ? void 0 : _j.itemId) !== null && _k !== void 0 ? _k : '', sceneId: (_o = (_m = (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.scene) === null || _m === void 0 ? void 0 : _m.sceneId) !== null && _o !== void 0 ? _o : '', contentName: (_q = (_p = item === null || item === void 0 ? void 0 : item.video) === null || _p === void 0 ? void 0 : _p.title) !== null && _q !== void 0 ? _q : '', playType, startTime: videoCurrentTime, videoDuration, contentTags: JSON.stringify((_s = (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.tags) !== null && _s !== void 0 ? _s : []), position: index + '', contentFormat: 'video', traceInfo: (_t = item === null || item === void 0 ? void 0 : item.video) === null || _t === void 0 ? void 0 : _t.traceInfo }, ((isFirstPlayRef === null || isFirstPlayRef === void 0 ? void 0 : isFirstPlayRef.current) && { loadTime: (loadedTimeRef === null || loadedTimeRef === void 0 ? void 0 : loadedTimeRef.current) - (initTimeRef === null || initTimeRef === void 0 ? void 0 : initTimeRef.current) + '' }))
|
18159
18220
|
});
|
18160
18221
|
isFirstPlayRef.current = false;
|
18161
18222
|
}
|
18162
18223
|
}), [bffEventReport, data, index, isFirstPlayRef, videoRef === null || videoRef === void 0 ? void 0 : videoRef.current]);
|
18163
|
-
const setCurrentTimeByStartTime = React.useCallback(() => {
|
18164
|
-
if (isDiyH5) {
|
18165
|
-
videoRef.current.currentTime = scene === null || scene === void 0 ? void 0 : scene.startTime;
|
18166
|
-
}
|
18167
|
-
}, []);
|
18168
18224
|
const handLoadeddata = React.useCallback(() => {
|
18169
18225
|
if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || firstFrameSrc || !blur)
|
18170
18226
|
return;
|
@@ -18189,13 +18245,12 @@ Made in Italy` })));
|
|
18189
18245
|
const handleLoadedmetadata = React.useCallback(() => {
|
18190
18246
|
if (!videoRef.current)
|
18191
18247
|
return;
|
18192
|
-
setCurrentTimeByStartTime();
|
18193
18248
|
loadedTimeRef.current = new Date();
|
18194
18249
|
handleStartPlay();
|
18195
18250
|
handLoadeddata();
|
18196
18251
|
}, [videoRef.current, handLoadeddata, handleStartPlay]);
|
18197
18252
|
const handleClickVideo = React.useCallback((type) => () => {
|
18198
|
-
var _a, _b, _c, _d, _e
|
18253
|
+
var _a, _b, _c, _d, _e;
|
18199
18254
|
if (!videoRef.current)
|
18200
18255
|
return;
|
18201
18256
|
if (!isLoadFinish)
|
@@ -18216,20 +18271,17 @@ Made in Italy` })));
|
|
18216
18271
|
break;
|
18217
18272
|
default:
|
18218
18273
|
if (isPause) {
|
18219
|
-
|
18220
|
-
videoRef.current.currentTime = scene === null || scene === void 0 ? void 0 : scene.startTime;
|
18221
|
-
}
|
18222
|
-
(_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.play();
|
18274
|
+
(_d = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _d === void 0 ? void 0 : _d.play();
|
18223
18275
|
}
|
18224
18276
|
else {
|
18225
|
-
(
|
18277
|
+
(_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.pause();
|
18226
18278
|
}
|
18227
18279
|
setIsPauseVideo(!isPause);
|
18228
18280
|
break;
|
18229
18281
|
}
|
18230
18282
|
}, [isLoadFinish, videoRef === null || videoRef === void 0 ? void 0 : videoRef.current]);
|
18231
18283
|
const handlePause = React.useCallback(() => {
|
18232
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
18284
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
18233
18285
|
if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
|
18234
18286
|
return;
|
18235
18287
|
if (activeIndex !== index)
|
@@ -18245,14 +18297,15 @@ Made in Italy` })));
|
|
18245
18297
|
eventSubject: 'playOverVideo',
|
18246
18298
|
eventDescription: 'User finished playing the video',
|
18247
18299
|
contentId: (_h = (_g = item === null || item === void 0 ? void 0 : item.video) === null || _g === void 0 ? void 0 : _g.itemId) !== null && _h !== void 0 ? _h : '',
|
18248
|
-
|
18300
|
+
sceneId: (_l = (_k = (_j = item === null || item === void 0 ? void 0 : item.video) === null || _j === void 0 ? void 0 : _j.scene) === null || _k === void 0 ? void 0 : _k.sceneId) !== null && _l !== void 0 ? _l : '',
|
18301
|
+
contentName: (_o = (_m = item === null || item === void 0 ? void 0 : item.video) === null || _m === void 0 ? void 0 : _m.title) !== null && _o !== void 0 ? _o : '',
|
18249
18302
|
endTime: videoCurrentTime,
|
18250
18303
|
videoDuration,
|
18251
18304
|
playDuration,
|
18252
|
-
contentTags: JSON.stringify((
|
18305
|
+
contentTags: JSON.stringify((_q = (_p = item === null || item === void 0 ? void 0 : item.video) === null || _p === void 0 ? void 0 : _p.tags) !== null && _q !== void 0 ? _q : []),
|
18253
18306
|
position: index + '',
|
18254
18307
|
contentFormat: 'video',
|
18255
|
-
traceInfo: (
|
18308
|
+
traceInfo: (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.traceInfo
|
18256
18309
|
}
|
18257
18310
|
});
|
18258
18311
|
}
|
@@ -18260,27 +18313,8 @@ Made in Italy` })));
|
|
18260
18313
|
const handleWaiting = React.useCallback(() => {
|
18261
18314
|
setWaiting(true);
|
18262
18315
|
}, []);
|
18263
|
-
const handleTimeUpload = () => {
|
18264
|
-
if (!videoRef.current || !isDiyH5)
|
18265
|
-
return;
|
18266
|
-
setTimeout(() => {
|
18267
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
18268
|
-
if (Math.round((_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.currentTime) >= ((_b = scene === null || scene === void 0 ? void 0 : scene.endTime) !== null && _b !== void 0 ? _b : 0)) {
|
18269
|
-
(_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.pause();
|
18270
|
-
if (!loopPlayRef.current)
|
18271
|
-
return;
|
18272
|
-
if (index === (data === null || data === void 0 ? void 0 : data.length) - 1) {
|
18273
|
-
(_e = (_d = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _d === void 0 ? void 0 : _d.swiper) === null || _e === void 0 ? void 0 : _e.slideTo(0);
|
18274
|
-
}
|
18275
|
-
else {
|
18276
|
-
const i = (_g = (_f = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _f === void 0 ? void 0 : _f.swiper) === null || _g === void 0 ? void 0 : _g.activeIndex;
|
18277
|
-
(_j = (_h = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _h === void 0 ? void 0 : _h.swiper) === null || _j === void 0 ? void 0 : _j.slideTo(i + 1);
|
18278
|
-
}
|
18279
|
-
}
|
18280
|
-
});
|
18281
|
-
};
|
18282
18316
|
React.useEffect(() => {
|
18283
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
18317
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
18284
18318
|
if (!isActive)
|
18285
18319
|
return;
|
18286
18320
|
const videoSrc = videoUrl;
|
@@ -18301,7 +18335,6 @@ Made in Italy` })));
|
|
18301
18335
|
hls === null || hls === void 0 ? void 0 : hls.attachMedia(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current);
|
18302
18336
|
hls === null || hls === void 0 ? void 0 : hls.on(Hls.Events.MANIFEST_PARSED, function () {
|
18303
18337
|
var _a;
|
18304
|
-
setCurrentTimeByStartTime();
|
18305
18338
|
(_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
|
18306
18339
|
});
|
18307
18340
|
}
|
@@ -18315,12 +18348,11 @@ Made in Italy` })));
|
|
18315
18348
|
(_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.addEventListener('play', handleStartPlay);
|
18316
18349
|
(_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.addEventListener('playing', handlePlaying);
|
18317
18350
|
(_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.addEventListener('pause', handlePause);
|
18318
|
-
(_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.addEventListener('ended',
|
18351
|
+
(_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.addEventListener('ended', handleEnd);
|
18319
18352
|
(_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.addEventListener('canplay', handlePlay);
|
18320
18353
|
(_k = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _k === void 0 ? void 0 : _k.addEventListener('waiting', handleWaiting);
|
18321
|
-
(_l = videoRef.current) === null || _l === void 0 ? void 0 : _l.addEventListener('timeupdate', handleTimeUpload);
|
18322
18354
|
return () => {
|
18323
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
18355
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
18324
18356
|
const isPause = (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.paused;
|
18325
18357
|
if (!isPause)
|
18326
18358
|
handlePause();
|
@@ -18332,10 +18364,9 @@ Made in Italy` })));
|
|
18332
18364
|
(_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.removeEventListener('play', handleStartPlay);
|
18333
18365
|
(_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.removeEventListener('playing', handlePlaying);
|
18334
18366
|
(_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.removeEventListener('pause', handlePause);
|
18335
|
-
(_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.removeEventListener('ended',
|
18367
|
+
(_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.removeEventListener('ended', handleEnd);
|
18336
18368
|
(_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.removeEventListener('canplay', handlePlay);
|
18337
18369
|
(_k = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _k === void 0 ? void 0 : _k.removeEventListener('waiting', handleWaiting);
|
18338
|
-
(_l = videoRef.current) === null || _l === void 0 ? void 0 : _l.removeEventListener('timeupdate', handleTimeUpload);
|
18339
18370
|
};
|
18340
18371
|
}, [isActive]);
|
18341
18372
|
React.useEffect(() => {
|
@@ -18546,19 +18577,45 @@ Made in Italy` })));
|
|
18546
18577
|
}, onLoad: onShowFirstImage }))));
|
18547
18578
|
};
|
18548
18579
|
|
18549
|
-
const PictureGroup$4 = ({ imgUrls,
|
18580
|
+
const PictureGroup$4 = React.forwardRef(({ imgUrls, data, height, rec, index, onViewImageEndEvent, onViewImageStartEvent, imgUrlsPostConfig, swiperRef }, ref) => {
|
18550
18581
|
var _a, _b;
|
18551
18582
|
const { isActive } = useSwiperSlide();
|
18552
|
-
const {
|
18583
|
+
const { firstRtcList, openHashtag, isDiyH5 } = useSxpDataSource();
|
18553
18584
|
const [isLoad, setIsLoad] = React.useState(false);
|
18554
18585
|
const [imgInfo, setImgInfo] = React.useState();
|
18555
18586
|
const [swiperActiveIndex, setSwiperActiveIndex] = React.useState(0);
|
18556
|
-
const
|
18587
|
+
const imgsSwiperRef = React.useRef();
|
18557
18588
|
const isFirstPlayRef = React.useRef(true);
|
18589
|
+
const loopPlayRef = React.useRef(true);
|
18558
18590
|
const initTime = new Date();
|
18591
|
+
React.useImperativeHandle(ref, () => {
|
18592
|
+
return {
|
18593
|
+
setLoopPlay(v) {
|
18594
|
+
loopPlayRef.current = v;
|
18595
|
+
}
|
18596
|
+
};
|
18597
|
+
});
|
18598
|
+
React.useEffect(() => {
|
18599
|
+
let timerId;
|
18600
|
+
if (isLoad && isActive && isDiyH5) {
|
18601
|
+
timerId = setTimeout(() => {
|
18602
|
+
var _a, _b, _c, _d;
|
18603
|
+
if (!loopPlayRef.current)
|
18604
|
+
return;
|
18605
|
+
if (firstRtcList && index < (firstRtcList === null || firstRtcList === void 0 ? void 0 : firstRtcList.length) - 1) {
|
18606
|
+
const i = (_b = (_a = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper) === null || _b === void 0 ? void 0 : _b.activeIndex;
|
18607
|
+
(_d = (_c = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _c === void 0 ? void 0 : _c.swiper) === null || _d === void 0 ? void 0 : _d.slideTo(i + 1);
|
18608
|
+
}
|
18609
|
+
}, 3000);
|
18610
|
+
}
|
18611
|
+
return () => {
|
18612
|
+
if (timerId)
|
18613
|
+
clearTimeout(timerId);
|
18614
|
+
};
|
18615
|
+
}, [isLoad, isActive, isDiyH5, index, swiperRef, firstRtcList]);
|
18559
18616
|
React.useEffect(() => {
|
18560
18617
|
if (isLoad && isActive) {
|
18561
|
-
(
|
18618
|
+
(imgsSwiperRef === null || imgsSwiperRef === void 0 ? void 0 : imgsSwiperRef.current) && imgsSwiperRef.current.swiper.autoplay.start();
|
18562
18619
|
if (openHashtag) {
|
18563
18620
|
onViewImageEndEvent(rec);
|
18564
18621
|
}
|
@@ -18568,7 +18625,7 @@ Made in Italy` })));
|
|
18568
18625
|
}
|
18569
18626
|
}
|
18570
18627
|
else {
|
18571
|
-
(
|
18628
|
+
(imgsSwiperRef === null || imgsSwiperRef === void 0 ? void 0 : imgsSwiperRef.current) && imgsSwiperRef.current.swiper.autoplay.stop();
|
18572
18629
|
}
|
18573
18630
|
}, [rec, isActive, onViewImageEndEvent, openHashtag, index, onViewImageStartEvent, isLoad, imgInfo]);
|
18574
18631
|
const showFirstImageFn = React.useCallback((e) => __awaiter(void 0, void 0, void 0, function* () {
|
@@ -18595,13 +18652,13 @@ Made in Italy` })));
|
|
18595
18652
|
};
|
18596
18653
|
}, [isActive, imgInfo]);
|
18597
18654
|
const handleMouseEnter = React.useCallback(() => {
|
18598
|
-
if (
|
18599
|
-
|
18655
|
+
if (imgsSwiperRef.current && imgsSwiperRef.current.swiper && isAlly) {
|
18656
|
+
imgsSwiperRef.current.swiper.autoplay.stop();
|
18600
18657
|
}
|
18601
18658
|
}, []);
|
18602
18659
|
const handleMouseLeave = React.useCallback(() => {
|
18603
|
-
if (
|
18604
|
-
|
18660
|
+
if (imgsSwiperRef.current && imgsSwiperRef.current.swiper && isAlly) {
|
18661
|
+
imgsSwiperRef.current.swiper.autoplay.start();
|
18605
18662
|
}
|
18606
18663
|
}, []);
|
18607
18664
|
const handleSlideChange = React.useCallback((swiper) => {
|
@@ -18622,7 +18679,7 @@ Made in Italy` })));
|
|
18622
18679
|
enabled: true
|
18623
18680
|
}
|
18624
18681
|
}
|
18625
|
-
: {}), { loop: true, ref:
|
18682
|
+
: {}), { loop: true, ref: imgsSwiperRef, onSlideChange: handleSlideChange, className: css.css(Object.assign(Object.assign({ '.swiper-pagination': {
|
18626
18683
|
bottom: (_a = imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.marginBottom) !== null && _a !== void 0 ? _a : 0,
|
18627
18684
|
fontSize: '14px'
|
18628
18685
|
} }, ((imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.dotsBgColor) && {
|
@@ -18639,7 +18696,7 @@ Made in Italy` })));
|
|
18639
18696
|
return (React.createElement(SwiperSlide, { key: srcKey, "aria-hidden": srcKey !== swiperActiveIndex },
|
18640
18697
|
React.createElement(Picture, { src: !isLoad && srcKey > 0 ? '' : url, height: height, imgUrlsPostConfig: imgUrlsPostConfig, onShowFirstImage: showFirstImageFn })));
|
18641
18698
|
}))));
|
18642
|
-
};
|
18699
|
+
});
|
18643
18700
|
var PictureGroup$5 = React.memo(PictureGroup$4);
|
18644
18701
|
|
18645
18702
|
/*
|
@@ -18760,22 +18817,10 @@ Made in Italy` })));
|
|
18760
18817
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\RenderCard.tsx
|
18761
18818
|
*
|
18762
18819
|
*/
|
18763
|
-
const RenderCard = ({ rec, index, tempMap, resolver, includesCtaType, isActive, isNineProduct }) => {
|
18764
|
-
var _a, _b, _c, _d, _e;
|
18820
|
+
const RenderCard = ({ rec, index, tempMap, resolver, includesCtaType, isActive, value, isNineProduct }) => {
|
18765
18821
|
const { schema } = useEditor();
|
18766
18822
|
if (!(rec === null || rec === void 0 ? void 0 : rec.video))
|
18767
18823
|
return null;
|
18768
|
-
let cta = null;
|
18769
|
-
if ((_b = (_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b.length) {
|
18770
|
-
cta = '多商品CTA';
|
18771
|
-
}
|
18772
|
-
else if ((_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProduct) {
|
18773
|
-
cta = '商品CTA';
|
18774
|
-
}
|
18775
|
-
else {
|
18776
|
-
cta = (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.bindCta) === null || _e === void 0 ? void 0 : _e.itemId;
|
18777
|
-
}
|
18778
|
-
const value = tempMap === null || tempMap === void 0 ? void 0 : tempMap[cta];
|
18779
18824
|
const renderComp = React.useMemo(() => {
|
18780
18825
|
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;
|
18781
18826
|
// 如果includesCtaType有值,则只渲染includesCtaType包含的cta类型组件,用于在页面某处只显示某一组件
|
@@ -18803,7 +18848,7 @@ Made in Italy` })));
|
|
18803
18848
|
const sbf = style.backdropFilter;
|
18804
18849
|
style.backdropFilter = `blur(${sbf !== null && sbf !== void 0 ? sbf : 0}px)`;
|
18805
18850
|
}
|
18806
|
-
return (React.createElement(Component, Object.assign({ style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), style), { zIndex: 50,
|
18851
|
+
return (React.createElement(Component, Object.assign({ style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), style), { zIndex: 50, marginLeft: '20px', boxSizing: 'border-box', transform: 'translate3d(0px, 0px, 0px)' }), textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_z = value === null || value === void 0 ? void 0 : value.item) === null || _z === void 0 ? void 0 : _z.textStyle), bindDatas: (_1 = (_0 = value === null || value === void 0 ? void 0 : value.item) === null || _0 === void 0 ? void 0 : _0.bindDatas) !== null && _1 !== void 0 ? _1 : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_2 = value === null || value === void 0 ? void 0 : value.item) === null || _2 === void 0 ? void 0 : _2.props, { event: ((_3 = value === null || value === void 0 ? void 0 : value.item) === null || _3 === void 0 ? void 0 : _3.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, key: value === null || value === void 0 ? void 0 : value.id, recData: rec, isExternalLink: isExternalLink, index: index, isActive: isActive })));
|
18807
18852
|
}
|
18808
18853
|
else {
|
18809
18854
|
return null;
|
@@ -18931,7 +18976,7 @@ Made in Italy` })));
|
|
18931
18976
|
* @Author: binruan@chatlabs.com
|
18932
18977
|
* @Date: 2024-03-20 10:27:31
|
18933
18978
|
* @LastEditors: binruan@chatlabs.com
|
18934
|
-
* @LastEditTime: 2025-05-
|
18979
|
+
* @LastEditTime: 2025-05-12 14:26:15
|
18935
18980
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
|
18936
18981
|
*
|
18937
18982
|
*/
|
@@ -18951,6 +18996,7 @@ Made in Italy` })));
|
|
18951
18996
|
const skipLinkRef = React.useRef(false);
|
18952
18997
|
const [pageNum, setPageNum] = React.useState(2);
|
18953
18998
|
const videoWidgetRef = React.useRef(null);
|
18999
|
+
const pictureGroupRef = React.useRef(null);
|
18954
19000
|
const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport, curTime, h5EnterLink, isShowConsent, selectTag, isPreview, isEditor, cacheRtcList, setRtcList, cacheActiveIndex, rtcList, isNoMoreData, channel, refreshFeSession, isDiyH5 } = useSxpDataSource();
|
18955
19001
|
const { backMainFeed, productView, jumpToWeb } = useEventReport();
|
18956
19002
|
const isShowFingerTip = React.useMemo(() => {
|
@@ -18998,7 +19044,7 @@ Made in Italy` })));
|
|
18998
19044
|
(_a = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper.slideTo(index);
|
18999
19045
|
}, [data, ctaType, swiperRef]);
|
19000
19046
|
const handleSessionCompleted = React.useCallback((fk) => {
|
19001
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
|
19047
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
|
19002
19048
|
const item = data === null || data === void 0 ? void 0 : data[activeIndex];
|
19003
19049
|
let fromKName = '';
|
19004
19050
|
if (popupDetailData && (((_b = (_a = item === null || item === void 0 ? void 0 : item.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b.length) || ((_c = item === null || item === void 0 ? void 0 : item.video) === null || _c === void 0 ? void 0 : _c.bindProduct))) {
|
@@ -19025,12 +19071,13 @@ Made in Italy` })));
|
|
19025
19071
|
eventSubject: 'sessionCompleted',
|
19026
19072
|
eventDescription: 'Session completed',
|
19027
19073
|
contentId: (_m = item === null || item === void 0 ? void 0 : item.video) === null || _m === void 0 ? void 0 : _m.itemId,
|
19028
|
-
|
19074
|
+
sceneId: (_q = (_p = (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.scene) === null || _p === void 0 ? void 0 : _p.sceneId) !== null && _q !== void 0 ? _q : '',
|
19075
|
+
productId: (_r = item === null || item === void 0 ? void 0 : item.product) === null || _r === void 0 ? void 0 : _r.itemId,
|
19029
19076
|
position: activeIndex + '',
|
19030
19077
|
fromKName: fk || fromKName,
|
19031
19078
|
fromKPage: location === null || location === void 0 ? void 0 : location.href,
|
19032
|
-
ctatId: (
|
19033
|
-
traceInfo: (
|
19079
|
+
ctatId: (_u = (_t = (_s = item === null || item === void 0 ? void 0 : item.video) === null || _s === void 0 ? void 0 : _s.bindCta) === null || _t === void 0 ? void 0 : _t.itemId) !== null && _u !== void 0 ? _u : '',
|
19080
|
+
traceInfo: (_y = (_w = (_v = item === null || item === void 0 ? void 0 : item.video) === null || _v === void 0 ? void 0 : _v.traceInfo) !== null && _w !== void 0 ? _w : (_x = item === null || item === void 0 ? void 0 : item.product) === null || _x === void 0 ? void 0 : _x.traceInfo) !== null && _y !== void 0 ? _y : ''
|
19034
19081
|
}
|
19035
19082
|
});
|
19036
19083
|
}, [data, bffEventReport, activeIndex, popupDetailData, tempMap, isFromHashtag, curTime]);
|
@@ -19089,8 +19136,9 @@ Made in Italy` })));
|
|
19089
19136
|
refreshFeSession
|
19090
19137
|
]);
|
19091
19138
|
const handleSessionExpire = React.useCallback(lodash.debounce(() => {
|
19092
|
-
var _a;
|
19139
|
+
var _a, _b;
|
19093
19140
|
(_a = videoWidgetRef.current) === null || _a === void 0 ? void 0 : _a.setLoopPlay(false);
|
19141
|
+
(_b = pictureGroupRef.current) === null || _b === void 0 ? void 0 : _b.setLoopPlay(false);
|
19094
19142
|
refreshFeSession === null || refreshFeSession === void 0 ? void 0 : refreshFeSession(false, handleSessionCompleted);
|
19095
19143
|
}, 1000), [handleSessionCompleted, refreshFeSession]);
|
19096
19144
|
React.useEffect(() => {
|
@@ -19160,18 +19208,18 @@ Made in Italy` })));
|
|
19160
19208
|
return null;
|
19161
19209
|
}, [globalConfig, activeIndex, visList]);
|
19162
19210
|
const renderContent = React.useCallback((rec, index) => {
|
19163
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
19211
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
19164
19212
|
if (rec === 'organic menu') {
|
19165
19213
|
return (React.createElement(MultiPosts$2, Object.assign({ recData: data === null || data === void 0 ? void 0 : data[1] }, (_c = (_b = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.multiPosts) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.item) === null || _c === void 0 ? void 0 : _c.props, (_f = (_e = (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.multiPosts) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.item) === null || _f === void 0 ? void 0 : _f.event)));
|
19166
19214
|
}
|
19167
|
-
if ((_g = rec === null || rec === void 0 ? void 0 : rec.video) === null ||
|
19215
|
+
if (((_h = (_g = rec.video) === null || _g === void 0 ? void 0 : _g.scene) === null || _h === void 0 ? void 0 : _h.mediaUrl) || ((_j = rec === null || rec === void 0 ? void 0 : rec.video) === null || _j === void 0 ? void 0 : _j.url)) {
|
19168
19216
|
return (React.createElement(VideoWidget$5, Object.assign({ key: isReload }, (activeIndex === index && { ref: videoWidgetRef }), { rec: rec, index: index, muted: isMuted, data: data, height: height, activeIndex: activeIndex, videoPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.videoPost, videoPlayIcon: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.videoPlayIcon, loopPlay: true, swiperRef: swiperRef })));
|
19169
19217
|
}
|
19170
|
-
if ((
|
19171
|
-
return (React.createElement(PictureGroup$5, { key: rec === null || rec === void 0 ? void 0 : rec.video.itemId, imgUrls: rec === null || rec === void 0 ? void 0 : rec.video.imgUrls, width: containerWidth, height: height, rec: rec, index: index, onViewImageEndEvent: handleViewImageStartEnd, onViewImageStartEvent: handleViewImageStartEvent, imgUrlsPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.imgUrlsPost }));
|
19218
|
+
if ((_k = rec === null || rec === void 0 ? void 0 : rec.video) === null || _k === void 0 ? void 0 : _k.imgUrls) {
|
19219
|
+
return (React.createElement(PictureGroup$5, Object.assign({ data: data }, (activeIndex === index && { ref: pictureGroupRef }), { key: rec === null || rec === void 0 ? void 0 : rec.video.itemId, imgUrls: rec === null || rec === void 0 ? void 0 : rec.video.imgUrls, width: containerWidth, height: height, rec: rec, index: index, onViewImageEndEvent: handleViewImageStartEnd, onViewImageStartEvent: handleViewImageStartEvent, imgUrlsPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.imgUrlsPost, swiperRef: swiperRef })));
|
19172
19220
|
}
|
19173
|
-
if (rec.product && Array.isArray(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) && ((
|
19174
|
-
return (
|
19221
|
+
if (rec.product && Array.isArray(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) && ((_l = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _l === void 0 ? void 0 : _l.length) > 0) {
|
19222
|
+
return (_m = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _m === void 0 ? void 0 : _m.map((value, idx) => {
|
19175
19223
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
19176
19224
|
const t = resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type];
|
19177
19225
|
const Component = withBindDataSource(t);
|
@@ -19209,7 +19257,7 @@ Made in Italy` })));
|
|
19209
19257
|
};
|
19210
19258
|
}, [isShowMore]);
|
19211
19259
|
const renderBottom = React.useCallback((rec, index) => {
|
19212
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
19260
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
19213
19261
|
if (rec === null || rec === void 0 ? void 0 : rec.video) {
|
19214
19262
|
let cta = null;
|
19215
19263
|
if ((_b = (_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b.length) {
|
@@ -19218,25 +19266,28 @@ Made in Italy` })));
|
|
19218
19266
|
else if ((_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProduct) {
|
19219
19267
|
cta = '商品CTA';
|
19220
19268
|
}
|
19269
|
+
else if (tempMap && ((_d = Object.keys(tempMap)) === null || _d === void 0 ? void 0 : _d.includes('服务CTA')) && ((_f = (_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.bindCta) === null || _f === void 0 ? void 0 : _f.itemId)) {
|
19270
|
+
cta = '服务CTA';
|
19271
|
+
}
|
19221
19272
|
else {
|
19222
|
-
cta = (
|
19273
|
+
cta = (_h = (_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.bindCta) === null || _h === void 0 ? void 0 : _h.itemId;
|
19223
19274
|
}
|
19224
19275
|
const value = tempMap === null || tempMap === void 0 ? void 0 : tempMap[cta];
|
19225
19276
|
const isNineProduct = (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.nineProductEnable) &&
|
19226
19277
|
index === ((rtcList === null || rtcList === void 0 ? void 0 : rtcList[0]) === 'organic menu' ? 2 : 1) &&
|
19227
|
-
((
|
19278
|
+
((_j = ['MultiCommodity', 'MultiCommodityDiro', 'MultiCommodityDiroNew']) === null || _j === void 0 ? void 0 : _j.includes((_k = value === null || value === void 0 ? void 0 : value.item) === null || _k === void 0 ? void 0 : _k.type));
|
19228
19279
|
return (React.createElement(React.Fragment, null,
|
19229
|
-
isNineProduct && (React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, isActive: index === activeIndex, isNineProduct: isNineProduct })),
|
19230
|
-
((
|
19231
|
-
React.createElement("div", { className: 'clc-sxp-bottom', style: { marginBottom: `${(
|
19280
|
+
isNineProduct && (React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, isActive: index === activeIndex, value: value, isNineProduct: isNineProduct })),
|
19281
|
+
((_l = rec === null || rec === void 0 ? void 0 : rec.video) === null || _l === void 0 ? void 0 : _l.title) && !isShowMore && React.createElement("div", { className: 'clc-sxp-bottom-shadow' }),
|
19282
|
+
React.createElement("div", { className: 'clc-sxp-bottom', style: { marginBottom: `${(_m = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.bottomInfoDist) !== null && _m !== void 0 ? _m : 40}px` } },
|
19232
19283
|
React.createElement(Nudge, { nudge: nudge }),
|
19233
19284
|
((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA)) && !isNineProduct ? (React.createElement("div", { className: 'clc-sxp-bottom-card' },
|
19234
|
-
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, isActive: index === activeIndex }))) : null,
|
19285
|
+
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, isActive: index === activeIndex, value: value }))) : null,
|
19235
19286
|
React.createElement("div", null,
|
19236
|
-
React.createElement(ExpandableText$1, { className: 'clc-sxp-bottom-text', isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (
|
19237
|
-
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLink'], isActive: index === activeIndex }),
|
19238
|
-
React.createElement(Hashtag$1, { index: activeIndex, tags: (
|
19239
|
-
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLinkPopup'], isActive: index === activeIndex })));
|
19287
|
+
React.createElement(ExpandableText$1, { className: 'clc-sxp-bottom-text', isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_p = (_o = rec === null || rec === void 0 ? void 0 : rec.video) === null || _o === void 0 ? void 0 : _o.title) !== null && _p !== void 0 ? _p : '', style: Object.assign(Object.assign({}, descStyle), { textShadow: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isOpenTextShadow) ? '2px 2px 4px rgba(0, 0, 0, 0.5)' : 'none' }), onChange: onExpandableChange }),
|
19288
|
+
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLink'], isActive: index === activeIndex, value: value }),
|
19289
|
+
React.createElement(Hashtag$1, { index: activeIndex, tags: (_r = (_q = rec === null || rec === void 0 ? void 0 : rec.video) === null || _q === void 0 ? void 0 : _q.hashTags) !== null && _r !== void 0 ? _r : [], itemId: (_s = rec === null || rec === void 0 ? void 0 : rec.video) === null || _s === void 0 ? void 0 : _s.itemId, itemType: ((_t = rec === null || rec === void 0 ? void 0 : rec.video) === null || _t === void 0 ? void 0 : _t.itemId) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle, hashTagRightMargin: containerWidth - (hashTagRightMargin !== null && hashTagRightMargin !== void 0 ? hashTagRightMargin : 0) }))),
|
19290
|
+
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLinkPopup'], isActive: index === activeIndex, value: value })));
|
19240
19291
|
}
|
19241
19292
|
return null;
|
19242
19293
|
}, [
|
@@ -19274,7 +19325,7 @@ Made in Italy` })));
|
|
19274
19325
|
return null;
|
19275
19326
|
}, [globalConfig, waterFallData]);
|
19276
19327
|
const handleViewImageStartEnd = (item) => {
|
19277
|
-
var _a, _b, _c, _d, _e, _f;
|
19328
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
19278
19329
|
if (!((_a = item === null || item === void 0 ? void 0 : item.video) === null || _a === void 0 ? void 0 : _a.url) && ((_b = item === null || item === void 0 ? void 0 : item.video) === null || _b === void 0 ? void 0 : _b.imgUrls)) {
|
19279
19330
|
const endTime = Date.now();
|
19280
19331
|
const duration = viewImageStartTime.current === 0 ? 0 : (endTime - viewImageStartTime.current) / 1000;
|
@@ -19283,10 +19334,11 @@ Made in Italy` })));
|
|
19283
19334
|
eventSubject: 'viewImageCarouselEnd',
|
19284
19335
|
eventDescription: 'User end view the image carousel',
|
19285
19336
|
contentId: (_d = (_c = item === null || item === void 0 ? void 0 : item.video) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '',
|
19286
|
-
|
19337
|
+
sceneId: (_g = (_f = (_e = item === null || item === void 0 ? void 0 : item.video) === null || _e === void 0 ? void 0 : _e.scene) === null || _f === void 0 ? void 0 : _f.sceneId) !== null && _g !== void 0 ? _g : '',
|
19338
|
+
contentName: (_h = item === null || item === void 0 ? void 0 : item.video.title) !== null && _h !== void 0 ? _h : '',
|
19287
19339
|
imageEndTime: `${endTime}`,
|
19288
19340
|
playDuration: `${duration}`,
|
19289
|
-
contentTags: JSON.stringify((
|
19341
|
+
contentTags: JSON.stringify((_j = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _j !== void 0 ? _j : []),
|
19290
19342
|
position: activeIndex + '',
|
19291
19343
|
contentFormat: 'image',
|
19292
19344
|
traceInfo: item === null || item === void 0 ? void 0 : item.video.traceInfo
|
@@ -19295,7 +19347,7 @@ Made in Italy` })));
|
|
19295
19347
|
}
|
19296
19348
|
};
|
19297
19349
|
const handleSlideSkip = (item, position) => {
|
19298
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
|
19350
|
+
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;
|
19299
19351
|
if (isPreview || waterFallData)
|
19300
19352
|
return;
|
19301
19353
|
const t = new Date() - curTime.current;
|
@@ -19321,7 +19373,8 @@ Made in Italy` })));
|
|
19321
19373
|
contentTags: (product === null || product === void 0 ? void 0 : product.tags) ? JSON.stringify(product === null || product === void 0 ? void 0 : product.tags) : '',
|
19322
19374
|
position: position + '',
|
19323
19375
|
contentId: (_t = (_s = item === null || item === void 0 ? void 0 : item.video) === null || _s === void 0 ? void 0 : _s.itemId) !== null && _t !== void 0 ? _t : '',
|
19324
|
-
|
19376
|
+
sceneId: (_w = (_v = (_u = item === null || item === void 0 ? void 0 : item.video) === null || _u === void 0 ? void 0 : _u.scene) === null || _v === void 0 ? void 0 : _v.sceneId) !== null && _w !== void 0 ? _w : '',
|
19377
|
+
traceInfo: (_0 = (_y = (_x = item === null || item === void 0 ? void 0 : item.video) === null || _x === void 0 ? void 0 : _x.traceInfo) !== null && _y !== void 0 ? _y : (_z = item === null || item === void 0 ? void 0 : item.product) === null || _z === void 0 ? void 0 : _z.traceInfo) !== null && _0 !== void 0 ? _0 : '',
|
19325
19378
|
contentFormat
|
19326
19379
|
}
|
19327
19380
|
});
|
@@ -19331,7 +19384,7 @@ Made in Italy` })));
|
|
19331
19384
|
}
|
19332
19385
|
};
|
19333
19386
|
const handleScrollEvent = (swiper) => {
|
19334
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
|
19387
|
+
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;
|
19335
19388
|
const item = data[swiper.previousIndex];
|
19336
19389
|
if (!item)
|
19337
19390
|
return;
|
@@ -19348,11 +19401,12 @@ Made in Italy` })));
|
|
19348
19401
|
eventSubject: 'scrollDown',
|
19349
19402
|
eventDescription: 'User scroll down',
|
19350
19403
|
contentId: (_e = (_d = item === null || item === void 0 ? void 0 : item.video) === null || _d === void 0 ? void 0 : _d.itemId) !== null && _e !== void 0 ? _e : '',
|
19351
|
-
|
19404
|
+
sceneId: (_h = (_g = (_f = item === null || item === void 0 ? void 0 : item.video) === null || _f === void 0 ? void 0 : _f.scene) === null || _g === void 0 ? void 0 : _g.sceneId) !== null && _h !== void 0 ? _h : '',
|
19405
|
+
productId: (_k = (_j = item === null || item === void 0 ? void 0 : item.product) === null || _j === void 0 ? void 0 : _j.itemId) !== null && _k !== void 0 ? _k : '',
|
19352
19406
|
requestId: null,
|
19353
|
-
traceInfo: (
|
19407
|
+
traceInfo: (_p = (_m = (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.traceInfo) !== null && _m !== void 0 ? _m : (_o = item === null || item === void 0 ? void 0 : item.product) === null || _o === void 0 ? void 0 : _o.traceInfo) !== null && _p !== void 0 ? _p : '',
|
19354
19408
|
contentFormat,
|
19355
|
-
position: ((
|
19409
|
+
position: ((_q = swiper.previousIndex) !== null && _q !== void 0 ? _q : 0) + ''
|
19356
19410
|
}
|
19357
19411
|
});
|
19358
19412
|
// 如果上一个商品是图片集,需上报 浏览图片集结结束 事件
|
@@ -19364,12 +19418,13 @@ Made in Italy` })));
|
|
19364
19418
|
eventInfo: {
|
19365
19419
|
eventSubject: 'scrollUp',
|
19366
19420
|
eventDescription: 'User scroll up',
|
19367
|
-
contentId: (
|
19368
|
-
|
19421
|
+
contentId: (_s = (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.itemId) !== null && _s !== void 0 ? _s : '',
|
19422
|
+
sceneId: (_v = (_u = (_t = item === null || item === void 0 ? void 0 : item.video) === null || _t === void 0 ? void 0 : _t.scene) === null || _u === void 0 ? void 0 : _u.sceneId) !== null && _v !== void 0 ? _v : '',
|
19423
|
+
productId: (_x = (_w = item.product) === null || _w === void 0 ? void 0 : _w.itemId) !== null && _x !== void 0 ? _x : '',
|
19369
19424
|
requestId: null,
|
19370
|
-
traceInfo: (
|
19425
|
+
traceInfo: (_1 = (_z = (_y = item === null || item === void 0 ? void 0 : item.video) === null || _y === void 0 ? void 0 : _y.traceInfo) !== null && _z !== void 0 ? _z : (_0 = item === null || item === void 0 ? void 0 : item.product) === null || _0 === void 0 ? void 0 : _0.traceInfo) !== null && _1 !== void 0 ? _1 : '',
|
19371
19426
|
contentFormat,
|
19372
|
-
position: ((
|
19427
|
+
position: ((_2 = swiper.previousIndex) !== null && _2 !== void 0 ? _2 : 0) + ''
|
19373
19428
|
}
|
19374
19429
|
});
|
19375
19430
|
// 如果上一个商品是图片集,需上报 浏览图片集结结束 事件
|
@@ -19395,7 +19450,7 @@ Made in Italy` })));
|
|
19395
19450
|
}
|
19396
19451
|
}, [openHashtag, data, activeIndex]);
|
19397
19452
|
const handleViewImageStartEvent = (activeIndex, imgInfo, enableCapi) => {
|
19398
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
19453
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
19399
19454
|
const item = data[activeIndex];
|
19400
19455
|
// 如果是图片集则上报事件
|
19401
19456
|
if (!((_a = item === null || item === void 0 ? void 0 : item.video) === null || _a === void 0 ? void 0 : _a.url) && ((_b = item === null || item === void 0 ? void 0 : item.video) === null || _b === void 0 ? void 0 : _b.imgUrls)) {
|
@@ -19406,9 +19461,10 @@ Made in Italy` })));
|
|
19406
19461
|
eventSubject: 'viewImageCarouselStart',
|
19407
19462
|
eventDescription: 'User start view the image carousel',
|
19408
19463
|
contentId: (_d = (_c = item === null || item === void 0 ? void 0 : item.video) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '',
|
19409
|
-
|
19464
|
+
sceneId: (_g = (_f = (_e = item === null || item === void 0 ? void 0 : item.video) === null || _e === void 0 ? void 0 : _e.scene) === null || _f === void 0 ? void 0 : _f.sceneId) !== null && _g !== void 0 ? _g : '',
|
19465
|
+
contentName: (_h = item === null || item === void 0 ? void 0 : item.video.title) !== null && _h !== void 0 ? _h : '',
|
19410
19466
|
imageStartTime: `${startTime}`,
|
19411
|
-
contentTags: JSON.stringify((
|
19467
|
+
contentTags: JSON.stringify((_j = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _j !== void 0 ? _j : []),
|
19412
19468
|
position: activeIndex + '',
|
19413
19469
|
contentFormat: 'image',
|
19414
19470
|
traceInfo: item === null || item === void 0 ? void 0 : item.video.traceInfo,
|
@@ -19418,11 +19474,11 @@ Made in Italy` })));
|
|
19418
19474
|
if (enableCapi) {
|
19419
19475
|
bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
|
19420
19476
|
eventName: 'ViewContent',
|
19421
|
-
product: (
|
19477
|
+
product: (_k = item === null || item === void 0 ? void 0 : item.video) === null || _k === void 0 ? void 0 : _k.bindProduct
|
19422
19478
|
});
|
19423
19479
|
bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
|
19424
19480
|
eventName: 'PageView',
|
19425
|
-
product: (
|
19481
|
+
product: (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.bindProduct
|
19426
19482
|
});
|
19427
19483
|
}
|
19428
19484
|
}
|
@@ -19514,15 +19570,20 @@ Made in Italy` })));
|
|
19514
19570
|
swiperRef.current.swiper.allowTouchMove = true;
|
19515
19571
|
}, 500);
|
19516
19572
|
}, onActiveIndexChange: (swiper) => {
|
19573
|
+
var _a, _b;
|
19517
19574
|
setActiveIndex(swiper.activeIndex);
|
19518
19575
|
if (openHashtag)
|
19519
19576
|
return;
|
19520
19577
|
// 处理上滑下滑事件
|
19521
19578
|
handleScrollEvent(swiper);
|
19522
|
-
if (waterFallData || isEditor
|
19579
|
+
if (waterFallData || isEditor)
|
19523
19580
|
return;
|
19524
19581
|
if ((swiper === null || swiper === void 0 ? void 0 : swiper.activeIndex) + 1 >= (data === null || data === void 0 ? void 0 : data.length)) {
|
19525
19582
|
if (!isLoadMore) {
|
19583
|
+
if (isDiyH5) {
|
19584
|
+
(_a = videoWidgetRef.current) === null || _a === void 0 ? void 0 : _a.setLoopPlay(false);
|
19585
|
+
(_b = pictureGroupRef.current) === null || _b === void 0 ? void 0 : _b.setLoopPlay(false);
|
19586
|
+
}
|
19526
19587
|
setIsLoadMore(true);
|
19527
19588
|
loadVideos === null || loadVideos === void 0 ? void 0 : loadVideos(pageNum).then((res) => {
|
19528
19589
|
var _a;
|
@@ -19575,7 +19636,7 @@ Made in Italy` })));
|
|
19575
19636
|
}, []);
|
19576
19637
|
const PAUSE_ICON = useIconLink('/pb_static/06f28a2025c74c1cb49be6767316d827.png');
|
19577
19638
|
const handlePlaying = React.useCallback(() => {
|
19578
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
19639
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
19579
19640
|
setIsPauseVideo(false);
|
19580
19641
|
const item = data[index];
|
19581
19642
|
if (item && ((_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.duration)) {
|
@@ -19588,14 +19649,15 @@ Made in Italy` })));
|
|
19588
19649
|
eventSubject: 'playVideo',
|
19589
19650
|
eventDescription: 'User played the video',
|
19590
19651
|
contentId: (_h = (_g = item === null || item === void 0 ? void 0 : item.video) === null || _g === void 0 ? void 0 : _g.itemId) !== null && _h !== void 0 ? _h : '',
|
19591
|
-
|
19652
|
+
sceneId: (_l = (_k = (_j = item === null || item === void 0 ? void 0 : item.video) === null || _j === void 0 ? void 0 : _j.scene) === null || _k === void 0 ? void 0 : _k.sceneId) !== null && _l !== void 0 ? _l : '',
|
19653
|
+
contentName: (_o = (_m = item === null || item === void 0 ? void 0 : item.video) === null || _m === void 0 ? void 0 : _m.title) !== null && _o !== void 0 ? _o : '',
|
19592
19654
|
playType,
|
19593
19655
|
startTime: videoCurrentTime,
|
19594
19656
|
videoDuration,
|
19595
|
-
contentTags: JSON.stringify((
|
19657
|
+
contentTags: JSON.stringify((_q = (_p = item === null || item === void 0 ? void 0 : item.video) === null || _p === void 0 ? void 0 : _p.tags) !== null && _q !== void 0 ? _q : []),
|
19596
19658
|
position: index + '',
|
19597
19659
|
contentFormat: 'video',
|
19598
|
-
traceInfo: (
|
19660
|
+
traceInfo: (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.traceInfo
|
19599
19661
|
}
|
19600
19662
|
});
|
19601
19663
|
setIsFirstPlay(false);
|
@@ -19634,7 +19696,7 @@ Made in Italy` })));
|
|
19634
19696
|
}
|
19635
19697
|
}, [isLoadFinish]);
|
19636
19698
|
const onPause = React.useCallback(() => {
|
19637
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
19699
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
19638
19700
|
const item = data[index];
|
19639
19701
|
const videoDuration = ((_b = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.duration) !== null && _b !== void 0 ? _b : 0).toFixed(2);
|
19640
19702
|
const videoCurrentTime = ((_d = (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.currentTime) !== null && _d !== void 0 ? _d : 0).toFixed(2);
|
@@ -19645,14 +19707,15 @@ Made in Italy` })));
|
|
19645
19707
|
eventSubject: 'playOverVideo',
|
19646
19708
|
eventDescription: 'User finished playing the video',
|
19647
19709
|
contentId: (_h = (_g = item === null || item === void 0 ? void 0 : item.video) === null || _g === void 0 ? void 0 : _g.itemId) !== null && _h !== void 0 ? _h : '',
|
19648
|
-
|
19710
|
+
sceneId: (_l = (_k = (_j = item === null || item === void 0 ? void 0 : item.video) === null || _j === void 0 ? void 0 : _j.scene) === null || _k === void 0 ? void 0 : _k.sceneId) !== null && _l !== void 0 ? _l : '',
|
19711
|
+
contentName: (_o = (_m = item === null || item === void 0 ? void 0 : item.video) === null || _m === void 0 ? void 0 : _m.title) !== null && _o !== void 0 ? _o : '',
|
19649
19712
|
endTime: videoCurrentTime,
|
19650
19713
|
videoDuration,
|
19651
19714
|
playDuration,
|
19652
|
-
contentTags: JSON.stringify((
|
19715
|
+
contentTags: JSON.stringify((_q = (_p = item === null || item === void 0 ? void 0 : item.video) === null || _p === void 0 ? void 0 : _p.tags) !== null && _q !== void 0 ? _q : []),
|
19653
19716
|
position: index + '',
|
19654
19717
|
contentFormat: 'video',
|
19655
|
-
traceInfo: (
|
19718
|
+
traceInfo: (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.traceInfo
|
19656
19719
|
}
|
19657
19720
|
});
|
19658
19721
|
}
|
@@ -19838,7 +19901,7 @@ Made in Italy` })));
|
|
19838
19901
|
const CTA = (rec, index) => {
|
19839
19902
|
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA)) {
|
19840
19903
|
return (React.createElement("div", { className: 'clc-sxp-bottom-card' },
|
19841
|
-
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$2
|
19904
|
+
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$2 })));
|
19842
19905
|
}
|
19843
19906
|
return null;
|
19844
19907
|
};
|
@@ -19851,10 +19914,8 @@ Made in Italy` })));
|
|
19851
19914
|
React.createElement(Nudge, { nudge: nudge }),
|
19852
19915
|
CTA(rec, index),
|
19853
19916
|
React.createElement("div", null,
|
19854
|
-
React.createElement(ExpandableText$1, { className: 'clc-sxp-bottom-text', isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_c = (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : '', style: Object.assign(Object.assign({}, descStyle), { textShadow: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isOpenTextShadow) ? '2px 2px 4px rgba(0, 0, 0, 0.5)' : 'none' }) }),
|
19855
|
-
|
19856
|
-
React.createElement(Hashtag$1, { index: index, tags: (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.hashTags) !== null && _e !== void 0 ? _e : [], itemId: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.itemId, itemType: ((_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.itemId) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle })),
|
19857
|
-
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$2, includesCtaType: ['AniLinkPopup'], isActive: true })));
|
19917
|
+
React.createElement(ExpandableText$1, { className: 'clc-sxp-bottom-text', isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_c = (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : '', style: Object.assign(Object.assign({}, descStyle), { textShadow: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isOpenTextShadow) ? '2px 2px 4px rgba(0, 0, 0, 0.5)' : 'none' }) })),
|
19918
|
+
React.createElement(Hashtag$1, { index: index, tags: (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.hashTags) !== null && _e !== void 0 ? _e : [], itemId: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.itemId, itemType: ((_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.itemId) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle }))));
|
19858
19919
|
}
|
19859
19920
|
return null;
|
19860
19921
|
};
|
@@ -20244,10 +20305,21 @@ Made in Italy` })));
|
|
20244
20305
|
return null;
|
20245
20306
|
}, [globalConfig]);
|
20246
20307
|
const renderBottom = (rec, index) => {
|
20247
|
-
var _a, _b, _c, _d;
|
20308
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
20248
20309
|
if (rec === null || rec === void 0 ? void 0 : rec.video) {
|
20310
|
+
let cta = null;
|
20311
|
+
if ((_b = (_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b.length) {
|
20312
|
+
cta = '多商品CTA';
|
20313
|
+
}
|
20314
|
+
else if ((_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProduct) {
|
20315
|
+
cta = '商品CTA';
|
20316
|
+
}
|
20317
|
+
else {
|
20318
|
+
cta = (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.bindCta) === null || _e === void 0 ? void 0 : _e.itemId;
|
20319
|
+
}
|
20320
|
+
const value = tempMap === null || tempMap === void 0 ? void 0 : tempMap[cta];
|
20249
20321
|
return (React.createElement(React.Fragment, null,
|
20250
|
-
((
|
20322
|
+
((_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.title) && (React.createElement("div", { style: {
|
20251
20323
|
background: 'repeating-linear-gradient(0deg, rgba(26, 26, 25, 0.7), hsla(0, 0%, 100%, 0))',
|
20252
20324
|
height: '130px',
|
20253
20325
|
position: 'absolute',
|
@@ -20258,7 +20330,7 @@ Made in Italy` })));
|
|
20258
20330
|
pointerEvents
|
20259
20331
|
} })),
|
20260
20332
|
React.createElement("div", { style: {
|
20261
|
-
marginBottom: `${(
|
20333
|
+
marginBottom: `${(_g = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.bottomInfoDist) !== null && _g !== void 0 ? _g : 40}px`,
|
20262
20334
|
zIndex: 999,
|
20263
20335
|
position: 'absolute',
|
20264
20336
|
bottom: 0,
|
@@ -20267,15 +20339,15 @@ Made in Italy` })));
|
|
20267
20339
|
paddingTop: '20px'
|
20268
20340
|
} },
|
20269
20341
|
(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) ? (React.createElement("div", { style: {} },
|
20270
|
-
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$1, isActive: index === activeIndex }))) : null,
|
20342
|
+
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$1, isActive: index === activeIndex, value: value }))) : null,
|
20271
20343
|
React.createElement("div", null,
|
20272
20344
|
React.createElement(ExpandableText$1
|
20273
20345
|
// className='clc-sxp-bottom-text'
|
20274
20346
|
, {
|
20275
20347
|
// className='clc-sxp-bottom-text'
|
20276
|
-
isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (
|
20277
|
-
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$1, includesCtaType: ['AniLink'], isActive: index === activeIndex }))),
|
20278
|
-
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$1, includesCtaType: ['AniLinkPopup'], isActive: index === activeIndex })));
|
20348
|
+
isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_j = (_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.title) !== null && _j !== void 0 ? _j : '', style: Object.assign(Object.assign({}, descStyle), { textShadow: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isOpenTextShadow) ? '2px 2px 4px rgba(0, 0, 0, 0.5)' : 'none', padding: '0 20px', fontSize: '12px' }) }),
|
20349
|
+
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$1, includesCtaType: ['AniLink'], isActive: index === activeIndex, value: value }))),
|
20350
|
+
React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$1, includesCtaType: ['AniLinkPopup'], isActive: index === activeIndex, value: value })));
|
20279
20351
|
}
|
20280
20352
|
return null;
|
20281
20353
|
};
|