@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tmsfe/tms-core",
3
- "version": "0.0.39",
3
+ "version": "0.0.40",
4
4
  "description": "tms运行时框架",
5
5
  "repository": {
6
6
  "type": "git",
@@ -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.getSystemInfo().host;
46
+ arr[19] = helper.convert2String(host);
46
47
  // 28: f28,sinan、mycar等
47
48
  arr[28] = client;
48
49
  // 29: f29,小程序场景值
@@ -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
- const hostStr = host ? JSON.stringify(host) : '';
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
  }
@@ -30,7 +30,7 @@ interface ISystemInfo {
30
30
  wxVersion: string,
31
31
  platform: string,
32
32
  SDKVersion: string,
33
- host: string,
33
+ host: object | '',
34
34
  }
35
35
 
36
36
  interface ILocation {