visual-buried-point-platform-uni 1.0.0-alpha.5 → 1.0.0-alpha.6
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/index.js +12 -12
- package/package.json +2 -2
- package/tools.js +3 -3
package/index.js
CHANGED
|
@@ -81,7 +81,7 @@ function startGlobalTime() {
|
|
|
81
81
|
clearInterval(cInterval);
|
|
82
82
|
cInterval = setInterval(() => {
|
|
83
83
|
let cData = getSData();
|
|
84
|
-
console.log("storage data " + JSON.stringify(cData));
|
|
84
|
+
// console.log("storage data " + JSON.stringify(cData));
|
|
85
85
|
if (cData) {
|
|
86
86
|
reportCustom(cData);
|
|
87
87
|
delSData();
|
|
@@ -125,7 +125,7 @@ export function setCustomEvent(data) {
|
|
|
125
125
|
traceId: "",
|
|
126
126
|
trackId: trackId,
|
|
127
127
|
triggerTime: timeToStr(Date.now()),
|
|
128
|
-
url:
|
|
128
|
+
url: url,
|
|
129
129
|
};
|
|
130
130
|
if (reportData) {
|
|
131
131
|
addCache(reportData);
|
|
@@ -247,16 +247,16 @@ function reportTrack(data) {
|
|
|
247
247
|
}
|
|
248
248
|
|
|
249
249
|
function getCurPath() {
|
|
250
|
-
if (platform) {
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
250
|
+
// if (platform === "android" || platform === "ios") {
|
|
251
|
+
// return "";
|
|
252
|
+
// } else {
|
|
253
|
+
// const pages = getCurrentPages();
|
|
254
|
+
// const gcp = pages[pages.length - 1];
|
|
255
|
+
// return gcp ? gcp.route : "/";
|
|
256
|
+
// }
|
|
257
|
+
const pages = getCurrentPages();
|
|
258
|
+
const gcp = pages[pages.length - 1];
|
|
259
|
+
return gcp ? gcp.route : "/";
|
|
260
260
|
}
|
|
261
261
|
|
|
262
262
|
function commonData(allData) {
|
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.06",
|
|
4
|
+
"lsi": "dec5c3d85a97a8b63bf1219cbb31be17",
|
|
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": {
|
package/tools.js
CHANGED
|
@@ -64,10 +64,10 @@ export function webH5Info(result) {
|
|
|
64
64
|
|
|
65
65
|
//微信的appInfo
|
|
66
66
|
export function wxInfo() {
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
const accInfo = uni.getAccountInfoSync();
|
|
68
|
+
const bInfo = uni.getAppBaseInfo();
|
|
69
69
|
return {
|
|
70
|
-
name: "",
|
|
70
|
+
name: bInfo.appName ? bInfo.appName : "",
|
|
71
71
|
packageName: accInfo ? accInfo.miniProgram.appId : "",
|
|
72
72
|
version: accInfo
|
|
73
73
|
? accInfo.miniProgram.envVersion + accInfo.miniProgram.version
|