pb-sxp-ui 1.20.24 → 1.20.25
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 +15 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +15 -4
- 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 +15 -4
- 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/context/SxpDataSourceProvider.js +12 -4
- package/lib/core/context/SxpDataSourceProvider.js +12 -4
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1146,7 +1146,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
|
1146
1146
|
return undefined;
|
|
1147
1147
|
}
|
|
1148
1148
|
setLoading(false);
|
|
1149
|
-
list = list.concat((_1 = (_0 = (_z = (_y = result === null || result === void 0 ? void 0 : result.data) === null || _y === void 0 ? void 0 : _y.recList) === null || _z === void 0 ? void 0 : _z.filter) === null || _0 === void 0 ? void 0 : _0.call(_z, (item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video))) !== null && _1 !== void 0 ? _1 : []);
|
|
1149
|
+
list = list.concat((_1 = (_0 = (_z = (_y = result === null || result === void 0 ? void 0 : result.data) === null || _y === void 0 ? void 0 : _y.recList) === null || _z === void 0 ? void 0 : _z.filter) === null || _0 === void 0 ? void 0 : _0.call(_z, (item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video) || (item === null || item === void 0 ? void 0 : item.multiCta))) !== null && _1 !== void 0 ? _1 : []);
|
|
1150
1150
|
if ((rtcList === null || rtcList === void 0 ? void 0 : rtcList.length) === 0) {
|
|
1151
1151
|
setRtcList(getFilterRecList(Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list })));
|
|
1152
1152
|
setCacheRtcList(getFilterRecList(Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list })));
|
|
@@ -1154,7 +1154,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
|
1154
1154
|
setFirstRtcList(getFilterRecList(Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list })));
|
|
1155
1155
|
}
|
|
1156
1156
|
}
|
|
1157
|
-
const isNotNullList = (_3 = (_2 = result === null || result === void 0 ? void 0 : result.data) === null || _2 === void 0 ? void 0 : _2.recList) === null || _3 === void 0 ? void 0 : _3.some((item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video));
|
|
1157
|
+
const isNotNullList = (_3 = (_2 = result === null || result === void 0 ? void 0 : result.data) === null || _2 === void 0 ? void 0 : _2.recList) === null || _3 === void 0 ? void 0 : _3.some((item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video) || (item === null || item === void 0 ? void 0 : item.multiCta));
|
|
1158
1158
|
if (isNotNullList) {
|
|
1159
1159
|
pageNum = pageNum + 1;
|
|
1160
1160
|
yield recurveRecList(query);
|
|
@@ -1180,13 +1180,13 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
|
1180
1180
|
if (!(query === null || query === void 0 ? void 0 : query.hashTag))
|
|
1181
1181
|
setCurReqInfo({ rtc: result.data.rtc, requestId: result.data.requestId });
|
|
1182
1182
|
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) && !isEditor) {
|
|
1183
|
-
const isNotNullList = (_t = (_s = result === null || result === void 0 ? void 0 : result.data) === null || _s === void 0 ? void 0 : _s.recList) === null || _t === void 0 ? void 0 : _t.some((item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video));
|
|
1183
|
+
const isNotNullList = (_t = (_s = result === null || result === void 0 ? void 0 : result.data) === null || _s === void 0 ? void 0 : _s.recList) === null || _t === void 0 ? void 0 : _t.some((item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video) || (item === null || item === void 0 ? void 0 : item.multiCta));
|
|
1184
1184
|
if (!isNotNullList) {
|
|
1185
1185
|
setIsNoMoreData(true);
|
|
1186
1186
|
}
|
|
1187
1187
|
}
|
|
1188
1188
|
let list = [];
|
|
1189
|
-
list = list.concat((_x = (_w = (_v = (_u = result === null || result === void 0 ? void 0 : result.data) === null || _u === void 0 ? void 0 : _u.recList) === null || _v === void 0 ? void 0 : _v.filter) === null || _w === void 0 ? void 0 : _w.call(_v, (item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video))) !== null && _x !== void 0 ? _x : []);
|
|
1189
|
+
list = list.concat((_x = (_w = (_v = (_u = result === null || result === void 0 ? void 0 : result.data) === null || _u === void 0 ? void 0 : _u.recList) === null || _v === void 0 ? void 0 : _v.filter) === null || _w === void 0 ? void 0 : _w.call(_v, (item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video) || (item === null || item === void 0 ? void 0 : item.multiCta))) !== null && _x !== void 0 ? _x : []);
|
|
1190
1190
|
return Object.assign(Object.assign({}, result.data), { recList: list });
|
|
1191
1191
|
}), [
|
|
1192
1192
|
bffFetch,
|
|
@@ -1584,6 +1584,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
|
1584
1584
|
if (id) {
|
|
1585
1585
|
curData = dataList === null || dataList === void 0 ? void 0 : dataList.find((item) => (item === null || item === void 0 ? void 0 : item.id) === id);
|
|
1586
1586
|
if (curData) {
|
|
1587
|
+
// 找到对应的变体页面配置
|
|
1587
1588
|
setPageData(curData);
|
|
1588
1589
|
document.title = (_c = curData === null || curData === void 0 ? void 0 : curData.name) !== null && _c !== void 0 ? _c : 'home';
|
|
1589
1590
|
gldata = (_e = (_d = curData === null || curData === void 0 ? void 0 : curData.data) === null || _d === void 0 ? void 0 : _d.sxpPageConf) === null || _e === void 0 ? void 0 : _e.globalConfig;
|
|
@@ -1591,11 +1592,21 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
|
1591
1592
|
onUpdateSchema === null || onUpdateSchema === void 0 ? void 0 : onUpdateSchema(curData === null || curData === void 0 ? void 0 : curData.data);
|
|
1592
1593
|
if ((_j = (_h = (_g = (_f = gldata === null || gldata === void 0 ? void 0 : gldata.consent) === null || _f === void 0 ? void 0 : _f[0]) === null || _g === void 0 ? void 0 : _g.item) === null || _h === void 0 ? void 0 : _h.props) === null || _j === void 0 ? void 0 : _j.privacy_necessity)
|
|
1593
1594
|
setShowConsent(true);
|
|
1595
|
+
else
|
|
1596
|
+
setShowConsent(true);
|
|
1594
1597
|
}
|
|
1595
1598
|
else {
|
|
1599
|
+
// A/B测试或实验场景:找不到对应变体时,使用默认页面配置继续渲染
|
|
1600
|
+
console.warn(`[SxpDataSourceProvider] Layout variant ${id} not found in dataList (count: ${(dataList === null || dataList === void 0 ? void 0 : dataList.length) || 0}), using default page config`);
|
|
1601
|
+
// 使用默认globalConfig,不改变showConsent状态,让页面正常渲染
|
|
1602
|
+
gldata = globalConfig;
|
|
1596
1603
|
setShowConsent(true);
|
|
1597
1604
|
}
|
|
1598
1605
|
}
|
|
1606
|
+
else {
|
|
1607
|
+
gldata = globalConfig;
|
|
1608
|
+
setShowConsent(true);
|
|
1609
|
+
}
|
|
1599
1610
|
}
|
|
1600
1611
|
else {
|
|
1601
1612
|
setShowConsent(true);
|