pb-sxp-ui 1.3.8 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +111 -111
- package/dist/index.cjs +166 -56
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +166 -56
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +3 -3
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +3 -3
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +166 -56
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +3 -3
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/components/SxpPageRender/PictureGroup/index.js +11 -1
- package/es/core/components/SxpPageRender/index.d.ts +2 -0
- package/es/core/components/SxpPageRender/index.js +9 -4
- package/es/core/context/SxpDataSourceProvider.d.ts +2 -1
- package/es/core/context/SxpDataSourceProvider.js +22 -15
- package/es/core/hooks/useEventReport.js +9 -16
- package/es/materials/sxp/popup/AppointForm/Form.js +1 -1
- package/es/materials/sxp/popup/AppointForm/index.js +31 -8
- package/es/materials/sxp/popup/CommodityDetail/index.d.ts +3 -0
- package/es/materials/sxp/popup/CommodityDetail/index.js +19 -5
- package/es/materials/sxp/popup/CommodityDetail/settingRender.d.ts +13 -0
- package/es/materials/sxp/popup/CommodityDetail/settingRender.js +21 -0
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +3 -0
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +16 -2
- package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +13 -0
- package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +21 -0
- package/lib/core/components/SxpPageRender/PictureGroup/index.js +11 -1
- package/lib/core/components/SxpPageRender/index.d.ts +2 -0
- package/lib/core/components/SxpPageRender/index.js +9 -4
- package/lib/core/context/SxpDataSourceProvider.d.ts +2 -1
- package/lib/core/context/SxpDataSourceProvider.js +22 -15
- package/lib/core/hooks/useEventReport.js +9 -16
- package/lib/materials/sxp/popup/AppointForm/Form.js +1 -1
- package/lib/materials/sxp/popup/AppointForm/index.js +30 -7
- package/lib/materials/sxp/popup/CommodityDetail/index.d.ts +3 -0
- package/lib/materials/sxp/popup/CommodityDetail/index.js +19 -5
- package/lib/materials/sxp/popup/CommodityDetail/settingRender.d.ts +13 -0
- package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +21 -0
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +3 -0
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +16 -2
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +13 -0
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +21 -0
- package/package.json +111 -111
package/dist/index.js
CHANGED
@@ -635,6 +635,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
635
635
|
const [selectTag, setSelectTag] = useState(DEFAULT_TAG);
|
636
636
|
const checkCommodityIndexRef = useRef(-1);
|
637
637
|
const popupCurTimeRef = useRef(null);
|
638
|
+
const [isNoMoreData, setIsNoMoreData] = useState(false);
|
638
639
|
const isShowConsent = useMemo(() => {
|
639
640
|
var _a, _b, _c, _d;
|
640
641
|
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;
|
@@ -696,7 +697,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
696
697
|
}, [bffDataSource]);
|
697
698
|
// 获取推荐视频数据
|
698
699
|
const getRecommendVideos = useCallback((query) => __awaiter(void 0, void 0, void 0, function* () {
|
699
|
-
var _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
700
|
+
var _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
700
701
|
query = Object.assign(Object.assign(Object.assign({ maxSize: (_d = query === null || query === void 0 ? void 0 : query.maxSize) !== null && _d !== void 0 ? _d : maxSize, defaultSize: (_e = query === null || query === void 0 ? void 0 : query.defaultSize) !== null && _e !== void 0 ? _e : 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 }, ((query === null || query === void 0 ? void 0 : query.contentFilter) && { contentFilter: `[${query === null || query === void 0 ? void 0 : query.contentFilter}]` })), ((query === null || query === void 0 ? void 0 : query.productFilter) && { productFilter: `[${query === null || query === void 0 ? void 0 : query.productFilter}]` })), { pageNum: query === null || query === void 0 ? void 0 : query.pageNum });
|
701
702
|
if (utmVal) {
|
702
703
|
const val = (_h = (_g = (_f = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _f === void 0 ? void 0 : _f.filter((val) => {
|
@@ -706,9 +707,6 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
706
707
|
})) === null || _g === void 0 ? void 0 : _g.join('&')) !== null && _h !== void 0 ? _h : '';
|
707
708
|
query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(val) });
|
708
709
|
}
|
709
|
-
if (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) {
|
710
|
-
query = Object.assign(Object.assign({}, query), { directPage: true, level: 1, pageNum: (_j = query === null || query === void 0 ? void 0 : query.pageNum) !== null && _j !== void 0 ? _j : 1 });
|
711
|
-
}
|
712
710
|
if (isEditor) {
|
713
711
|
let pageNum = 1;
|
714
712
|
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] }));
|
@@ -719,15 +717,15 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
719
717
|
let list = [];
|
720
718
|
let result = null;
|
721
719
|
const recurveRecList = (query) => __awaiter(void 0, void 0, void 0, function* () {
|
722
|
-
var
|
720
|
+
var _t, _u, _v, _w, _x, _y;
|
723
721
|
query.pageNum = pageNum;
|
724
722
|
result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/list', { method: 'GET', query }));
|
725
723
|
if (!(result === null || result === void 0 ? void 0 : result.success)) {
|
726
724
|
return undefined;
|
727
725
|
}
|
728
726
|
setLoading(false);
|
729
|
-
const isNotNullList = (_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.every((item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video));
|
730
727
|
list = list.concat((_w = (_v = (_u = (_t = result === null || result === void 0 ? void 0 : result.data) === null || _t === void 0 ? void 0 : _t.recList) === null || _u === void 0 ? void 0 : _u.filter) === null || _v === void 0 ? void 0 : _v.call(_u, (item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video))) !== null && _w !== void 0 ? _w : []);
|
728
|
+
const isNotNullList = (_y = (_x = result === null || result === void 0 ? void 0 : result.data) === null || _x === void 0 ? void 0 : _x.recList) === null || _y === void 0 ? void 0 : _y.some((item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video));
|
731
729
|
if (isNotNullList) {
|
732
730
|
pageNum = pageNum + 1;
|
733
731
|
yield recurveRecList(query);
|
@@ -735,9 +733,12 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
735
733
|
});
|
736
734
|
yield recurveRecList(query);
|
737
735
|
if (!(query === null || query === void 0 ? void 0 : query.hashTag) && result)
|
738
|
-
setCurReqInfo({ rtc: (
|
736
|
+
setCurReqInfo({ rtc: (_j = result === null || result === void 0 ? void 0 : result.data) === null || _j === void 0 ? void 0 : _j.rtc, requestId: (_k = result === null || result === void 0 ? void 0 : result.data) === null || _k === void 0 ? void 0 : _k.requestId });
|
739
737
|
return Object.assign(Object.assign({}, result.data), { recList: list });
|
740
738
|
}
|
739
|
+
if (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) {
|
740
|
+
query = Object.assign(Object.assign({}, query), { directPage: true, level: 1, pageNum: (_l = query === null || query === void 0 ? void 0 : query.pageNum) !== null && _l !== void 0 ? _l : 1 });
|
741
|
+
}
|
741
742
|
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/list', { method: 'GET', query }));
|
742
743
|
if (!(result === null || result === void 0 ? void 0 : result.success)) {
|
743
744
|
return undefined;
|
@@ -747,19 +748,24 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
747
748
|
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) && !isEditor) {
|
748
749
|
let list = [];
|
749
750
|
list = list.concat((_q = (_p = (_o = (_m = result === null || result === void 0 ? void 0 : result.data) === null || _m === void 0 ? void 0 : _m.recList) === null || _o === void 0 ? void 0 : _o.filter) === null || _p === void 0 ? void 0 : _p.call(_o, (item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video))) !== null && _q !== void 0 ? _q : []);
|
751
|
+
const isNotNullList = (_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.some((item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video));
|
752
|
+
if (!isNotNullList) {
|
753
|
+
setIsNoMoreData(true);
|
754
|
+
}
|
750
755
|
return Object.assign(Object.assign({}, result.data), { recList: list });
|
751
756
|
}
|
752
757
|
return result === null || result === void 0 ? void 0 : result.data;
|
753
758
|
}), [bffFetch, utmVal, maxSize, defaultSize, channelQueryList]);
|
754
759
|
const loadVideos = useCallback((pageNum) => __awaiter(void 0, void 0, void 0, function* () {
|
755
|
-
var
|
760
|
+
var _z, _0, _1, _2;
|
756
761
|
if (rtcList.length <= 0) {
|
757
762
|
return;
|
758
763
|
}
|
759
764
|
const lastItem = rtcList === null || rtcList === void 0 ? void 0 : rtcList[(rtcList === null || rtcList === void 0 ? void 0 : rtcList.length) - 1];
|
760
|
-
const data = yield getRecommendVideos(Object.assign(Object.assign(Object.assign(Object.assign({ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag }, (((
|
765
|
+
const data = yield getRecommendVideos(Object.assign(Object.assign(Object.assign(Object.assign({ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag }, (((_z = lastItem === null || lastItem === void 0 ? void 0 : lastItem.product) === null || _z === void 0 ? void 0 : _z.itemId) && { productFilter: (_0 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.product) === null || _0 === void 0 ? void 0 : _0.itemId })), (((_1 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.video) === null || _1 === void 0 ? void 0 : _1.itemId) && { contentFilter: (_2 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.video) === null || _2 === void 0 ? void 0 : _2.itemId })), { themeTag: themeTag.current }), ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) && !isEditor && { pageNum })));
|
761
766
|
setRtcList(rtcList.concat(getFilterRecList(data)));
|
762
767
|
setCacheRtcList(cacheRtcList.concat(getFilterRecList(data)));
|
768
|
+
return data;
|
763
769
|
}), [getRecommendVideos, rtcList, waterFallData, cacheRtcList]);
|
764
770
|
const bffEventReport = useCallback(({ userInfo, eventInfo }) => {
|
765
771
|
// 关闭 BFF 事件上报
|
@@ -804,7 +810,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
804
810
|
eventName,
|
805
811
|
actionSource,
|
806
812
|
eventSourceUrl,
|
807
|
-
userData: Object.assign(Object.assign(Object.assign({ externalId: fakeUserId }, (fbclid && { fbc: `fb.2.${new Date().getTime()}.${fbclid}` })), (getCookie('_fbp') && { fbp: `fb.2.${new Date().getTime()}.${getCookie('_fbp')}` })), {
|
813
|
+
userData: Object.assign(Object.assign(Object.assign({ externalId: fakeUserId }, (fbclid && { fbc: `fb.2.${new Date().getTime()}.${fbclid}` })), (getCookie('_fbp') && { fbp: `fb.2.${new Date().getTime()}.${getCookie('_fbp')}` })), { clientUserAgent: (_d = (_c = window === null || window === void 0 ? void 0 : window.navigator) === null || _c === void 0 ? void 0 : _c.userAgent) !== null && _d !== void 0 ? _d : '' })
|
808
814
|
},
|
809
815
|
type: 'beacon'
|
810
816
|
});
|
@@ -823,17 +829,17 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
823
829
|
}), [bffFetch]);
|
824
830
|
// 获取 Tag
|
825
831
|
const bffGetTagList = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
|
826
|
-
var
|
832
|
+
var _3, _4, _5, _6, _7;
|
827
833
|
if (!utmVal || !isShowTag)
|
828
834
|
return;
|
829
835
|
try {
|
830
|
-
const val = (
|
836
|
+
const val = (_5 = (_4 = (_3 = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _3 === void 0 ? void 0 : _3.filter((val) => {
|
831
837
|
var _a, _b;
|
832
838
|
const key = val.split('=')[0];
|
833
839
|
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);
|
834
|
-
})) === null ||
|
840
|
+
})) === null || _4 === void 0 ? void 0 : _4.join('&')) !== null && _5 !== void 0 ? _5 : '';
|
835
841
|
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/tag/list', { method: 'GET', query: { channel: decodeURIComponent(val) } }));
|
836
|
-
setTagList((
|
842
|
+
setTagList((_7 = (_6 = result === null || result === void 0 ? void 0 : result.data) === null || _6 === void 0 ? void 0 : _6.tags) !== null && _7 !== void 0 ? _7 : []);
|
837
843
|
}
|
838
844
|
catch (e) {
|
839
845
|
console.log('e', e);
|
@@ -980,7 +986,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
980
986
|
globalConfig,
|
981
987
|
popupCurTimeRef,
|
982
988
|
checkCommodityIndexRef,
|
983
|
-
isEditor
|
989
|
+
isEditor,
|
990
|
+
isNoMoreData
|
984
991
|
} }, isShowConsent ? (React.createElement(Consent$3, Object.assign({}, (_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))) : (render({
|
985
992
|
rtcList,
|
986
993
|
mutateLike: bffMutateLike,
|
@@ -1423,14 +1430,14 @@ var settingRender$a = [
|
|
1423
1430
|
* @Author: binruan@chatlabs.com
|
1424
1431
|
* @Date: 2024-03-12 10:59:06
|
1425
1432
|
* @LastEditors: binruan@chatlabs.com
|
1426
|
-
* @LastEditTime: 2024-08-
|
1433
|
+
* @LastEditTime: 2024-08-28 17:51:37
|
1427
1434
|
* @FilePath: \pb-sxp-ui\src\core\hooks\useEventReport.ts
|
1428
1435
|
*
|
1429
1436
|
*/
|
1430
1437
|
function useEventReport() {
|
1431
1438
|
const { bffEventReport, popupDetailData, waterFallData, isFromHashtag } = useSxpDataSource();
|
1432
1439
|
const jumpToWeb = useCallback((data, product, cta, position, traceInfo) => {
|
1433
|
-
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;
|
1440
|
+
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;
|
1434
1441
|
let fromKName = '';
|
1435
1442
|
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))) {
|
1436
1443
|
fromKName = 'pdpPage';
|
@@ -1448,22 +1455,15 @@ function useEventReport() {
|
|
1448
1455
|
fromKName = 'productPage';
|
1449
1456
|
}
|
1450
1457
|
const contentTags = (_p = (_m = (_h = product === null || product === void 0 ? void 0 : product.tags) !== 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.tags) !== null && _m !== void 0 ? _m : (_o = data === null || data === void 0 ? void 0 : data.video) === null || _o === void 0 ? void 0 : _o.tags) !== null && _p !== void 0 ? _p : (_q = data === null || data === void 0 ? void 0 : data.product) === null || _q === void 0 ? void 0 : _q.tags;
|
1458
|
+
let contentFormat = null;
|
1459
|
+
if ((_r = data === null || data === void 0 ? void 0 : data.video) === null || _r === void 0 ? void 0 : _r.url) {
|
1460
|
+
contentFormat = 'video';
|
1461
|
+
}
|
1462
|
+
else if (((_s = data === null || data === void 0 ? void 0 : data.video) === null || _s === void 0 ? void 0 : _s.imgUrls) && ((_u = (_t = data === null || data === void 0 ? void 0 : data.video) === null || _t === void 0 ? void 0 : _t.imgUrls) === null || _u === void 0 ? void 0 : _u.length)) {
|
1463
|
+
contentFormat = 'image';
|
1464
|
+
}
|
1451
1465
|
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
1452
|
-
eventInfo: {
|
1453
|
-
eventSubject: 'jumpToWeb',
|
1454
|
-
eventDescription: 'User jumped to website',
|
1455
|
-
productId: (_r = product === null || product === void 0 ? void 0 : product.itemId) !== null && _r !== void 0 ? _r : '',
|
1456
|
-
productName: (_s = product === null || product === void 0 ? void 0 : product.title) !== null && _s !== void 0 ? _s : '',
|
1457
|
-
price: (product === null || product === void 0 ? void 0 : product.price) ? (product === null || product === void 0 ? void 0 : product.price) + '' : '0',
|
1458
|
-
productCollection: (_t = product === null || product === void 0 ? void 0 : product.collection) !== null && _t !== void 0 ? _t : '',
|
1459
|
-
fromKName,
|
1460
|
-
fromKPage: location === null || location === void 0 ? void 0 : location.href,
|
1461
|
-
contentTags: contentTags ? JSON.stringify(contentTags) : '',
|
1462
|
-
position: position + '',
|
1463
|
-
contentId: (_v = (_u = data === null || data === void 0 ? void 0 : data.video) === null || _u === void 0 ? void 0 : _u.itemId) !== null && _v !== void 0 ? _v : '',
|
1464
|
-
ctatId: (_w = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _w !== void 0 ? _w : '',
|
1465
|
-
traceInfo: (_9 = (_6 = (_4 = (_0 = (_x = traceInfo !== null && traceInfo !== void 0 ? traceInfo : product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _x !== void 0 ? _x : (_z = (_y = data === null || data === void 0 ? void 0 : data.video) === null || _y === void 0 ? void 0 : _y.bindProduct) === null || _z === void 0 ? void 0 : _z.traceInfo) !== null && _0 !== void 0 ? _0 : (_3 = (_2 = (_1 = data === null || data === void 0 ? void 0 : data.video) === null || _1 === void 0 ? void 0 : _1.bindProducts) === null || _2 === void 0 ? void 0 : _2[0]) === null || _3 === void 0 ? void 0 : _3.traceInfo) !== null && _4 !== void 0 ? _4 : (_5 = data === null || data === void 0 ? void 0 : data.product) === null || _5 === void 0 ? void 0 : _5.traceInfo) !== null && _6 !== void 0 ? _6 : (_8 = (_7 = data === null || data === void 0 ? void 0 : data.video) === null || _7 === void 0 ? void 0 : _7.bindCta) === null || _8 === void 0 ? void 0 : _8.traceInfo) !== null && _9 !== void 0 ? _9 : ''
|
1466
|
-
}
|
1466
|
+
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 }))
|
1467
1467
|
});
|
1468
1468
|
}, [bffEventReport, popupDetailData, isFromHashtag]);
|
1469
1469
|
const productView = useCallback((data, product, cta, viewTime, position) => {
|
@@ -1518,22 +1518,25 @@ function useEventReport() {
|
|
1518
1518
|
* @Author: binruan@chatlabs.com
|
1519
1519
|
* @Date: 2024-06-27 16:22:34
|
1520
1520
|
* @LastEditors: binruan@chatlabs.com
|
1521
|
-
* @LastEditTime: 2024-
|
1521
|
+
* @LastEditTime: 2024-08-27 16:59:46
|
1522
1522
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\popup\AppointForm\Form.tsx
|
1523
1523
|
*
|
1524
1524
|
*/
|
1525
1525
|
const Form = ({ layout, columns, onChange }) => {
|
1526
1526
|
return (React.createElement(React.Fragment, null, columns === null || columns === void 0 ? void 0 : columns.map((item, index) => (React.createElement("div", { key: index, className: 'pb-appoint-form-container-item', style: { flexDirection: layout === 'horizontal' ? 'row' : 'column' } },
|
1527
1527
|
layout !== 'inline' && React.createElement("label", { className: 'pb-appoint-form-container-label' }, item === null || item === void 0 ? void 0 : item.title),
|
1528
|
-
(item === null || item === void 0 ? void 0 : item.valueType) === 'text' && (React.createElement("input", Object.assign({ className: 'pb-appoint-form-container-input', type: 'text', placeholder: layout === 'inline' ? item === null || item === void 0 ? void 0 : item.title : '请输入', name: item === null || item === void 0 ? void 0 : item.dataIndex }, (onChange && { onChange
|
1528
|
+
(item === null || item === void 0 ? void 0 : item.valueType) === 'text' && (React.createElement("input", Object.assign({ className: 'pb-appoint-form-container-input', type: 'text', placeholder: layout === 'inline' ? item === null || item === void 0 ? void 0 : item.title : '请输入', name: item === null || item === void 0 ? void 0 : item.dataIndex }, (onChange && { onChange })))))))));
|
1529
1529
|
};
|
1530
1530
|
var Form$1 = memo(Form);
|
1531
1531
|
|
1532
1532
|
const AppointForm$1 = (_a) => {
|
1533
|
+
var _b, _c;
|
1533
1534
|
var { columns, style, title, textStyle, submitBgColor, submitColor, submitText, layoutType = 'inline', isExternalLink, isPopup, onClick, onClose, submitButtonStyle } = _a, props = __rest(_a, ["columns", "style", "title", "textStyle", "submitBgColor", "submitColor", "submitText", "layoutType", "isExternalLink", "isPopup", "onClick", "onClose", "submitButtonStyle"]);
|
1534
1535
|
const { submitForm, popupDetailData } = useSxpDataSource();
|
1535
1536
|
const { jumpToWeb } = useEventReport();
|
1536
1537
|
const [loading, setLoading] = useState(false);
|
1538
|
+
const [formData, setFormData] = useState({});
|
1539
|
+
const [marginTop, setMarginTop] = useState(0);
|
1537
1540
|
const defaultColumns = useMemo(() => [
|
1538
1541
|
{
|
1539
1542
|
title: '',
|
@@ -1560,7 +1563,7 @@ const AppointForm$1 = (_a) => {
|
|
1560
1563
|
key: '4'
|
1561
1564
|
}
|
1562
1565
|
], []);
|
1563
|
-
const
|
1566
|
+
const originalHeight = ((_b = document === null || document === void 0 ? void 0 : document.documentElement) === null || _b === void 0 ? void 0 : _b.clientHeight) || ((_c = document === null || document === void 0 ? void 0 : document.body) === null || _c === void 0 ? void 0 : _c.clientHeight);
|
1564
1567
|
const columnsData = useMemo(() => {
|
1565
1568
|
return cloneDeep(columns) || defaultColumns;
|
1566
1569
|
}, [columns, defaultColumns]);
|
@@ -1569,17 +1572,17 @@ const AppointForm$1 = (_a) => {
|
|
1569
1572
|
setFormData(Object.assign(Object.assign({}, formData), { [name]: value }));
|
1570
1573
|
}, [formData]);
|
1571
1574
|
const handleSubmit = debounce(() => __awaiter(void 0, void 0, void 0, function* () {
|
1572
|
-
var
|
1575
|
+
var _d, _e, _f, _g, _h;
|
1573
1576
|
const vals = formData;
|
1574
1577
|
if (!vals)
|
1575
1578
|
return;
|
1576
|
-
const arr = (
|
1579
|
+
const arr = (_e = (_d = Object.keys(vals)) === null || _d === void 0 ? void 0 : _d.map((key) => {
|
1577
1580
|
var _a;
|
1578
1581
|
return ({
|
1579
1582
|
name: key,
|
1580
1583
|
value: (_a = vals[key]) !== null && _a !== void 0 ? _a : ''
|
1581
1584
|
});
|
1582
|
-
})) === null ||
|
1585
|
+
})) === null || _e === void 0 ? void 0 : _e.filter((item) => item === null || item === void 0 ? void 0 : item.value);
|
1583
1586
|
if (!arr || !(arr === null || arr === void 0 ? void 0 : arr.length))
|
1584
1587
|
return;
|
1585
1588
|
setLoading(true);
|
@@ -1588,8 +1591,8 @@ const AppointForm$1 = (_a) => {
|
|
1588
1591
|
if (res) {
|
1589
1592
|
if (isExternalLink) {
|
1590
1593
|
const data = popupDetailData;
|
1591
|
-
const product = (
|
1592
|
-
const cta = (
|
1594
|
+
const product = (_f = data === null || data === void 0 ? void 0 : data.video) === null || _f === void 0 ? void 0 : _f.bindProduct;
|
1595
|
+
const cta = (_h = (_g = data === null || data === void 0 ? void 0 : data.video) === null || _g === void 0 ? void 0 : _g.bindProduct) === null || _h === void 0 ? void 0 : _h.bindCta;
|
1593
1596
|
const position = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
|
1594
1597
|
jumpToWeb(data, product, cta, position);
|
1595
1598
|
}
|
@@ -1599,11 +1602,33 @@ const AppointForm$1 = (_a) => {
|
|
1599
1602
|
onClick === null || onClick === void 0 ? void 0 : onClick();
|
1600
1603
|
}
|
1601
1604
|
}), 1000);
|
1605
|
+
useEffect(() => {
|
1606
|
+
const handleScroll = () => {
|
1607
|
+
var _a, _b;
|
1608
|
+
// 获取用户代理字符串
|
1609
|
+
const userAgent = navigator.userAgent;
|
1610
|
+
// 判断是否是安卓设备
|
1611
|
+
const isAndroid = userAgent.toLowerCase().includes('android');
|
1612
|
+
if (!isAndroid)
|
1613
|
+
return;
|
1614
|
+
const resizeHeight = ((_a = document === null || document === void 0 ? void 0 : document.documentElement) === null || _a === void 0 ? void 0 : _a.clientHeight) || ((_b = document === null || document === void 0 ? void 0 : document.body) === null || _b === void 0 ? void 0 : _b.clientHeight);
|
1615
|
+
if (resizeHeight < originalHeight) {
|
1616
|
+
setMarginTop(50);
|
1617
|
+
}
|
1618
|
+
else {
|
1619
|
+
setMarginTop(0);
|
1620
|
+
}
|
1621
|
+
};
|
1622
|
+
window.addEventListener('resize', handleScroll);
|
1623
|
+
return () => {
|
1624
|
+
window.removeEventListener('resize', handleScroll);
|
1625
|
+
};
|
1626
|
+
}, []);
|
1602
1627
|
return (React.createElement("div", { className: 'pb-appoint-form' },
|
1603
1628
|
React.createElement("div", { className: `pb-appoint-form-title ${css(Object.assign({}, textStyle))}`, dangerouslySetInnerHTML: {
|
1604
1629
|
__html: setFontForText(title, textStyle)
|
1605
1630
|
} }),
|
1606
|
-
React.createElement("div", Object.assign({ className: css(Object.assign({}, style)) }, props),
|
1631
|
+
React.createElement("div", Object.assign({ className: css(Object.assign(Object.assign({}, style), { marginTop })) }, props),
|
1607
1632
|
React.createElement("div", { className: 'pb-appoint-form-container' },
|
1608
1633
|
React.createElement(Form$1, { columns: columnsData, layout: layoutType, onChange: handleChange }))),
|
1609
1634
|
React.createElement("div", { className: 'pb-appoint-form-btn-wrapper' },
|
@@ -1985,6 +2010,27 @@ var settingRender$9 = [
|
|
1985
2010
|
name: ['props', 'iframeBgColor']
|
1986
2011
|
}
|
1987
2012
|
]
|
2013
|
+
},
|
2014
|
+
{
|
2015
|
+
title: '轮播指示器',
|
2016
|
+
child: [
|
2017
|
+
{
|
2018
|
+
label: '背景色',
|
2019
|
+
name: ['props', 'swiper', 'dotsBgColor'],
|
2020
|
+
type: 'Color'
|
2021
|
+
},
|
2022
|
+
{
|
2023
|
+
label: '选中色',
|
2024
|
+
name: ['props', 'swiper', 'dotsActiveColor'],
|
2025
|
+
type: 'Color'
|
2026
|
+
},
|
2027
|
+
{
|
2028
|
+
label: '底边距',
|
2029
|
+
name: ['props', 'swiper', 'dotsMarginBottom'],
|
2030
|
+
type: 'Number',
|
2031
|
+
addonAfter: 'px'
|
2032
|
+
}
|
2033
|
+
]
|
1988
2034
|
}
|
1989
2035
|
];
|
1990
2036
|
|
@@ -9192,10 +9238,10 @@ const CommodityDetail$1 = (_a) => {
|
|
9192
9238
|
__html: setFontForText((_c = product === null || product === void 0 ? void 0 : product.taxInfo) !== null && _c !== void 0 ? _c : '税费', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.taxInfo)
|
9193
9239
|
} }),
|
9194
9240
|
React.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
|
9195
|
-
React.createElement(ExpandableText$1, { foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, onClick: () => setShowModal(true), isPost: isPost, text: (_d = product === null || product === void 0 ? void 0 : product.info) !== null && _d !== void 0 ? _d : `The design inspiration of Tiffany Lock series comes from the power of connection and inclusiveness, and the
|
9196
|
-
bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
|
9197
|
-
collection is unisex and is inspired by the padlock pattern found in the Tiffany Antique Collection. This
|
9198
|
-
necklace features a stylish and eye-catching oval clasp chain decorated with a lock pattern. Crafted from
|
9241
|
+
React.createElement(ExpandableText$1, { foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, onClick: () => setShowModal(true), isPost: isPost, text: (_d = product === null || product === void 0 ? void 0 : product.info) !== null && _d !== void 0 ? _d : `The design inspiration of Tiffany Lock series comes from the power of connection and inclusiveness, and the
|
9242
|
+
bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
|
9243
|
+
collection is unisex and is inspired by the padlock pattern found in the Tiffany Antique Collection. This
|
9244
|
+
necklace features a stylish and eye-catching oval clasp chain decorated with a lock pattern. Crafted from
|
9199
9245
|
18-karat gold, this necklace is embellished with hand-set diamonds.`, maxStr: 79, className: 'pb-commondity-content-info', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.info }))));
|
9200
9246
|
};
|
9201
9247
|
const renderBtn = () => {
|
@@ -9244,7 +9290,21 @@ const CommodityDetail$1 = (_a) => {
|
|
9244
9290
|
clickableClass: getDotsAlign
|
9245
9291
|
}, loop: true, autoplay: {
|
9246
9292
|
delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
|
9247
|
-
}, ref: ref },
|
9293
|
+
}, ref: ref, className: css(Object.assign(Object.assign(Object.assign({}, ((swiper === null || swiper === void 0 ? void 0 : swiper.dotsMarginBottom) && {
|
9294
|
+
'.swiper-pagination': {
|
9295
|
+
bottom: swiper === null || swiper === void 0 ? void 0 : swiper.dotsMarginBottom
|
9296
|
+
}
|
9297
|
+
})), ((swiper === null || swiper === void 0 ? void 0 : swiper.dotsBgColor) && {
|
9298
|
+
'.swiper-pagination-bullet': {
|
9299
|
+
backgroundColor: swiper === null || swiper === void 0 ? void 0 : swiper.dotsBgColor,
|
9300
|
+
opacity: 1
|
9301
|
+
}
|
9302
|
+
})), ((swiper === null || swiper === void 0 ? void 0 : swiper.dotsActiveColor) && {
|
9303
|
+
'.swipe-item-active-bullet': {
|
9304
|
+
backgroundColor: `${swiper === null || swiper === void 0 ? void 0 : swiper.dotsActiveColor}!important`,
|
9305
|
+
opacity: 1
|
9306
|
+
}
|
9307
|
+
}))) },
|
9248
9308
|
React.createElement(React.Fragment, null, (_x = product === null || product === void 0 ? void 0 : product.homePage) === null || _x === void 0 ? void 0 : _x.map((src) => {
|
9249
9309
|
var _a;
|
9250
9310
|
return (React.createElement(SwiperSlide, { key: src },
|
@@ -9633,7 +9693,7 @@ const Prompt = createMaterial(PromptComponent, {
|
|
9633
9693
|
* @Author: binruan@chatlabs.com
|
9634
9694
|
* @Date: 2024-03-26 16:50:25
|
9635
9695
|
* @LastEditors: binruan@chatlabs.com
|
9636
|
-
* @LastEditTime: 2024-08-
|
9696
|
+
* @LastEditTime: 2024-08-28 19:08:24
|
9637
9697
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetailDiroNew\settingRender.tsx
|
9638
9698
|
*
|
9639
9699
|
*/
|
@@ -9948,6 +10008,27 @@ var settingRender$7 = [
|
|
9948
10008
|
name: ['props', 'iframeBgColor']
|
9949
10009
|
}
|
9950
10010
|
]
|
10011
|
+
},
|
10012
|
+
{
|
10013
|
+
title: '轮播指示器',
|
10014
|
+
child: [
|
10015
|
+
{
|
10016
|
+
label: '背景色',
|
10017
|
+
name: ['props', 'swiper', 'dotsBgColor'],
|
10018
|
+
type: 'Color'
|
10019
|
+
},
|
10020
|
+
{
|
10021
|
+
label: '选中色',
|
10022
|
+
name: ['props', 'swiper', 'dotsActiveColor'],
|
10023
|
+
type: 'Color'
|
10024
|
+
},
|
10025
|
+
{
|
10026
|
+
label: '底边距',
|
10027
|
+
name: ['props', 'swiper', 'dotsMarginBottom'],
|
10028
|
+
type: 'Number',
|
10029
|
+
addonAfter: 'px'
|
10030
|
+
}
|
10031
|
+
]
|
9951
10032
|
}
|
9952
10033
|
];
|
9953
10034
|
|
@@ -10072,7 +10153,7 @@ const CommodityDetailDiroNew$1 = (_a) => {
|
|
10072
10153
|
const productInfoText = ({ isPost }) => {
|
10073
10154
|
return (React.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
|
10074
10155
|
React.createElement(ExpandableText$1, { isPost: isPost, onClick: () => setShowModal(true), className: 'pb-commondityDiroNew-info', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.info, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (product === null || product === void 0 ? void 0 : product.info) ||
|
10075
|
-
`Unveiled at the Spring-Summer 2023 fashion show, the Dior Toujours bag is distinguished by a casual and practical design. Crafted in black calfskin with Macrocannage topstitching, it showcases a spacious interior compartment with a matching pouch to organize essentials. Its leather strap closure keeps items secure while the D of the CD Lock closure twists to adjust the sides and enhance the bag's silhouette. The leather handles can be adjusted using the small notches in order to be able to carry the large bag by hand or wear it over the shoulder. CD Lock and strap closures D.I.O.R. charms Removable interior pouch Adjustable leather handles Dust bag included
|
10156
|
+
`Unveiled at the Spring-Summer 2023 fashion show, the Dior Toujours bag is distinguished by a casual and practical design. Crafted in black calfskin with Macrocannage topstitching, it showcases a spacious interior compartment with a matching pouch to organize essentials. Its leather strap closure keeps items secure while the D of the CD Lock closure twists to adjust the sides and enhance the bag's silhouette. The leather handles can be adjusted using the small notches in order to be able to carry the large bag by hand or wear it over the shoulder. CD Lock and strap closures D.I.O.R. charms Removable interior pouch Adjustable leather handles Dust bag included
|
10076
10157
|
Made in Italy` })));
|
10077
10158
|
};
|
10078
10159
|
const getStyle = useCallback((style) => {
|
@@ -10114,7 +10195,21 @@ Made in Italy` })));
|
|
10114
10195
|
clickableClass: getDotsAlign
|
10115
10196
|
}, loop: true, autoplay: {
|
10116
10197
|
delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
|
10117
|
-
}, ref: ref }, (
|
10198
|
+
}, ref: ref, className: css(Object.assign(Object.assign(Object.assign({}, ((swiper === null || swiper === void 0 ? void 0 : swiper.dotsMarginBottom) && {
|
10199
|
+
'.swiper-pagination': {
|
10200
|
+
bottom: swiper === null || swiper === void 0 ? void 0 : swiper.dotsMarginBottom
|
10201
|
+
}
|
10202
|
+
})), ((swiper === null || swiper === void 0 ? void 0 : swiper.dotsBgColor) && {
|
10203
|
+
'.swiper-pagination-bullet': {
|
10204
|
+
backgroundColor: swiper === null || swiper === void 0 ? void 0 : swiper.dotsBgColor,
|
10205
|
+
opacity: 1
|
10206
|
+
}
|
10207
|
+
})), ((swiper === null || swiper === void 0 ? void 0 : swiper.dotsActiveColor) && {
|
10208
|
+
'.swipe-item-active-bullet': {
|
10209
|
+
backgroundColor: `${swiper === null || swiper === void 0 ? void 0 : swiper.dotsActiveColor}!important`,
|
10210
|
+
opacity: 1
|
10211
|
+
}
|
10212
|
+
}))) }, (_x = product === null || product === void 0 ? void 0 : product.homePage) === null || _x === void 0 ? void 0 : _x.map((src) => {
|
10118
10213
|
var _a;
|
10119
10214
|
return (React.createElement(SwiperSlide, { key: src },
|
10120
10215
|
React.createElement("div", { style: {
|
@@ -15722,7 +15817,7 @@ const Picture = (props) => {
|
|
15722
15817
|
* @Author: lewinlu@chatlabs.com
|
15723
15818
|
* @Date: 2024-01-03 14:39:09
|
15724
15819
|
* @LastEditors: binruan@chatlabs.com
|
15725
|
-
* @LastEditTime: 2024-
|
15820
|
+
* @LastEditTime: 2024-08-29 09:34:13
|
15726
15821
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\PictureGroup\index.tsx
|
15727
15822
|
*/
|
15728
15823
|
const PictureGroup$2 = ({ imgUrls, width, height, rec, index, onReportViewImageEnd, onViewImageStartEvent, imgUrlsPostConfig }) => {
|
@@ -15756,10 +15851,20 @@ const PictureGroup$2 = ({ imgUrls, width, height, rec, index, onReportViewImageE
|
|
15756
15851
|
return (React.createElement(Swiper, { ref: ref, defaultValue: 0, direction: 'horizontal', modules: [Pagination, Autoplay], pagination: {
|
15757
15852
|
clickable: true,
|
15758
15853
|
bulletActiveClass: 'swipe-item-active-bullet'
|
15759
|
-
}, className: css(Object.assign({}, ((imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.marginBottom) && {
|
15854
|
+
}, className: css(Object.assign(Object.assign(Object.assign({}, ((imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.marginBottom) && {
|
15760
15855
|
'.swiper-pagination': {
|
15761
15856
|
bottom: (_a = imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.marginBottom) !== null && _a !== void 0 ? _a : 0
|
15762
15857
|
}
|
15858
|
+
})), ((imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.dotsBgColor) && {
|
15859
|
+
'.swiper-pagination-bullet': {
|
15860
|
+
backgroundColor: imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.dotsBgColor,
|
15861
|
+
opacity: 1
|
15862
|
+
}
|
15863
|
+
})), ((imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.dotsActiveColor) && {
|
15864
|
+
'.swipe-item-active-bullet': {
|
15865
|
+
backgroundColor: `${imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.dotsActiveColor}!important`,
|
15866
|
+
opacity: 1
|
15867
|
+
}
|
15763
15868
|
}))), height: height, loop: true, autoplay: { delay: ((_b = imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.delay) !== null && _b !== void 0 ? _b : 3) * 1000 } }, imgUrls === null || imgUrls === void 0 ? void 0 : imgUrls.map((url, index) => {
|
15764
15869
|
return (React.createElement(SwiperSlide, { key: index },
|
15765
15870
|
React.createElement(Picture, { src: !isLoad && index > 0 ? '' : url, height: height, imgUrlsPostConfig: imgUrlsPostConfig, onShowFirstImage: showFirstImageFn })));
|
@@ -16014,7 +16119,7 @@ var Tagbar$1 = memo(Tagbar);
|
|
16014
16119
|
* @Author: binruan@chatlabs.com
|
16015
16120
|
* @Date: 2024-01-15 19:03:09
|
16016
16121
|
* @LastEditors: binruan@chatlabs.com
|
16017
|
-
* @LastEditTime: 2024-08-
|
16122
|
+
* @LastEditTime: 2024-08-28 19:13:38
|
16018
16123
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
|
16019
16124
|
*
|
16020
16125
|
*/
|
@@ -16031,7 +16136,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
16031
16136
|
const [isShowMore, setIsShowMore] = useState(false);
|
16032
16137
|
const [isReload, setIsReload] = useState(new Date().getTime());
|
16033
16138
|
const skipLinkRef = useRef(false);
|
16034
|
-
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 } = useSxpDataSource();
|
16139
|
+
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 } = useSxpDataSource();
|
16035
16140
|
const { backMainFeed, productView, jumpToWeb } = useEventReport();
|
16036
16141
|
const isShowFingerTip = useMemo(() => {
|
16037
16142
|
return data.length > 0 && !loading && (getFeUserId() || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enableSwiperTip));
|
@@ -16190,8 +16295,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
16190
16295
|
return null;
|
16191
16296
|
}
|
16192
16297
|
});
|
16193
|
-
return !waterFallData ? list.concat([{ loading: true }]) : list;
|
16194
|
-
}, [data, activeIndex, waterFallData, isEditor]);
|
16298
|
+
return !waterFallData && !isNoMoreData ? list.concat([{ loading: true }]) : list;
|
16299
|
+
}, [data, activeIndex, waterFallData, isEditor, isNoMoreData]);
|
16195
16300
|
const renderLogo = useMemo(() => {
|
16196
16301
|
var _a, _b, _c, _d;
|
16197
16302
|
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
|
@@ -16510,9 +16615,14 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
16510
16615
|
return;
|
16511
16616
|
if ((swiper === null || swiper === void 0 ? void 0 : swiper.activeIndex) + 1 >= (data === null || data === void 0 ? void 0 : data.length)) {
|
16512
16617
|
if (!isLoadMore) {
|
16618
|
+
let pageNum = 2;
|
16513
16619
|
setIsLoadMore(true);
|
16514
|
-
loadVideos === null || loadVideos === void 0 ? void 0 : loadVideos(
|
16620
|
+
loadVideos === null || loadVideos === void 0 ? void 0 : loadVideos(pageNum).then((res) => {
|
16621
|
+
var _a;
|
16515
16622
|
setIsLoadMore(false);
|
16623
|
+
if (res && ((_a = res === null || res === void 0 ? void 0 : res.recList) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
16624
|
+
pageNum++;
|
16625
|
+
}
|
16516
16626
|
});
|
16517
16627
|
}
|
16518
16628
|
}
|