pb-sxp-ui 1.15.13-alpha.2 → 1.15.13-alpha.3
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 +33 -34
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +31 -32
- 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 +33 -34
- 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/DiyStoryPreview/index.d.ts +1 -0
- package/es/core/components/DiyStoryPreview/index.js +20 -13
- package/es/core/components/SxpPageCore/index.d.ts +1 -0
- package/es/core/components/SxpPageCore/index.js +3 -3
- package/es/core/context/SxpDataSourceProvider.js +3 -3
- package/lib/core/components/DiyStoryPreview/index.d.ts +1 -0
- package/lib/core/components/DiyStoryPreview/index.js +19 -12
- package/lib/core/components/SxpPageCore/index.d.ts +1 -0
- package/lib/core/components/SxpPageCore/index.js +3 -3
- package/lib/core/context/SxpDataSourceProvider.js +3 -3
- package/package.json +1 -1
@@ -23,6 +23,7 @@ export type DiyStoryPreviewType = ISxpPageRenderProps & {
|
|
23
23
|
activeIndex?: number;
|
24
24
|
onActiveChange?: (v: number) => void;
|
25
25
|
loopPlay?: boolean;
|
26
|
+
pointerEvents?: any;
|
26
27
|
};
|
27
28
|
declare const _default: React.NamedExoticComponent<DiyStoryPreviewType>;
|
28
29
|
export default _default;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import React, { memo, useEffect, useMemo, useRef } from 'react';
|
1
|
+
import React, { memo, useEffect, useMemo, useRef, useState } from 'react';
|
2
2
|
import { Swiper, SwiperSlide } from 'swiper/react';
|
3
3
|
import { cloneDeep } from 'lodash';
|
4
4
|
import RenderCard from '../SxpPageRender/RenderCard';
|
@@ -10,12 +10,6 @@ import PictureGroup from './PictureGroup';
|
|
10
10
|
import VideoWidget from './VideoWidget';
|
11
11
|
import * as _materials_ from '../../../materials';
|
12
12
|
import '../SxpPageRender/index.less';
|
13
|
-
const RESOLVER = {};
|
14
|
-
Object.values(_materials_).forEach((v) => {
|
15
|
-
RESOLVER[v.extend.type] = v;
|
16
|
-
});
|
17
|
-
const defaultUnLikeIconPath = '/pb_static/f71266d2c64446c5ae6a5a7f5489cc0a.png';
|
18
|
-
const defaultLikeIconPath = '/pb_static/f07900fe3f0f4ae188ea1611d4801a44.png';
|
19
13
|
const recData = {
|
20
14
|
position: 0,
|
21
15
|
isCollected: false,
|
@@ -194,7 +188,14 @@ const recData = {
|
|
194
188
|
]
|
195
189
|
}
|
196
190
|
};
|
197
|
-
const
|
191
|
+
const RESOLVER = {};
|
192
|
+
Object.values(_materials_).forEach((v) => {
|
193
|
+
RESOLVER[v.extend.type] = v;
|
194
|
+
});
|
195
|
+
const defaultUnLikeIconPath = '/pb_static/f71266d2c64446c5ae6a5a7f5489cc0a.png';
|
196
|
+
const defaultLikeIconPath = '/pb_static/f07900fe3f0f4ae188ea1611d4801a44.png';
|
197
|
+
const DiyStoryPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, descStyle, hashTagStyle, containerHeight = 664, containerWidth = 375, appDomain, tagList = [], scenes, onActiveChange, activeIndex, loopPlay = false, pointerEvents = 'none' }) => {
|
198
|
+
const [loopPlaySwiper, setLooPlaySwiper] = useState(loopPlay);
|
198
199
|
const swiperRef = useRef(null);
|
199
200
|
const height = useMemo(() => {
|
200
201
|
let minusHeight = 0;
|
@@ -219,10 +220,10 @@ const DiyStoryPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, des
|
|
219
220
|
const renderContent = (rec, index) => {
|
220
221
|
const isVideo = isVideoUrl(rec === null || rec === void 0 ? void 0 : rec.mediaUrl);
|
221
222
|
if (isVideo) {
|
222
|
-
return (React.createElement(VideoWidget, { rec: rec, index: index, muted: true, width: containerWidth, data: scenes !== null && scenes !== void 0 ? scenes : [], height: containerHeight, activeIndex: index, videoPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.videoPost, swiperRef: swiperRef, loopPlay:
|
223
|
+
return (React.createElement(VideoWidget, { rec: rec, index: index, muted: true, width: containerWidth, data: scenes !== null && scenes !== void 0 ? scenes : [], height: containerHeight, activeIndex: index, videoPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.videoPost, swiperRef: swiperRef, loopPlay: loopPlaySwiper }));
|
223
224
|
}
|
224
225
|
else {
|
225
|
-
return (React.createElement(PictureGroup, { key: rec.itemId, imgUrls: [rec === null || rec === void 0 ? void 0 : rec.mediaUrl], width: containerWidth, height: containerHeight, rec: rec, index: index, imgUrlsPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.imgUrlsPost, data: scenes !== null && scenes !== void 0 ? scenes : [], swiperRef: swiperRef, loopPlay:
|
226
|
+
return (React.createElement(PictureGroup, { key: rec.itemId, imgUrls: [rec === null || rec === void 0 ? void 0 : rec.mediaUrl], width: containerWidth, height: containerHeight, rec: rec, index: index, imgUrlsPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.imgUrlsPost, data: scenes !== null && scenes !== void 0 ? scenes : [], swiperRef: swiperRef, loopPlay: loopPlaySwiper }));
|
226
227
|
}
|
227
228
|
};
|
228
229
|
const renderLogo = useMemo(() => {
|
@@ -263,7 +264,7 @@ const DiyStoryPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, des
|
|
263
264
|
width: '100%',
|
264
265
|
willChange: 'transform',
|
265
266
|
zIndex: 2,
|
266
|
-
pointerEvents
|
267
|
+
pointerEvents
|
267
268
|
} })),
|
268
269
|
React.createElement("div", { style: {
|
269
270
|
marginBottom: `${(_g = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.bottomInfoDist) !== null && _g !== void 0 ? _g : 40}px`,
|
@@ -367,8 +368,14 @@ const DiyStoryPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, des
|
|
367
368
|
return;
|
368
369
|
(_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.slideTo(0);
|
369
370
|
}, [loopPlay]);
|
370
|
-
return (React.createElement("div", { id: 'sxp-render', style: { height: containerHeight, position: 'relative', pointerEvents
|
371
|
-
React.createElement(Swiper, { ref: swiperRef, allowTouchMove:
|
371
|
+
return (React.createElement("div", { id: 'sxp-render', style: { height: containerHeight, position: 'relative', pointerEvents } },
|
372
|
+
React.createElement(Swiper, { ref: swiperRef, allowTouchMove: pointerEvents !== 'none', onSlideChange: () => {
|
373
|
+
setLooPlaySwiper(false);
|
374
|
+
swiperRef.current.swiper.allowTouchMove = false;
|
375
|
+
setTimeout(() => {
|
376
|
+
swiperRef.current.swiper.allowTouchMove = true;
|
377
|
+
}, 500);
|
378
|
+
}, onActiveIndexChange: (swiper) => {
|
372
379
|
onActiveChange === null || onActiveChange === void 0 ? void 0 : onActiveChange(swiper.activeIndex);
|
373
380
|
}, direction: 'vertical', style: { overflow: 'hidden', height: containerHeight }, height: containerHeight }, scenes === null || scenes === void 0 ? void 0 : scenes.map((rec, index) => {
|
374
381
|
return renderView(rec, index);
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import React, { memo, useMemo, useState } from 'react';
|
2
|
-
import SxpPageRender from '../SxpPageRender';
|
3
2
|
import Popup from '../SxpPageRender/Popup';
|
3
|
+
import DiyStoryPreview from '../DiyStoryPreview';
|
4
4
|
import * as _materials_ from '../../../materials';
|
5
5
|
import { EditorCore } from '../../../core';
|
6
6
|
import SxpDataSourceProvider from '../../../core/context/SxpDataSourceProvider';
|
@@ -8,7 +8,7 @@ const RESOLVER = {};
|
|
8
8
|
Object.values(_materials_).forEach((v) => {
|
9
9
|
RESOLVER[v.extend.type] = v;
|
10
10
|
});
|
11
|
-
const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage, appDomain, enabledMetaConversionApi, dataList }) => {
|
11
|
+
const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage, appDomain, enabledMetaConversionApi, dataList, pointerEvents }) => {
|
12
12
|
var _a, _b, _c, _d, _e, _f;
|
13
13
|
const utmVal = useMemo(() => {
|
14
14
|
var _a;
|
@@ -21,7 +21,7 @@ const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, l
|
|
21
21
|
React.createElement(SxpDataSourceProvider, { utmVal: utmVal, dataSources: data === null || data === void 0 ? void 0 : data.data_sources, sxpParameter: data === null || data === void 0 ? void 0 : data.sxp_parameter, maxSize: (_b = (_a = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _a === void 0 ? void 0 : _a.personalized_recommend) !== null && _b !== void 0 ? _b : maxSize, defaultSize: (_d = (_c = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _c === void 0 ? void 0 : _c.default_recommend) !== null && _d !== void 0 ? _d : defaultSize, hashTagSize: (_f = (_e = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _e === void 0 ? void 0 : _e.hash_tag_size) !== null && _f !== void 0 ? _f : hashTagSize, loadingImage: loadingImage, appDomain: appDomain, enabledMetaConversionApi: enabledMetaConversionApi, utmParameter: data === null || data === void 0 ? void 0 : data.utm_parameter, data: data, dataList: dataList, onUpdateSchema: (d) => setSchema(d), onUpdateChannel: (d) => setChannel(d), render: ({ rtcList, tagList, pageData }) => {
|
22
22
|
var _a;
|
23
23
|
return (React.createElement(React.Fragment, null,
|
24
|
-
React.createElement(
|
24
|
+
React.createElement(DiyStoryPreview, Object.assign({ defaultData: data }, (_a = pageData === null || pageData === void 0 ? void 0 : pageData.data) === null || _a === void 0 ? void 0 : _a.sxpPageConf, { tagList: tagList, scenes: rtcList, resolver: RESOLVER, containerHeight: window === null || window === void 0 ? void 0 : window.innerHeight, pointerEvents: pointerEvents })),
|
25
25
|
React.createElement(Popup, null)));
|
26
26
|
} })));
|
27
27
|
};
|
@@ -151,9 +151,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
151
151
|
}
|
152
152
|
else if (utmVal) {
|
153
153
|
const val = (_k = (_j = (_h = splitUrlParams(utmVal)) === null || _h === void 0 ? void 0 : _h.filter((val) => {
|
154
|
-
var _a, _b;
|
155
154
|
const key = val.split('=')[0];
|
156
|
-
return
|
155
|
+
return key;
|
157
156
|
})) === null || _j === void 0 ? void 0 : _j.join('&')) !== null && _k !== void 0 ? _k : '';
|
158
157
|
if (val)
|
159
158
|
query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(val) });
|
@@ -194,7 +193,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
194
193
|
if (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) {
|
195
194
|
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 });
|
196
195
|
}
|
197
|
-
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('
|
196
|
+
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v3/recommend/direct', { method: 'POST', body: query }));
|
198
197
|
if (!(result === null || result === void 0 ? void 0 : result.success)) {
|
199
198
|
return undefined;
|
200
199
|
}
|
@@ -465,6 +464,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
465
464
|
if (!isShowConsent)
|
466
465
|
h5EnterLink();
|
467
466
|
}, [isShowConsent]);
|
467
|
+
console.log(data, '111');
|
468
468
|
useEffect(() => {
|
469
469
|
if (isShowConsent || isPreview)
|
470
470
|
return;
|
@@ -23,6 +23,7 @@ export type DiyStoryPreviewType = ISxpPageRenderProps & {
|
|
23
23
|
activeIndex?: number;
|
24
24
|
onActiveChange?: (v: number) => void;
|
25
25
|
loopPlay?: boolean;
|
26
|
+
pointerEvents?: any;
|
26
27
|
};
|
27
28
|
declare const _default: React.NamedExoticComponent<DiyStoryPreviewType>;
|
28
29
|
export default _default;
|
@@ -13,12 +13,6 @@ const PictureGroup_1 = tslib_1.__importDefault(require("./PictureGroup"));
|
|
13
13
|
const VideoWidget_1 = tslib_1.__importDefault(require("./VideoWidget"));
|
14
14
|
const _materials_ = tslib_1.__importStar(require("../../../materials"));
|
15
15
|
require("../SxpPageRender/index.less");
|
16
|
-
const RESOLVER = {};
|
17
|
-
Object.values(_materials_).forEach((v) => {
|
18
|
-
RESOLVER[v.extend.type] = v;
|
19
|
-
});
|
20
|
-
const defaultUnLikeIconPath = '/pb_static/f71266d2c64446c5ae6a5a7f5489cc0a.png';
|
21
|
-
const defaultLikeIconPath = '/pb_static/f07900fe3f0f4ae188ea1611d4801a44.png';
|
22
16
|
const recData = {
|
23
17
|
position: 0,
|
24
18
|
isCollected: false,
|
@@ -197,7 +191,14 @@ const recData = {
|
|
197
191
|
]
|
198
192
|
}
|
199
193
|
};
|
200
|
-
const
|
194
|
+
const RESOLVER = {};
|
195
|
+
Object.values(_materials_).forEach((v) => {
|
196
|
+
RESOLVER[v.extend.type] = v;
|
197
|
+
});
|
198
|
+
const defaultUnLikeIconPath = '/pb_static/f71266d2c64446c5ae6a5a7f5489cc0a.png';
|
199
|
+
const defaultLikeIconPath = '/pb_static/f07900fe3f0f4ae188ea1611d4801a44.png';
|
200
|
+
const DiyStoryPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, descStyle, hashTagStyle, containerHeight = 664, containerWidth = 375, appDomain, tagList = [], scenes, onActiveChange, activeIndex, loopPlay = false, pointerEvents = 'none' }) => {
|
201
|
+
const [loopPlaySwiper, setLooPlaySwiper] = (0, react_1.useState)(loopPlay);
|
201
202
|
const swiperRef = (0, react_1.useRef)(null);
|
202
203
|
const height = (0, react_1.useMemo)(() => {
|
203
204
|
let minusHeight = 0;
|
@@ -222,10 +223,10 @@ const DiyStoryPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, des
|
|
222
223
|
const renderContent = (rec, index) => {
|
223
224
|
const isVideo = isVideoUrl(rec === null || rec === void 0 ? void 0 : rec.mediaUrl);
|
224
225
|
if (isVideo) {
|
225
|
-
return (react_1.default.createElement(VideoWidget_1.default, { rec: rec, index: index, muted: true, width: containerWidth, data: scenes !== null && scenes !== void 0 ? scenes : [], height: containerHeight, activeIndex: index, videoPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.videoPost, swiperRef: swiperRef, loopPlay:
|
226
|
+
return (react_1.default.createElement(VideoWidget_1.default, { rec: rec, index: index, muted: true, width: containerWidth, data: scenes !== null && scenes !== void 0 ? scenes : [], height: containerHeight, activeIndex: index, videoPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.videoPost, swiperRef: swiperRef, loopPlay: loopPlaySwiper }));
|
226
227
|
}
|
227
228
|
else {
|
228
|
-
return (react_1.default.createElement(PictureGroup_1.default, { key: rec.itemId, imgUrls: [rec === null || rec === void 0 ? void 0 : rec.mediaUrl], width: containerWidth, height: containerHeight, rec: rec, index: index, imgUrlsPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.imgUrlsPost, data: scenes !== null && scenes !== void 0 ? scenes : [], swiperRef: swiperRef, loopPlay:
|
229
|
+
return (react_1.default.createElement(PictureGroup_1.default, { key: rec.itemId, imgUrls: [rec === null || rec === void 0 ? void 0 : rec.mediaUrl], width: containerWidth, height: containerHeight, rec: rec, index: index, imgUrlsPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.imgUrlsPost, data: scenes !== null && scenes !== void 0 ? scenes : [], swiperRef: swiperRef, loopPlay: loopPlaySwiper }));
|
229
230
|
}
|
230
231
|
};
|
231
232
|
const renderLogo = (0, react_1.useMemo)(() => {
|
@@ -266,7 +267,7 @@ const DiyStoryPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, des
|
|
266
267
|
width: '100%',
|
267
268
|
willChange: 'transform',
|
268
269
|
zIndex: 2,
|
269
|
-
pointerEvents
|
270
|
+
pointerEvents
|
270
271
|
} })),
|
271
272
|
react_1.default.createElement("div", { style: {
|
272
273
|
marginBottom: `${(_g = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.bottomInfoDist) !== null && _g !== void 0 ? _g : 40}px`,
|
@@ -370,8 +371,14 @@ const DiyStoryPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, des
|
|
370
371
|
return;
|
371
372
|
(_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.slideTo(0);
|
372
373
|
}, [loopPlay]);
|
373
|
-
return (react_1.default.createElement("div", { id: 'sxp-render', style: { height: containerHeight, position: 'relative', pointerEvents
|
374
|
-
react_1.default.createElement(react_2.Swiper, { ref: swiperRef, allowTouchMove:
|
374
|
+
return (react_1.default.createElement("div", { id: 'sxp-render', style: { height: containerHeight, position: 'relative', pointerEvents } },
|
375
|
+
react_1.default.createElement(react_2.Swiper, { ref: swiperRef, allowTouchMove: pointerEvents !== 'none', onSlideChange: () => {
|
376
|
+
setLooPlaySwiper(false);
|
377
|
+
swiperRef.current.swiper.allowTouchMove = false;
|
378
|
+
setTimeout(() => {
|
379
|
+
swiperRef.current.swiper.allowTouchMove = true;
|
380
|
+
}, 500);
|
381
|
+
}, onActiveIndexChange: (swiper) => {
|
375
382
|
onActiveChange === null || onActiveChange === void 0 ? void 0 : onActiveChange(swiper.activeIndex);
|
376
383
|
}, direction: 'vertical', style: { overflow: 'hidden', height: containerHeight }, height: containerHeight }, scenes === null || scenes === void 0 ? void 0 : scenes.map((rec, index) => {
|
377
384
|
return renderView(rec, index);
|
@@ -2,8 +2,8 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const tslib_1 = require("tslib");
|
4
4
|
const react_1 = tslib_1.__importStar(require("react"));
|
5
|
-
const SxpPageRender_1 = tslib_1.__importDefault(require("../SxpPageRender"));
|
6
5
|
const Popup_1 = tslib_1.__importDefault(require("../SxpPageRender/Popup"));
|
6
|
+
const DiyStoryPreview_1 = tslib_1.__importDefault(require("../DiyStoryPreview"));
|
7
7
|
const _materials_ = tslib_1.__importStar(require("../../../materials"));
|
8
8
|
const core_1 = require("../../../core");
|
9
9
|
const SxpDataSourceProvider_1 = tslib_1.__importDefault(require("../../../core/context/SxpDataSourceProvider"));
|
@@ -11,7 +11,7 @@ const RESOLVER = {};
|
|
11
11
|
Object.values(_materials_).forEach((v) => {
|
12
12
|
RESOLVER[v.extend.type] = v;
|
13
13
|
});
|
14
|
-
const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage, appDomain, enabledMetaConversionApi, dataList }) => {
|
14
|
+
const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage, appDomain, enabledMetaConversionApi, dataList, pointerEvents }) => {
|
15
15
|
var _a, _b, _c, _d, _e, _f;
|
16
16
|
const utmVal = (0, react_1.useMemo)(() => {
|
17
17
|
var _a;
|
@@ -24,7 +24,7 @@ const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, l
|
|
24
24
|
react_1.default.createElement(SxpDataSourceProvider_1.default, { utmVal: utmVal, dataSources: data === null || data === void 0 ? void 0 : data.data_sources, sxpParameter: data === null || data === void 0 ? void 0 : data.sxp_parameter, maxSize: (_b = (_a = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _a === void 0 ? void 0 : _a.personalized_recommend) !== null && _b !== void 0 ? _b : maxSize, defaultSize: (_d = (_c = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _c === void 0 ? void 0 : _c.default_recommend) !== null && _d !== void 0 ? _d : defaultSize, hashTagSize: (_f = (_e = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _e === void 0 ? void 0 : _e.hash_tag_size) !== null && _f !== void 0 ? _f : hashTagSize, loadingImage: loadingImage, appDomain: appDomain, enabledMetaConversionApi: enabledMetaConversionApi, utmParameter: data === null || data === void 0 ? void 0 : data.utm_parameter, data: data, dataList: dataList, onUpdateSchema: (d) => setSchema(d), onUpdateChannel: (d) => setChannel(d), render: ({ rtcList, tagList, pageData }) => {
|
25
25
|
var _a;
|
26
26
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
27
|
-
react_1.default.createElement(
|
27
|
+
react_1.default.createElement(DiyStoryPreview_1.default, Object.assign({ defaultData: data }, (_a = pageData === null || pageData === void 0 ? void 0 : pageData.data) === null || _a === void 0 ? void 0 : _a.sxpPageConf, { tagList: tagList, scenes: rtcList, resolver: RESOLVER, containerHeight: window === null || window === void 0 ? void 0 : window.innerHeight, pointerEvents: pointerEvents })),
|
28
28
|
react_1.default.createElement(Popup_1.default, null)));
|
29
29
|
} })));
|
30
30
|
};
|
@@ -154,9 +154,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
154
154
|
}
|
155
155
|
else if (utmVal) {
|
156
156
|
const val = (_k = (_j = (_h = (0, tool_1.splitUrlParams)(utmVal)) === null || _h === void 0 ? void 0 : _h.filter((val) => {
|
157
|
-
var _a, _b;
|
158
157
|
const key = val.split('=')[0];
|
159
|
-
return
|
158
|
+
return key;
|
160
159
|
})) === null || _j === void 0 ? void 0 : _j.join('&')) !== null && _k !== void 0 ? _k : '';
|
161
160
|
if (val)
|
162
161
|
query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(val) });
|
@@ -197,7 +196,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
197
196
|
if (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) {
|
198
197
|
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 });
|
199
198
|
}
|
200
|
-
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('
|
199
|
+
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v3/recommend/direct', { method: 'POST', body: query }));
|
201
200
|
if (!(result === null || result === void 0 ? void 0 : result.success)) {
|
202
201
|
return undefined;
|
203
202
|
}
|
@@ -468,6 +467,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
468
467
|
if (!isShowConsent)
|
469
468
|
h5EnterLink();
|
470
469
|
}, [isShowConsent]);
|
470
|
+
console.log(data, '111');
|
471
471
|
(0, react_1.useEffect)(() => {
|
472
472
|
if (isShowConsent || isPreview)
|
473
473
|
return;
|