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/pb-ui.js
CHANGED
@@ -731,7 +731,7 @@
|
|
731
731
|
}, [bffDataSource]);
|
732
732
|
// bff API 请求方法
|
733
733
|
const bffFetch = React.useCallback((path, options, isBota = true) => {
|
734
|
-
var _a;
|
734
|
+
var _a, _b;
|
735
735
|
if (!bffDataSource)
|
736
736
|
return;
|
737
737
|
const url = bffDataSource.url;
|
@@ -744,9 +744,8 @@
|
|
744
744
|
val.split('=')[0];
|
745
745
|
val.split('=')[1];
|
746
746
|
});
|
747
|
-
options.body = Object.assign(Object.assign({}, options.body), { tenant_id: fakeUserId });
|
748
747
|
return window
|
749
|
-
.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
|
748
|
+
.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
|
750
749
|
? JSON.stringify({
|
751
750
|
body: btoa(encodeURIComponent(JSON.stringify(Object.assign(Object.assign(Object.assign({}, options.body), bffDataSource.headers), { 'x-user-id': fakeUserId }))))
|
752
751
|
})
|