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.
Files changed (3) hide show
  1. package/index.js +12 -12
  2. package/package.json +2 -2
  3. 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
- if (platform == "wx") {
252
- let gcp = getCurrentPages();
253
- return gcp ? gcp[gcp.length - 1].route : "/";
254
- } else if (platform == "web") {
255
- return window.location.hostname;
256
- } else if (platform == "android" || platform === "ios") {
257
- return "";
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.05",
4
- "lsi": "50ba3c2ac38fa587d3ff435ae1a0fb21",
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
- let accInfo = uni.getAccountInfoSync();
68
- console.log("baseinfo " + JSON.stringify(uni.getAppBaseInfo()));
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