visual-buried-point-platform-uni 1.0.0-alpha.21 → 1.0.0-alpha.22

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/autoutils.js CHANGED
@@ -172,6 +172,7 @@ export function queryTrackDataUpload() {
172
172
  uploadArray.forEach((item) => {
173
173
  delete item.pageUUId;
174
174
  });
175
+ console.log("queryTrackDataUpload");
175
176
  reportTrackEventServer("track", uploadArray, BPNPVUVFail);
176
177
  }
177
178
  }
package/eventutils.js CHANGED
@@ -16,10 +16,9 @@ function getCurPath() {
16
16
 
17
17
  // 自定义部分 type=>custom event=>到四种具体事件类型 extend_param 扩展字段
18
18
  export function eventCommonStore(data) {
19
- if (!data) return;
20
19
  const _page = data.$page ? data.$page : "";
21
20
  const _path = _page.path ? _page.path : getCurPath();
22
- let reportEventData = {
21
+ const reportEventData = {
23
22
  utm: data.$utm ? data.$utm : getUtmObj(),
24
23
  duration: "",
25
24
  element: data.$element ? data.$element : null,
@@ -61,8 +60,9 @@ export function insertEventData(cData) {
61
60
  const cd = uni.getStorageSync(BPNEvent);
62
61
  let allEventData = cd ? JSON.parse(cd) : [];
63
62
  if (cData && cData.length) {
64
- // concat方法
65
- allEventData.concat(cData);
63
+ cData.forEach((item) => {
64
+ allEventData.push(item);
65
+ });
66
66
  uni.setStorageSync(BPNEvent, JSON.stringify(allEventData));
67
67
  }
68
68
  }
@@ -85,7 +85,7 @@ export function queryEventDataUpload() {
85
85
  uploadArray.push(...failArr);
86
86
  }
87
87
  if (uploadArray && uploadArray.length) {
88
- console.log("queryEventDataUpload");
88
+ console.log("queryEventUpload:");
89
89
  reportTrackEventServer("event", uploadArray, BPNEventFail);
90
90
  }
91
91
  }
package/index.js CHANGED
@@ -74,8 +74,8 @@ export function getTrackId() {
74
74
  }
75
75
 
76
76
  // set custom event
77
- export function setCustomEvent(data) {
78
- eventCommonStore(data);
77
+ export function setCustomEvent(tData) {
78
+ eventCommonStore(tData);
79
79
  }
80
80
 
81
81
  //track upload-registry
package/manualutils.js CHANGED
@@ -30,7 +30,8 @@ function clearUMlData() {
30
30
  // start pv
31
31
  export const uStartTrackPVData = (tData) => {
32
32
  if (umlInterval) {
33
- uStopTrackPVData();
33
+ uTrackPVData(AUTOTRACKTYPE.LEAVE);
34
+ clearInterval(umlInterval);
34
35
  } else {
35
36
  if (tData) {
36
37
  clearUMlData();
@@ -45,7 +46,7 @@ export const uStartTrackPVData = (tData) => {
45
46
  // stop pv
46
47
  export const uStopTrackPVData = () => {
47
48
  uTrackPVData(AUTOTRACKTYPE.LEAVE);
48
- clearUMlData();
49
+ clearInterval(umlInterval)
49
50
  };
50
51
 
51
52
  function uTrackPVData(type, tData) {
@@ -82,6 +83,7 @@ function uTrackPVData(type, tData) {
82
83
  pageUUId: cUUId,
83
84
  };
84
85
  if (puvData) {
86
+ console.log("写入ml数据:", puvData);
85
87
  insertPVUVData(puvData, cUUId);
86
88
  }
87
89
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "visual-buried-point-platform-uni",
3
- "version": "1.0.0-alpha.21",
4
- "lsi": "92ff1eea79405724febc2335b9a3a02a#1.0.0-alpha.21",
3
+ "version": "1.0.0-alpha.22",
4
+ "lsi": "c3a3572a7a0facff92ab2afbbcd94dd6#1.0.0-alpha.22",
5
5
  "description": "To make it easy for you to get started with GitLab, here's a list of recommended next steps.",
6
6
  "main": "index.js",
7
7
  "scripts": {