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 +1 -0
- package/eventutils.js +5 -5
- package/index.js +2 -2
- package/manualutils.js +4 -2
- package/package.json +2 -2
package/autoutils.js
CHANGED
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
|
-
|
|
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
|
-
|
|
65
|
-
|
|
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("
|
|
88
|
+
console.log("queryEventUpload:");
|
|
89
89
|
reportTrackEventServer("event", uploadArray, BPNEventFail);
|
|
90
90
|
}
|
|
91
91
|
}
|
package/index.js
CHANGED
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
|
-
|
|
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
|
-
|
|
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.
|
|
4
|
-
"lsi": "
|
|
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": {
|