pb-sxp-ui 1.15.12-alpha.7 → 1.15.12-alpha.8
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 +11 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +11 -18
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +4 -4
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +4 -4
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +11 -18
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +4 -4
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/context/SxpDataSourceProvider.js +10 -2
- package/lib/core/context/SxpDataSourceProvider.js +10 -2
- package/package.json +1 -2
- package/es/core/utils/cryptojs.d.ts +0 -3
- package/es/core/utils/cryptojs.js +0 -18
- package/lib/core/utils/cryptojs.d.ts +0 -3
- package/lib/core/utils/cryptojs.js +0 -23
package/dist/index.js
CHANGED
@@ -724,22 +724,7 @@ 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(
|
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
|
-
[
|
727
|
+
return navigator.sendBeacon(`${url}/api/${path}`, new Blob([
|
743
728
|
JSON.stringify({
|
744
729
|
body: btoa(encodeURIComponent(JSON.stringify(Object.assign(Object.assign(Object.assign({}, options.body), bffDataSource.headers), { 'x-user-id': fakeUserId }))))
|
745
730
|
})
|
@@ -922,7 +907,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
922
907
|
bffDataSource
|
923
908
|
]);
|
924
909
|
const bffFbReport = useCallback(({ eventName, product }) => {
|
925
|
-
var _a, _b, _c, _d, _e, _f;
|
910
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
926
911
|
if (!enableReportEvent ||
|
927
912
|
!enabledMetaConversionApi ||
|
928
913
|
(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) ||
|
@@ -986,7 +971,15 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
986
971
|
}
|
987
972
|
};
|
988
973
|
getEventParams(jsonParams);
|
989
|
-
|
974
|
+
const params = {};
|
975
|
+
const queryString = location.search.slice(1);
|
976
|
+
(_f = splitUrlParams(queryString)) === null || _f === void 0 ? void 0 : _f.map((val) => {
|
977
|
+
const key = val.split('=')[0];
|
978
|
+
const value = val.split('=')[1];
|
979
|
+
params[key] = value;
|
980
|
+
});
|
981
|
+
const cl_source = params === null || params === void 0 ? void 0 : params.cl_source;
|
982
|
+
return bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch(`v2/fb/${(_g = bffDataSource === null || bffDataSource === void 0 ? void 0 : bffDataSource.headers) === null || _g === void 0 ? void 0 : _g['x-app-id']}/${eventName}${cl_source ? `/${decodeURIComponent(cl_source)}` : ''}`, {
|
990
983
|
method: 'POST',
|
991
984
|
body: jsonParams,
|
992
985
|
type: 'beacon'
|