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 CHANGED
@@ -738,7 +738,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
738
738
  }, [bffDataSource]);
739
739
  // bff API 请求方法
740
740
  const bffFetch = React.useCallback((path, options, isBota = true) => {
741
- var _a;
741
+ var _a, _b;
742
742
  if (!bffDataSource)
743
743
  return;
744
744
  const url = bffDataSource.url;
@@ -751,9 +751,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
751
751
  val.split('=')[0];
752
752
  val.split('=')[1];
753
753
  });
754
- options.body = Object.assign(Object.assign({}, options.body), { tenant_id: fakeUserId });
755
754
  return window
756
- .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
755
+ .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
757
756
  ? JSON.stringify({
758
757
  body: btoa(encodeURIComponent(JSON.stringify(Object.assign(Object.assign(Object.assign({}, options.body), bffDataSource.headers), { 'x-user-id': fakeUserId }))))
759
758
  })