@yysports/tools 2.2.4 → 2.2.5

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.
@@ -1,5 +1,6 @@
1
1
  export default class Log {
2
2
  private static _module;
3
+ static get module(): string;
3
4
  private static _commonProps;
4
5
  static visitLog(module: string): void;
5
6
  static eventLog(content: string): void;
package/dist/Track/Log.js CHANGED
@@ -14,10 +14,17 @@ var Log = /*#__PURE__*/function () {
14
14
  _classCallCheck(this, Log);
15
15
  }
16
16
  _createClass(Log, null, [{
17
- key: "_commonProps",
18
- value:
17
+ key: "module",
18
+ get:
19
+ // 获取当前模块名称
20
+ function get() {
21
+ return this._module;
22
+ }
23
+
19
24
  // 上报日志的公共属性
20
- function _commonProps() {
25
+ }, {
26
+ key: "_commonProps",
27
+ value: function _commonProps() {
21
28
  return _objectSpread(_objectSpread(_objectSpread({}, User.profile), System.profile), {}, {
22
29
  appId: Config.data.appId,
23
30
  module: this._module
@@ -8,6 +8,7 @@ export default class Track {
8
8
  static get userProfile(): UserProfile | null;
9
9
  static get systemProfile(): import("../interfaces/track.interface").SystemProfile;
10
10
  static run(): void;
11
+ static get module(): string;
11
12
  static visitLog: typeof Log.visitLog;
12
13
  static eventLog: typeof Log.eventLog;
13
14
  static errorLog: typeof Log.errorLog;
@@ -47,6 +47,13 @@ var Track = /*#__PURE__*/function () {
47
47
  Replay.run();
48
48
  Beacon.updateVersion();
49
49
  }
50
+
51
+ // 获取当前页面模块名称
52
+ }, {
53
+ key: "module",
54
+ get: function get() {
55
+ return Log.module;
56
+ }
50
57
  }]);
51
58
  return Track;
52
59
  }();
@@ -1,5 +1,6 @@
1
1
  export default class Log {
2
2
  private static _module;
3
+ static get module(): string;
3
4
  private static _commonProps;
4
5
  static visitLog(module: string): void;
5
6
  static eventLog(content: string): void;
package/lib/Track/Log.js CHANGED
@@ -38,6 +38,10 @@ var import_Replay = __toESM(require("./Replay"));
38
38
  var import_System = __toESM(require("./System"));
39
39
  var import_User = __toESM(require("./User"));
40
40
  var Log = class {
41
+ // 获取当前模块名称
42
+ static get module() {
43
+ return this._module;
44
+ }
41
45
  // 上报日志的公共属性
42
46
  static _commonProps() {
43
47
  return {
@@ -8,6 +8,7 @@ export default class Track {
8
8
  static get userProfile(): UserProfile | null;
9
9
  static get systemProfile(): import("../interfaces/track.interface").SystemProfile;
10
10
  static run(): void;
11
+ static get module(): string;
11
12
  static visitLog: typeof Log.visitLog;
12
13
  static eventLog: typeof Log.eventLog;
13
14
  static errorLog: typeof Log.errorLog;
@@ -62,6 +62,10 @@ var Track = class {
62
62
  import_Replay.default.run();
63
63
  import_Beacon.default.updateVersion();
64
64
  }
65
+ // 获取当前页面模块名称
66
+ static get module() {
67
+ return import_Log.default.module;
68
+ }
65
69
  };
66
70
  Track.visitLog = import_Log.default.visitLog.bind(import_Log.default);
67
71
  Track.eventLog = import_Log.default.eventLog.bind(import_Log.default);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yysports/tools",
3
- "version": "2.2.4",
3
+ "version": "2.2.5",
4
4
  "description": "常用工具函数库",
5
5
  "homepage": "https://git.pousheng.com/sport-service-department/pousheng-guard/yysports_tools#readme",
6
6
  "bugs": {