@tmsfe/tms-core 0.0.39 → 0.0.40
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/package.json +1 -1
- package/src/report/formatV1.ts +2 -1
- package/src/report/helper.ts +2 -3
- package/src/report/types.ts +1 -1
package/package.json
CHANGED
package/src/report/formatV1.ts
CHANGED
|
@@ -12,6 +12,7 @@ function getBaseData(deviceData: IDeviceData): DataItem[] {
|
|
|
12
12
|
const arr = new Array<string>(helper.dataArrLen);
|
|
13
13
|
const { networkType, location } = deviceData;
|
|
14
14
|
const { appVersion, client } = helper.getInitOptions();
|
|
15
|
+
const { host } = helper.getSystemInfo();
|
|
15
16
|
// todo: 如何区分新旧埋点?新:f20不为空,旧:f20为空
|
|
16
17
|
// ++++++++++++++++++++++++++字段列表++++++++++++++++++++++++++
|
|
17
18
|
// 0: log_time,日志入库时间
|
|
@@ -42,7 +43,7 @@ function getBaseData(deviceData: IDeviceData): DataItem[] {
|
|
|
42
43
|
// 18: f18,city - 城市
|
|
43
44
|
arr[18] = location.cityName;
|
|
44
45
|
// 19: f19,当前小程序运行的宿主环境
|
|
45
|
-
arr[19] = helper.
|
|
46
|
+
arr[19] = helper.convert2String(host);
|
|
46
47
|
// 28: f28,sinan、mycar等
|
|
47
48
|
arr[28] = client;
|
|
48
49
|
// 29: f29,小程序场景值
|
package/src/report/helper.ts
CHANGED
|
@@ -37,9 +37,8 @@ function getSystemInfo(): ISystemInfo {
|
|
|
37
37
|
if (systemInfo === null) {
|
|
38
38
|
const system = syncApi.getSystemInfoSync() as any;
|
|
39
39
|
// eslint-disable-next-line
|
|
40
|
-
const { model = '', version: wxVersion = '', platform = '', SDKVersion = '', host } = system;
|
|
41
|
-
|
|
42
|
-
systemInfo = { model, wxVersion, platform, SDKVersion, host: hostStr };
|
|
40
|
+
const { model = '', version: wxVersion = '', platform = '', SDKVersion = '', host = '' } = system;
|
|
41
|
+
systemInfo = { model, wxVersion, platform, SDKVersion, host };
|
|
43
42
|
}
|
|
44
43
|
return systemInfo;
|
|
45
44
|
}
|