visual-buried-point-platform-uni 1.0.0-alpha.8 → 1.0.0-alpha.9

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/README.md CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  ### SDK更新日志
4
4
  - 1.0.0-alpha.07 最新uni、终端通用埋点sdk;
5
+ - 1.0.0-alpha.08 自定义上报数据结构删除path字段;
5
6
 
6
7
  ### 1、引入方式
7
8
 
package/index.js CHANGED
@@ -191,15 +191,25 @@ function assemblyTrackData(type) {
191
191
  if (busObj) {
192
192
  let obj = getTrackObj(busObj, platform);
193
193
  let trackData = null;
194
+ let cirtemp;
194
195
  if (type === "destroy") {
196
+ cirtemp = 3;
195
197
  startTime = (Date.now() - startTimeLong) / 1000;
198
+ } else {
199
+ if (startTime === 0) {
200
+ startTime === 0;
201
+ cirtemp = 1;
202
+ } else {
203
+ startTime = 15;
204
+ cirtemp = 2;
205
+ }
196
206
  }
197
207
  trackData = {
198
208
  busSegment: busObj.busSegment,
199
- circulation: obj.circulation,
209
+ circulation: cirtemp,
200
210
  ctk: busObj.ctk ? busObj.ctk : "",
201
211
  domain: obj.domain,
202
- duration: startTime === 0 ? 0 : startTime,
212
+ duration: startTime,
203
213
  module: busObj.module,
204
214
  path: obj.path,
205
215
  properties: busObj.extend_param
package/lsi-md5.js CHANGED
@@ -1,15 +1,14 @@
1
1
  // 此js在npm build,根据name + version + md5后会自动修改package.json中的lsi
2
2
  // 注:发给后端,作为标识依据和上报字段lsi值
3
- import fs from 'fs' ;
4
- import MD5 from 'md5' ;
5
- const packageJson = JSON.parse(fs.readFileSync('./package.json', 'utf-8'));
6
-
3
+ import fs from "fs";
4
+ import MD5 from "md5";
5
+ const packageJson = JSON.parse(fs.readFileSync("./package.json", "utf-8"));
7
6
 
8
7
  const { name, version } = packageJson;
9
8
  // MD5
10
9
  const combinedString = name + "-" + version;
11
10
  const md5Str = MD5(combinedString);
12
- packageJson.lsi = md5Str;
11
+ packageJson.lsi = md5Str + "#" + version;
13
12
  //base64
14
13
  // const combinedString = name.substring(0, 16) + "v" + version;
15
14
  // const base64Str = btoa(combinedString);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "visual-buried-point-platform-uni",
3
- "version": "1.0.0-alpha.08",
4
- "lsi": "ecd31a049b2d07f61d9d425b009cd74a",
3
+ "version": "1.0.0-alpha.09",
4
+ "lsi": "2fd45101ac37118f6d823ce6589d52fb#1.0.0-alpha.09",
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": {