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