pb-sxp-ui 1.15.12-alpha.5 → 1.15.12-alpha.7

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.js CHANGED
@@ -724,9 +724,24 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
724
724
  // 事件上报优化
725
725
  // Beacon API 用于发送异步和非阻塞请求到服务器。这类请求不需要响应。
726
726
  if (options.type === 'beacon' && navigator.sendBeacon) {
727
- return navigator.sendBeacon(`${url}/api/${path}`, new Blob([
727
+ return navigator.sendBeacon(`${url}/api/${path}`, new Blob(
728
+ // [
729
+ // JSON.stringify({
730
+ // body: encrypt(
731
+ // JSON.stringify(
732
+ // btoa(
733
+ // encodeURIComponent(
734
+ // JSON.stringify({ ...options.body, ...bffDataSource.headers, 'x-user-id': fakeUserId })
735
+ // )
736
+ // )
737
+ // ),
738
+ // 'dcAR82I0b8sgwCku'
739
+ // )
740
+ // })
741
+ // ],
742
+ [
728
743
  JSON.stringify({
729
- body: encodeURIComponent(JSON.stringify(Object.assign(Object.assign(Object.assign({}, options.body), bffDataSource.headers), { 'x-user-id': fakeUserId })))
744
+ body: btoa(encodeURIComponent(JSON.stringify(Object.assign(Object.assign(Object.assign({}, options.body), bffDataSource.headers), { 'x-user-id': fakeUserId }))))
730
745
  })
731
746
  ], {
732
747
  type: 'application/json;charset=UTF-8'