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 +1 -0
- package/index.js +12 -2
- package/lsi-md5.js +4 -5
- package/package.json +2 -2
package/README.md
CHANGED
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:
|
|
209
|
+
circulation: cirtemp,
|
|
200
210
|
ctk: busObj.ctk ? busObj.ctk : "",
|
|
201
211
|
domain: obj.domain,
|
|
202
|
-
duration: 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
|
|
4
|
-
import MD5 from
|
|
5
|
-
const packageJson = JSON.parse(fs.readFileSync(
|
|
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.
|
|
4
|
-
"lsi": "
|
|
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": {
|