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.cjs
CHANGED
@@ -657,6 +657,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
657
657
|
const [selectTag, setSelectTag] = React.useState(DEFAULT_TAG);
|
658
658
|
const checkCommodityIndexRef = React.useRef(-1);
|
659
659
|
const popupCurTimeRef = React.useRef(null);
|
660
|
+
const [isNoMoreData, setIsNoMoreData] = React.useState(false);
|
660
661
|
const isShowConsent = React.useMemo(() => {
|
661
662
|
var _a, _b, _c, _d;
|
662
663
|
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;
|
@@ -718,7 +719,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
718
719
|
}, [bffDataSource]);
|
719
720
|
// 获取推荐视频数据
|
720
721
|
const getRecommendVideos = React.useCallback((query) => __awaiter(void 0, void 0, void 0, function* () {
|
721
|
-
var _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
722
|
+
var _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
722
723
|
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 });
|
723
724
|
if (utmVal) {
|
724
725
|
const val = (_h = (_g = (_f = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _f === void 0 ? void 0 : _f.filter((val) => {
|
@@ -728,9 +729,6 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
728
729
|
})) === null || _g === void 0 ? void 0 : _g.join('&')) !== null && _h !== void 0 ? _h : '';
|
729
730
|
query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(val) });
|
730
731
|
}
|
731
|
-
if (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) {
|
732
|
-
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 });
|
733
|
-
}
|
734
732
|
if (isEditor) {
|
735
733
|
let pageNum = 1;
|
736
734
|
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] }));
|
@@ -741,15 +739,15 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
741
739
|
let list = [];
|
742
740
|
let result = null;
|
743
741
|
const recurveRecList = (query) => __awaiter(void 0, void 0, void 0, function* () {
|
744
|
-
var
|
742
|
+
var _t, _u, _v, _w, _x, _y;
|
745
743
|
query.pageNum = pageNum;
|
746
744
|
result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/list', { method: 'GET', query }));
|
747
745
|
if (!(result === null || result === void 0 ? void 0 : result.success)) {
|
748
746
|
return undefined;
|
749
747
|
}
|
750
748
|
setLoading(false);
|
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.every((item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video));
|
752
749
|
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 : []);
|
750
|
+
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));
|
753
751
|
if (isNotNullList) {
|
754
752
|
pageNum = pageNum + 1;
|
755
753
|
yield recurveRecList(query);
|
@@ -757,9 +755,12 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
757
755
|
});
|
758
756
|
yield recurveRecList(query);
|
759
757
|
if (!(query === null || query === void 0 ? void 0 : query.hashTag) && result)
|
760
|
-
setCurReqInfo({ rtc: (
|
758
|
+
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 });
|
761
759
|
return Object.assign(Object.assign({}, result.data), { recList: list });
|
762
760
|
}
|
761
|
+
if (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) {
|
762
|
+
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 });
|
763
|
+
}
|
763
764
|
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/list', { method: 'GET', query }));
|
764
765
|
if (!(result === null || result === void 0 ? void 0 : result.success)) {
|
765
766
|
return undefined;
|
@@ -769,19 +770,24 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
769
770
|
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) && !isEditor) {
|
770
771
|
let list = [];
|
771
772
|
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 : []);
|
773
|
+
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));
|
774
|
+
if (!isNotNullList) {
|
775
|
+
setIsNoMoreData(true);
|
776
|
+
}
|
772
777
|
return Object.assign(Object.assign({}, result.data), { recList: list });
|
773
778
|
}
|
774
779
|
return result === null || result === void 0 ? void 0 : result.data;
|
775
780
|
}), [bffFetch, utmVal, maxSize, defaultSize, channelQueryList]);
|
776
781
|
const loadVideos = React.useCallback((pageNum) => __awaiter(void 0, void 0, void 0, function* () {
|
777
|
-
var
|
782
|
+
var _z, _0, _1, _2;
|
778
783
|
if (rtcList.length <= 0) {
|
779
784
|
return;
|
780
785
|
}
|
781
786
|
const lastItem = rtcList === null || rtcList === void 0 ? void 0 : rtcList[(rtcList === null || rtcList === void 0 ? void 0 : rtcList.length) - 1];
|
782
|
-
const data = yield getRecommendVideos(Object.assign(Object.assign(Object.assign(Object.assign({ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag }, (((
|
787
|
+
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 })));
|
783
788
|
setRtcList(rtcList.concat(getFilterRecList(data)));
|
784
789
|
setCacheRtcList(cacheRtcList.concat(getFilterRecList(data)));
|
790
|
+
return data;
|
785
791
|
}), [getRecommendVideos, rtcList, waterFallData, cacheRtcList]);
|
786
792
|
const bffEventReport = React.useCallback(({ userInfo, eventInfo }) => {
|
787
793
|
// 关闭 BFF 事件上报
|
@@ -826,7 +832,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
826
832
|
eventName,
|
827
833
|
actionSource,
|
828
834
|
eventSourceUrl,
|
829
|
-
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')}` })), {
|
835
|
+
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 : '' })
|
830
836
|
},
|
831
837
|
type: 'beacon'
|
832
838
|
});
|
@@ -845,17 +851,17 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
845
851
|
}), [bffFetch]);
|
846
852
|
// 获取 Tag
|
847
853
|
const bffGetTagList = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
|
848
|
-
var
|
854
|
+
var _3, _4, _5, _6, _7;
|
849
855
|
if (!utmVal || !isShowTag)
|
850
856
|
return;
|
851
857
|
try {
|
852
|
-
const val = (
|
858
|
+
const val = (_5 = (_4 = (_3 = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _3 === void 0 ? void 0 : _3.filter((val) => {
|
853
859
|
var _a, _b;
|
854
860
|
const key = val.split('=')[0];
|
855
861
|
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);
|
856
|
-
})) === null ||
|
862
|
+
})) === null || _4 === void 0 ? void 0 : _4.join('&')) !== null && _5 !== void 0 ? _5 : '';
|
857
863
|
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/tag/list', { method: 'GET', query: { channel: decodeURIComponent(val) } }));
|
858
|
-
setTagList((
|
864
|
+
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 : []);
|
859
865
|
}
|
860
866
|
catch (e) {
|
861
867
|
console.log('e', e);
|
@@ -1002,7 +1008,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
1002
1008
|
globalConfig,
|
1003
1009
|
popupCurTimeRef,
|
1004
1010
|
checkCommodityIndexRef,
|
1005
|
-
isEditor
|
1011
|
+
isEditor,
|
1012
|
+
isNoMoreData
|
1006
1013
|
} }, 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({
|
1007
1014
|
rtcList,
|
1008
1015
|
mutateLike: bffMutateLike,
|
@@ -1445,14 +1452,14 @@ var settingRender$a = [
|
|
1445
1452
|
* @Author: binruan@chatlabs.com
|
1446
1453
|
* @Date: 2024-03-12 10:59:06
|
1447
1454
|
* @LastEditors: binruan@chatlabs.com
|
1448
|
-
* @LastEditTime: 2024-08-
|
1455
|
+
* @LastEditTime: 2024-08-28 17:51:37
|
1449
1456
|
* @FilePath: \pb-sxp-ui\src\core\hooks\useEventReport.ts
|
1450
1457
|
*
|
1451
1458
|
*/
|
1452
1459
|
function useEventReport() {
|
1453
1460
|
const { bffEventReport, popupDetailData, waterFallData, isFromHashtag } = useSxpDataSource();
|
1454
1461
|
const jumpToWeb = React.useCallback((data, product, cta, position, traceInfo) => {
|
1455
|
-
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;
|
1462
|
+
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;
|
1456
1463
|
let fromKName = '';
|
1457
1464
|
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))) {
|
1458
1465
|
fromKName = 'pdpPage';
|
@@ -1470,22 +1477,15 @@ function useEventReport() {
|
|
1470
1477
|
fromKName = 'productPage';
|
1471
1478
|
}
|
1472
1479
|
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;
|
1480
|
+
let contentFormat = null;
|
1481
|
+
if ((_r = data === null || data === void 0 ? void 0 : data.video) === null || _r === void 0 ? void 0 : _r.url) {
|
1482
|
+
contentFormat = 'video';
|
1483
|
+
}
|
1484
|
+
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)) {
|
1485
|
+
contentFormat = 'image';
|
1486
|
+
}
|
1473
1487
|
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
1474
|
-
eventInfo: {
|
1475
|
-
eventSubject: 'jumpToWeb',
|
1476
|
-
eventDescription: 'User jumped to website',
|
1477
|
-
productId: (_r = product === null || product === void 0 ? void 0 : product.itemId) !== null && _r !== void 0 ? _r : '',
|
1478
|
-
productName: (_s = product === null || product === void 0 ? void 0 : product.title) !== null && _s !== void 0 ? _s : '',
|
1479
|
-
price: (product === null || product === void 0 ? void 0 : product.price) ? (product === null || product === void 0 ? void 0 : product.price) + '' : '0',
|
1480
|
-
productCollection: (_t = product === null || product === void 0 ? void 0 : product.collection) !== null && _t !== void 0 ? _t : '',
|
1481
|
-
fromKName,
|
1482
|
-
fromKPage: location === null || location === void 0 ? void 0 : location.href,
|
1483
|
-
contentTags: contentTags ? JSON.stringify(contentTags) : '',
|
1484
|
-
position: position + '',
|
1485
|
-
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 : '',
|
1486
|
-
ctatId: (_w = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _w !== void 0 ? _w : '',
|
1487
|
-
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 : ''
|
1488
|
-
}
|
1488
|
+
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 }))
|
1489
1489
|
});
|
1490
1490
|
}, [bffEventReport, popupDetailData, isFromHashtag]);
|
1491
1491
|
const productView = React.useCallback((data, product, cta, viewTime, position) => {
|
@@ -1540,22 +1540,25 @@ function useEventReport() {
|
|
1540
1540
|
* @Author: binruan@chatlabs.com
|
1541
1541
|
* @Date: 2024-06-27 16:22:34
|
1542
1542
|
* @LastEditors: binruan@chatlabs.com
|
1543
|
-
* @LastEditTime: 2024-
|
1543
|
+
* @LastEditTime: 2024-08-27 16:59:46
|
1544
1544
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\popup\AppointForm\Form.tsx
|
1545
1545
|
*
|
1546
1546
|
*/
|
1547
1547
|
const Form = ({ layout, columns, onChange }) => {
|
1548
1548
|
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' } },
|
1549
1549
|
layout !== 'inline' && React.createElement("label", { className: 'pb-appoint-form-container-label' }, item === null || item === void 0 ? void 0 : item.title),
|
1550
|
-
(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
|
1550
|
+
(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 })))))))));
|
1551
1551
|
};
|
1552
1552
|
var Form$1 = React.memo(Form);
|
1553
1553
|
|
1554
1554
|
const AppointForm$1 = (_a) => {
|
1555
|
+
var _b, _c;
|
1555
1556
|
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"]);
|
1556
1557
|
const { submitForm, popupDetailData } = useSxpDataSource();
|
1557
1558
|
const { jumpToWeb } = useEventReport();
|
1558
1559
|
const [loading, setLoading] = React.useState(false);
|
1560
|
+
const [formData, setFormData] = React.useState({});
|
1561
|
+
const [marginTop, setMarginTop] = React.useState(0);
|
1559
1562
|
const defaultColumns = React.useMemo(() => [
|
1560
1563
|
{
|
1561
1564
|
title: '',
|
@@ -1582,7 +1585,7 @@ const AppointForm$1 = (_a) => {
|
|
1582
1585
|
key: '4'
|
1583
1586
|
}
|
1584
1587
|
], []);
|
1585
|
-
const
|
1588
|
+
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);
|
1586
1589
|
const columnsData = React.useMemo(() => {
|
1587
1590
|
return lodash.cloneDeep(columns) || defaultColumns;
|
1588
1591
|
}, [columns, defaultColumns]);
|
@@ -1591,17 +1594,17 @@ const AppointForm$1 = (_a) => {
|
|
1591
1594
|
setFormData(Object.assign(Object.assign({}, formData), { [name]: value }));
|
1592
1595
|
}, [formData]);
|
1593
1596
|
const handleSubmit = lodash.debounce(() => __awaiter(void 0, void 0, void 0, function* () {
|
1594
|
-
var
|
1597
|
+
var _d, _e, _f, _g, _h;
|
1595
1598
|
const vals = formData;
|
1596
1599
|
if (!vals)
|
1597
1600
|
return;
|
1598
|
-
const arr = (
|
1601
|
+
const arr = (_e = (_d = Object.keys(vals)) === null || _d === void 0 ? void 0 : _d.map((key) => {
|
1599
1602
|
var _a;
|
1600
1603
|
return ({
|
1601
1604
|
name: key,
|
1602
1605
|
value: (_a = vals[key]) !== null && _a !== void 0 ? _a : ''
|
1603
1606
|
});
|
1604
|
-
})) === null ||
|
1607
|
+
})) === null || _e === void 0 ? void 0 : _e.filter((item) => item === null || item === void 0 ? void 0 : item.value);
|
1605
1608
|
if (!arr || !(arr === null || arr === void 0 ? void 0 : arr.length))
|
1606
1609
|
return;
|
1607
1610
|
setLoading(true);
|
@@ -1610,8 +1613,8 @@ const AppointForm$1 = (_a) => {
|
|
1610
1613
|
if (res) {
|
1611
1614
|
if (isExternalLink) {
|
1612
1615
|
const data = popupDetailData;
|
1613
|
-
const product = (
|
1614
|
-
const cta = (
|
1616
|
+
const product = (_f = data === null || data === void 0 ? void 0 : data.video) === null || _f === void 0 ? void 0 : _f.bindProduct;
|
1617
|
+
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;
|
1615
1618
|
const position = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
|
1616
1619
|
jumpToWeb(data, product, cta, position);
|
1617
1620
|
}
|
@@ -1621,11 +1624,33 @@ const AppointForm$1 = (_a) => {
|
|
1621
1624
|
onClick === null || onClick === void 0 ? void 0 : onClick();
|
1622
1625
|
}
|
1623
1626
|
}), 1000);
|
1627
|
+
React.useEffect(() => {
|
1628
|
+
const handleScroll = () => {
|
1629
|
+
var _a, _b;
|
1630
|
+
// 获取用户代理字符串
|
1631
|
+
const userAgent = navigator.userAgent;
|
1632
|
+
// 判断是否是安卓设备
|
1633
|
+
const isAndroid = userAgent.toLowerCase().includes('android');
|
1634
|
+
if (!isAndroid)
|
1635
|
+
return;
|
1636
|
+
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);
|
1637
|
+
if (resizeHeight < originalHeight) {
|
1638
|
+
setMarginTop(50);
|
1639
|
+
}
|
1640
|
+
else {
|
1641
|
+
setMarginTop(0);
|
1642
|
+
}
|
1643
|
+
};
|
1644
|
+
window.addEventListener('resize', handleScroll);
|
1645
|
+
return () => {
|
1646
|
+
window.removeEventListener('resize', handleScroll);
|
1647
|
+
};
|
1648
|
+
}, []);
|
1624
1649
|
return (React.createElement("div", { className: 'pb-appoint-form' },
|
1625
1650
|
React.createElement("div", { className: `pb-appoint-form-title ${css.css(Object.assign({}, textStyle))}`, dangerouslySetInnerHTML: {
|
1626
1651
|
__html: setFontForText(title, textStyle)
|
1627
1652
|
} }),
|
1628
|
-
React.createElement("div", Object.assign({ className: css.css(Object.assign({}, style)) }, props),
|
1653
|
+
React.createElement("div", Object.assign({ className: css.css(Object.assign(Object.assign({}, style), { marginTop })) }, props),
|
1629
1654
|
React.createElement("div", { className: 'pb-appoint-form-container' },
|
1630
1655
|
React.createElement(Form$1, { columns: columnsData, layout: layoutType, onChange: handleChange }))),
|
1631
1656
|
React.createElement("div", { className: 'pb-appoint-form-btn-wrapper' },
|
@@ -2007,6 +2032,27 @@ var settingRender$9 = [
|
|
2007
2032
|
name: ['props', 'iframeBgColor']
|
2008
2033
|
}
|
2009
2034
|
]
|
2035
|
+
},
|
2036
|
+
{
|
2037
|
+
title: '轮播指示器',
|
2038
|
+
child: [
|
2039
|
+
{
|
2040
|
+
label: '背景色',
|
2041
|
+
name: ['props', 'swiper', 'dotsBgColor'],
|
2042
|
+
type: 'Color'
|
2043
|
+
},
|
2044
|
+
{
|
2045
|
+
label: '选中色',
|
2046
|
+
name: ['props', 'swiper', 'dotsActiveColor'],
|
2047
|
+
type: 'Color'
|
2048
|
+
},
|
2049
|
+
{
|
2050
|
+
label: '底边距',
|
2051
|
+
name: ['props', 'swiper', 'dotsMarginBottom'],
|
2052
|
+
type: 'Number',
|
2053
|
+
addonAfter: 'px'
|
2054
|
+
}
|
2055
|
+
]
|
2010
2056
|
}
|
2011
2057
|
];
|
2012
2058
|
|
@@ -9214,10 +9260,10 @@ const CommodityDetail$1 = (_a) => {
|
|
9214
9260
|
__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)
|
9215
9261
|
} }),
|
9216
9262
|
React.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
|
9217
|
-
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
|
9218
|
-
bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
|
9219
|
-
collection is unisex and is inspired by the padlock pattern found in the Tiffany Antique Collection. This
|
9220
|
-
necklace features a stylish and eye-catching oval clasp chain decorated with a lock pattern. Crafted from
|
9263
|
+
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
|
9264
|
+
bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
|
9265
|
+
collection is unisex and is inspired by the padlock pattern found in the Tiffany Antique Collection. This
|
9266
|
+
necklace features a stylish and eye-catching oval clasp chain decorated with a lock pattern. Crafted from
|
9221
9267
|
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 }))));
|
9222
9268
|
};
|
9223
9269
|
const renderBtn = () => {
|
@@ -9266,7 +9312,21 @@ const CommodityDetail$1 = (_a) => {
|
|
9266
9312
|
clickableClass: getDotsAlign
|
9267
9313
|
}, loop: true, autoplay: {
|
9268
9314
|
delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
|
9269
|
-
}, ref: ref },
|
9315
|
+
}, ref: ref, className: css.css(Object.assign(Object.assign(Object.assign({}, ((swiper === null || swiper === void 0 ? void 0 : swiper.dotsMarginBottom) && {
|
9316
|
+
'.swiper-pagination': {
|
9317
|
+
bottom: swiper === null || swiper === void 0 ? void 0 : swiper.dotsMarginBottom
|
9318
|
+
}
|
9319
|
+
})), ((swiper === null || swiper === void 0 ? void 0 : swiper.dotsBgColor) && {
|
9320
|
+
'.swiper-pagination-bullet': {
|
9321
|
+
backgroundColor: swiper === null || swiper === void 0 ? void 0 : swiper.dotsBgColor,
|
9322
|
+
opacity: 1
|
9323
|
+
}
|
9324
|
+
})), ((swiper === null || swiper === void 0 ? void 0 : swiper.dotsActiveColor) && {
|
9325
|
+
'.swipe-item-active-bullet': {
|
9326
|
+
backgroundColor: `${swiper === null || swiper === void 0 ? void 0 : swiper.dotsActiveColor}!important`,
|
9327
|
+
opacity: 1
|
9328
|
+
}
|
9329
|
+
}))) },
|
9270
9330
|
React.createElement(React.Fragment, null, (_x = product === null || product === void 0 ? void 0 : product.homePage) === null || _x === void 0 ? void 0 : _x.map((src) => {
|
9271
9331
|
var _a;
|
9272
9332
|
return (React.createElement(SwiperSlide, { key: src },
|
@@ -9655,7 +9715,7 @@ const Prompt = createMaterial(PromptComponent, {
|
|
9655
9715
|
* @Author: binruan@chatlabs.com
|
9656
9716
|
* @Date: 2024-03-26 16:50:25
|
9657
9717
|
* @LastEditors: binruan@chatlabs.com
|
9658
|
-
* @LastEditTime: 2024-08-
|
9718
|
+
* @LastEditTime: 2024-08-28 19:08:24
|
9659
9719
|
* @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetailDiroNew\settingRender.tsx
|
9660
9720
|
*
|
9661
9721
|
*/
|
@@ -9970,6 +10030,27 @@ var settingRender$7 = [
|
|
9970
10030
|
name: ['props', 'iframeBgColor']
|
9971
10031
|
}
|
9972
10032
|
]
|
10033
|
+
},
|
10034
|
+
{
|
10035
|
+
title: '轮播指示器',
|
10036
|
+
child: [
|
10037
|
+
{
|
10038
|
+
label: '背景色',
|
10039
|
+
name: ['props', 'swiper', 'dotsBgColor'],
|
10040
|
+
type: 'Color'
|
10041
|
+
},
|
10042
|
+
{
|
10043
|
+
label: '选中色',
|
10044
|
+
name: ['props', 'swiper', 'dotsActiveColor'],
|
10045
|
+
type: 'Color'
|
10046
|
+
},
|
10047
|
+
{
|
10048
|
+
label: '底边距',
|
10049
|
+
name: ['props', 'swiper', 'dotsMarginBottom'],
|
10050
|
+
type: 'Number',
|
10051
|
+
addonAfter: 'px'
|
10052
|
+
}
|
10053
|
+
]
|
9973
10054
|
}
|
9974
10055
|
];
|
9975
10056
|
|
@@ -10094,7 +10175,7 @@ const CommodityDetailDiroNew$1 = (_a) => {
|
|
10094
10175
|
const productInfoText = ({ isPost }) => {
|
10095
10176
|
return (React.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
|
10096
10177
|
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) ||
|
10097
|
-
`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
|
10178
|
+
`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
|
10098
10179
|
Made in Italy` })));
|
10099
10180
|
};
|
10100
10181
|
const getStyle = React.useCallback((style) => {
|
@@ -10136,7 +10217,21 @@ Made in Italy` })));
|
|
10136
10217
|
clickableClass: getDotsAlign
|
10137
10218
|
}, loop: true, autoplay: {
|
10138
10219
|
delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
|
10139
|
-
}, ref: ref }, (
|
10220
|
+
}, ref: ref, className: css.css(Object.assign(Object.assign(Object.assign({}, ((swiper === null || swiper === void 0 ? void 0 : swiper.dotsMarginBottom) && {
|
10221
|
+
'.swiper-pagination': {
|
10222
|
+
bottom: swiper === null || swiper === void 0 ? void 0 : swiper.dotsMarginBottom
|
10223
|
+
}
|
10224
|
+
})), ((swiper === null || swiper === void 0 ? void 0 : swiper.dotsBgColor) && {
|
10225
|
+
'.swiper-pagination-bullet': {
|
10226
|
+
backgroundColor: swiper === null || swiper === void 0 ? void 0 : swiper.dotsBgColor,
|
10227
|
+
opacity: 1
|
10228
|
+
}
|
10229
|
+
})), ((swiper === null || swiper === void 0 ? void 0 : swiper.dotsActiveColor) && {
|
10230
|
+
'.swipe-item-active-bullet': {
|
10231
|
+
backgroundColor: `${swiper === null || swiper === void 0 ? void 0 : swiper.dotsActiveColor}!important`,
|
10232
|
+
opacity: 1
|
10233
|
+
}
|
10234
|
+
}))) }, (_x = product === null || product === void 0 ? void 0 : product.homePage) === null || _x === void 0 ? void 0 : _x.map((src) => {
|
10140
10235
|
var _a;
|
10141
10236
|
return (React.createElement(SwiperSlide, { key: src },
|
10142
10237
|
React.createElement("div", { style: {
|
@@ -15744,7 +15839,7 @@ const Picture = (props) => {
|
|
15744
15839
|
* @Author: lewinlu@chatlabs.com
|
15745
15840
|
* @Date: 2024-01-03 14:39:09
|
15746
15841
|
* @LastEditors: binruan@chatlabs.com
|
15747
|
-
* @LastEditTime: 2024-
|
15842
|
+
* @LastEditTime: 2024-08-29 09:34:13
|
15748
15843
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\PictureGroup\index.tsx
|
15749
15844
|
*/
|
15750
15845
|
const PictureGroup$2 = ({ imgUrls, width, height, rec, index, onReportViewImageEnd, onViewImageStartEvent, imgUrlsPostConfig }) => {
|
@@ -15778,10 +15873,20 @@ const PictureGroup$2 = ({ imgUrls, width, height, rec, index, onReportViewImageE
|
|
15778
15873
|
return (React.createElement(Swiper, { ref: ref, defaultValue: 0, direction: 'horizontal', modules: [Pagination, Autoplay], pagination: {
|
15779
15874
|
clickable: true,
|
15780
15875
|
bulletActiveClass: 'swipe-item-active-bullet'
|
15781
|
-
}, className: css.css(Object.assign({}, ((imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.marginBottom) && {
|
15876
|
+
}, className: css.css(Object.assign(Object.assign(Object.assign({}, ((imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.marginBottom) && {
|
15782
15877
|
'.swiper-pagination': {
|
15783
15878
|
bottom: (_a = imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.marginBottom) !== null && _a !== void 0 ? _a : 0
|
15784
15879
|
}
|
15880
|
+
})), ((imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.dotsBgColor) && {
|
15881
|
+
'.swiper-pagination-bullet': {
|
15882
|
+
backgroundColor: imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.dotsBgColor,
|
15883
|
+
opacity: 1
|
15884
|
+
}
|
15885
|
+
})), ((imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.dotsActiveColor) && {
|
15886
|
+
'.swipe-item-active-bullet': {
|
15887
|
+
backgroundColor: `${imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.dotsActiveColor}!important`,
|
15888
|
+
opacity: 1
|
15889
|
+
}
|
15785
15890
|
}))), 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) => {
|
15786
15891
|
return (React.createElement(SwiperSlide, { key: index },
|
15787
15892
|
React.createElement(Picture, { src: !isLoad && index > 0 ? '' : url, height: height, imgUrlsPostConfig: imgUrlsPostConfig, onShowFirstImage: showFirstImageFn })));
|
@@ -16036,7 +16141,7 @@ var Tagbar$1 = React.memo(Tagbar);
|
|
16036
16141
|
* @Author: binruan@chatlabs.com
|
16037
16142
|
* @Date: 2024-01-15 19:03:09
|
16038
16143
|
* @LastEditors: binruan@chatlabs.com
|
16039
|
-
* @LastEditTime: 2024-08-
|
16144
|
+
* @LastEditTime: 2024-08-28 19:13:38
|
16040
16145
|
* @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
|
16041
16146
|
*
|
16042
16147
|
*/
|
@@ -16053,7 +16158,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
16053
16158
|
const [isShowMore, setIsShowMore] = React.useState(false);
|
16054
16159
|
const [isReload, setIsReload] = React.useState(new Date().getTime());
|
16055
16160
|
const skipLinkRef = React.useRef(false);
|
16056
|
-
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();
|
16161
|
+
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();
|
16057
16162
|
const { backMainFeed, productView, jumpToWeb } = useEventReport();
|
16058
16163
|
const isShowFingerTip = React.useMemo(() => {
|
16059
16164
|
return data.length > 0 && !loading && (getFeUserId() || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enableSwiperTip));
|
@@ -16212,8 +16317,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
16212
16317
|
return null;
|
16213
16318
|
}
|
16214
16319
|
});
|
16215
|
-
return !waterFallData ? list.concat([{ loading: true }]) : list;
|
16216
|
-
}, [data, activeIndex, waterFallData, isEditor]);
|
16320
|
+
return !waterFallData && !isNoMoreData ? list.concat([{ loading: true }]) : list;
|
16321
|
+
}, [data, activeIndex, waterFallData, isEditor, isNoMoreData]);
|
16217
16322
|
const renderLogo = React.useMemo(() => {
|
16218
16323
|
var _a, _b, _c, _d;
|
16219
16324
|
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
|
@@ -16532,9 +16637,14 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
16532
16637
|
return;
|
16533
16638
|
if ((swiper === null || swiper === void 0 ? void 0 : swiper.activeIndex) + 1 >= (data === null || data === void 0 ? void 0 : data.length)) {
|
16534
16639
|
if (!isLoadMore) {
|
16640
|
+
let pageNum = 2;
|
16535
16641
|
setIsLoadMore(true);
|
16536
|
-
loadVideos === null || loadVideos === void 0 ? void 0 : loadVideos(
|
16642
|
+
loadVideos === null || loadVideos === void 0 ? void 0 : loadVideos(pageNum).then((res) => {
|
16643
|
+
var _a;
|
16537
16644
|
setIsLoadMore(false);
|
16645
|
+
if (res && ((_a = res === null || res === void 0 ? void 0 : res.recList) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
16646
|
+
pageNum++;
|
16647
|
+
}
|
16538
16648
|
});
|
16539
16649
|
}
|
16540
16650
|
}
|