@tmsfe/tms-core 0.0.70 → 0.0.71

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.70",
3
+ "version": "0.0.71",
4
4
  "description": "tms运行时框架",
5
5
  "repository": {
6
6
  "type": "git",
@@ -55,10 +55,23 @@ function fastReport2(...data: any[]): void {
55
55
  }
56
56
  }
57
57
 
58
+ /**
59
+ * 设置字段到上报的SystemInfo中
60
+ * 用于携带自定义信息区分用户场景,比如新旧首页的区分
61
+ * @param fieldName
62
+ * @param value
63
+ */
64
+ function setSystemField(fieldName: string, value: number | string): void {
65
+ const systemInfo = helper.getSystemInfo();
66
+ // @ts-ignore
67
+ systemInfo[fieldName] = value;
68
+ }
69
+
58
70
  export default {
59
71
  init,
60
72
  report,
61
73
  fastReport,
62
74
  report2,
63
75
  fastReport2,
76
+ setSystemField,
64
77
  };