pb-sxp-ui 1.15.11 → 1.15.12-alpha.1

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
@@ -747,7 +747,9 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
747
747
  // Beacon API 用于发送异步和非阻塞请求到服务器。这类请求不需要响应。
748
748
  if (options.type === 'beacon' && navigator.sendBeacon) {
749
749
  return navigator.sendBeacon(`${url}/api/${path}`, new Blob([
750
- JSON.stringify(Object.assign(Object.assign(Object.assign({}, options.body), bffDataSource.headers), { 'x-user-id': fakeUserId }))
750
+ JSON.stringify({
751
+ body: btoa(JSON.stringify(Object.assign(Object.assign(Object.assign({}, options.body), bffDataSource.headers), { 'x-user-id': fakeUserId })))
752
+ })
751
753
  ], { type: 'application/json;charset=UTF-8' }));
752
754
  }
753
755
  return window
@@ -909,7 +911,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
909
911
  console.log('userInfo:', userInfo);
910
912
  console.log('eventInfo:', ef);
911
913
  console.log('========= 结束 =========');
912
- return bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch(`v2/event/report/CLD/${(_b = bffDataSource === null || bffDataSource === void 0 ? void 0 : bffDataSource.headers) === null || _b === void 0 ? void 0 : _b['x-app-id']}/${eventInfo === null || eventInfo === void 0 ? void 0 : eventInfo.eventSubject}`, {
914
+ return bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch(`v2/cld/${(_b = bffDataSource === null || bffDataSource === void 0 ? void 0 : bffDataSource.headers) === null || _b === void 0 ? void 0 : _b['x-app-id']}/${eventInfo === null || eventInfo === void 0 ? void 0 : eventInfo.eventSubject}${cl_source ? `/${decodeURIComponent(cl_source)}` : ''}`, {
913
915
  method: 'POST',
914
916
  body: { userInfo: realUserInfo, eventInfo: realEventInfo },
915
917
  type: 'beacon'