pb-sxp-ui 1.15.19 → 1.15.20-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/pb-ui.js CHANGED
@@ -738,15 +738,25 @@
738
738
  }
739
739
  // 事件上报优化
740
740
  // Beacon API 用于发送异步和非阻塞请求到服务器。这类请求不需要响应。
741
- if (options.type === 'beacon' && navigator.sendBeacon) {
742
- return navigator.sendBeacon(`${url}/api/${path}`, new Blob([
743
- JSON.stringify({
744
- body: btoa(encodeURIComponent(JSON.stringify(Object.assign(Object.assign(Object.assign({}, options.body), bffDataSource.headers), { 'x-user-id': fakeUserId }))))
745
- })
746
- ], {
747
- type: 'application/json;charset=UTF-8'
748
- }));
749
- }
741
+ // if (options.type === 'beacon' && navigator.sendBeacon) {
742
+ // return navigator.sendBeacon(
743
+ // `${url}/api/${path}`,
744
+ // new Blob(
745
+ // [
746
+ // JSON.stringify({
747
+ // body: btoa(
748
+ // encodeURIComponent(
749
+ // JSON.stringify({ ...options.body, ...bffDataSource.headers, 'x-user-id': fakeUserId })
750
+ // )
751
+ // )
752
+ // })
753
+ // ],
754
+ // {
755
+ // type: 'application/json;charset=UTF-8'
756
+ // }
757
+ // )
758
+ // );
759
+ // }
750
760
  return window
751
761
  .fetch(`${url}/api/${path}`, {
752
762
  headers: Object.assign({ 'Content-Type': 'application/json', 'x-user-id': fakeUserId }, bffDataSource.headers),