pb-sxp-ui 1.16.17 → 1.16.18
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 +2 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -3
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +4 -4
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +4 -4
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +2 -3
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +4 -4
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/context/SxpDataSourceProvider.js +2 -3
- package/lib/core/context/SxpDataSourceProvider.js +2 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -716,7 +716,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
716
716
|
}, [bffDataSource]);
|
717
717
|
// bff API 请求方法
|
718
718
|
const bffFetch = useCallback((path, options, isBota = true) => {
|
719
|
-
var _a;
|
719
|
+
var _a, _b;
|
720
720
|
if (!bffDataSource)
|
721
721
|
return;
|
722
722
|
const url = bffDataSource.url;
|
@@ -729,9 +729,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
729
729
|
val.split('=')[0];
|
730
730
|
val.split('=')[1];
|
731
731
|
});
|
732
|
-
options.body = Object.assign(Object.assign({}, options.body), { tenant_id: fakeUserId });
|
733
732
|
return window
|
734
|
-
.fetch(`${url}/api/${path}`, Object.assign({ headers: Object.assign({ 'Content-Type': 'application/json', 'x-user-id': fakeUserId }, bffDataSource.headers), method: options.method, body: options.type === 'beacon' && isBota
|
733
|
+
.fetch(`${url}/api/${path}`, Object.assign({ headers: Object.assign({ 'Content-Type': 'application/json', 'x-user-id': fakeUserId, tenant_id: (_b = bffDataSource === null || bffDataSource === void 0 ? void 0 : bffDataSource.headers) === null || _b === void 0 ? void 0 : _b['x-app-id'] }, bffDataSource.headers), method: options.method, body: options.type === 'beacon' && isBota
|
735
734
|
? JSON.stringify({
|
736
735
|
body: btoa(encodeURIComponent(JSON.stringify(Object.assign(Object.assign(Object.assign({}, options.body), bffDataSource.headers), { 'x-user-id': fakeUserId }))))
|
737
736
|
})
|