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

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.
@@ -114,7 +114,9 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
114
114
  }
115
115
  if (options.type === 'beacon' && navigator.sendBeacon) {
116
116
  return navigator.sendBeacon(`${url}/api/${path}`, new Blob([
117
- JSON.stringify(Object.assign(Object.assign(Object.assign({}, options.body), bffDataSource.headers), { 'x-user-id': fakeUserId }))
117
+ JSON.stringify({
118
+ body: btoa(encodeURIComponent(JSON.stringify(Object.assign(Object.assign(Object.assign({}, options.body), bffDataSource.headers), { 'x-user-id': fakeUserId }))))
119
+ })
118
120
  ], { type: 'application/json;charset=UTF-8' }));
119
121
  }
120
122
  return window
@@ -269,7 +271,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
269
271
  console.log('userInfo:', userInfo);
270
272
  console.log('eventInfo:', ef);
271
273
  console.log('========= 结束 =========');
272
- 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}`, {
274
+ 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)}` : ''}`, {
273
275
  method: 'POST',
274
276
  body: { userInfo: realUserInfo, eventInfo: realEventInfo },
275
277
  type: 'beacon'
@@ -117,7 +117,9 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
117
117
  }
118
118
  if (options.type === 'beacon' && navigator.sendBeacon) {
119
119
  return navigator.sendBeacon(`${url}/api/${path}`, new Blob([
120
- JSON.stringify(Object.assign(Object.assign(Object.assign({}, options.body), bffDataSource.headers), { 'x-user-id': fakeUserId }))
120
+ JSON.stringify({
121
+ body: btoa(encodeURIComponent(JSON.stringify(Object.assign(Object.assign(Object.assign({}, options.body), bffDataSource.headers), { 'x-user-id': fakeUserId }))))
122
+ })
121
123
  ], { type: 'application/json;charset=UTF-8' }));
122
124
  }
123
125
  return window
@@ -272,7 +274,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
272
274
  console.log('userInfo:', userInfo);
273
275
  console.log('eventInfo:', ef);
274
276
  console.log('========= 结束 =========');
275
- 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}`, {
277
+ 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)}` : ''}`, {
276
278
  method: 'POST',
277
279
  body: { userInfo: realUserInfo, eventInfo: realEventInfo },
278
280
  type: 'beacon'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pb-sxp-ui",
3
- "version": "1.15.11",
3
+ "version": "1.15.12-alpha.2",
4
4
  "description": "React enterprise-class UI components",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",