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.cjs CHANGED
@@ -746,9 +746,24 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
746
746
  // 事件上报优化
747
747
  // Beacon API 用于发送异步和非阻塞请求到服务器。这类请求不需要响应。
748
748
  if (options.type === 'beacon' && navigator.sendBeacon) {
749
- return navigator.sendBeacon(`${url}/api/${path}`, new Blob([
749
+ return navigator.sendBeacon(`${url}/api/${path}`, new Blob(
750
+ // [
751
+ // JSON.stringify({
752
+ // body: encrypt(
753
+ // JSON.stringify(
754
+ // btoa(
755
+ // encodeURIComponent(
756
+ // JSON.stringify({ ...options.body, ...bffDataSource.headers, 'x-user-id': fakeUserId })
757
+ // )
758
+ // )
759
+ // ),
760
+ // 'dcAR82I0b8sgwCku'
761
+ // )
762
+ // })
763
+ // ],
764
+ [
750
765
  JSON.stringify({
751
- body: encodeURIComponent(JSON.stringify(Object.assign(Object.assign(Object.assign({}, options.body), bffDataSource.headers), { 'x-user-id': fakeUserId })))
766
+ body: btoa(encodeURIComponent(JSON.stringify(Object.assign(Object.assign(Object.assign({}, options.body), bffDataSource.headers), { 'x-user-id': fakeUserId }))))
752
767
  })
753
768
  ], {
754
769
  type: 'application/json;charset=UTF-8'