@yysports/tools 1.0.4 → 1.0.6

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 CHANGED
@@ -3,11 +3,4 @@
3
3
  [![NPM version](https://img.shields.io/npm/v/@yysports/tools.svg?style=flat)](https://npmjs.org/package/@yysports/tools)
4
4
  [![NPM downloads](http://img.shields.io/npm/dm/@yysports/tools.svg?style=flat)](https://npmjs.org/package/@yysports/tools)
5
5
 
6
- ## 更新日志
7
-
8
- ### 1.0.0
9
-
10
- `2025-07-15`
11
-
12
- - 🆕 用户信息增加人资组织编码 orgCode
13
- - 🆕 用户信息增加权限中心配置的部门数据权限 dataScopeZonePermissions
6
+ [阅读文档](https://track.yysports.com/yysports-tools)
@@ -39,6 +39,9 @@ var Track = /*#__PURE__*/function () {
39
39
  if (!config) {
40
40
  throw new Error('请配置Track');
41
41
  }
42
+ if (!config.domain) {
43
+ throw new Error('请设置信息采集中心域名');
44
+ }
42
45
  if (!config.appId) {
43
46
  throw new Error('请设置appId');
44
47
  }
@@ -59,7 +62,7 @@ var Track = /*#__PURE__*/function () {
59
62
  compressed = pako.deflate(JSON.stringify(data));
60
63
  if (data.length) {
61
64
  debug && console.debug('[track:debug] push data', data);
62
- navigator.sendBeacon("https://track.yysports.com/pousheng-guard/api/analysis/track", compressed);
65
+ navigator.sendBeacon("".concat(this.config.domain, "/pousheng-guard/api/analysis/track"), compressed);
63
66
  }
64
67
  case 4:
65
68
  case "end":
@@ -292,7 +295,7 @@ var Track = /*#__PURE__*/function () {
292
295
  key: "registerAppInfo",
293
296
  value: function registerAppInfo() {
294
297
  var appId = this.config.appId;
295
- navigator.sendBeacon("https://track.yysports.com/pousheng-guard/api/conf/updateAppVersion", pako.deflate(JSON.stringify({
298
+ navigator.sendBeacon("".concat(this.config.domain, "/pousheng-guard/api/conf/updateAppVersion"), pako.deflate(JSON.stringify({
296
299
  appId: appId,
297
300
  version: version
298
301
  })));
@@ -33,6 +33,7 @@ export interface TrackConfig {
33
33
  zoneId: number;
34
34
  zoneName: string;
35
35
  }[]>;
36
+ domain: string;
36
37
  }
37
38
  export declare enum TrackTypeEnum {
38
39
  error = "\u9519\u8BEF\u4FE1\u606F",
@@ -41,6 +41,9 @@ var Track = class {
41
41
  if (!config) {
42
42
  throw new Error("请配置Track");
43
43
  }
44
+ if (!config.domain) {
45
+ throw new Error("请设置信息采集中心域名");
46
+ }
44
47
  if (!config.appId) {
45
48
  throw new Error("请设置appId");
46
49
  }
@@ -54,7 +57,7 @@ var Track = class {
54
57
  if (data.length) {
55
58
  debug && console.debug("[track:debug] push data", data);
56
59
  navigator.sendBeacon(
57
- `https://track.yysports.com/pousheng-guard/api/analysis/track`,
60
+ `${this.config.domain}/pousheng-guard/api/analysis/track`,
58
61
  compressed
59
62
  );
60
63
  }
@@ -218,7 +221,7 @@ var Track = class {
218
221
  static registerAppInfo() {
219
222
  const { appId } = this.config;
220
223
  navigator.sendBeacon(
221
- `https://track.yysports.com/pousheng-guard/api/conf/updateAppVersion`,
224
+ `${this.config.domain}/pousheng-guard/api/conf/updateAppVersion`,
222
225
  import_pako.default.deflate(
223
226
  JSON.stringify({
224
227
  appId,
@@ -33,6 +33,7 @@ export interface TrackConfig {
33
33
  zoneId: number;
34
34
  zoneName: string;
35
35
  }[]>;
36
+ domain: string;
36
37
  }
37
38
  export declare enum TrackTypeEnum {
38
39
  error = "\u9519\u8BEF\u4FE1\u606F",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yysports/tools",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "常用工具函数库",
5
5
  "homepage": "https://git.pousheng.com/sport-service-department/pousheng-guard/yysports_tools#readme",
6
6
  "bugs": {
@@ -64,25 +64,25 @@
64
64
  "pako": "^2.1.0"
65
65
  },
66
66
  "devDependencies": {
67
- "@ant-design/pro-components": "^2.8.9",
67
+ "@ant-design/pro-components": "^2.8.10",
68
68
  "@commitlint/cli": "^19.8.1",
69
69
  "@commitlint/config-conventional": "^19.8.1",
70
70
  "@types/pako": "^2.0.3",
71
71
  "@types/react": "^18.3.23",
72
72
  "@types/react-dom": "^18.3.7",
73
73
  "@umijs/lint": "^4.4.11",
74
- "antd": "^5.26.5",
74
+ "antd": "^5.26.6",
75
75
  "dumi": "^2.4.21",
76
76
  "eslint": "^9.31.0",
77
77
  "father": "^4.6.1",
78
78
  "husky": "^9.1.7",
79
79
  "lint-staged": "^16.1.2",
80
80
  "prettier": "^3.6.2",
81
- "prettier-plugin-organize-imports": "^4.1.0",
82
- "prettier-plugin-packagejson": "^2.5.18",
81
+ "prettier-plugin-organize-imports": "^4.2.0",
82
+ "prettier-plugin-packagejson": "^2.5.19",
83
83
  "react": "^18.3.1",
84
84
  "react-dom": "^18.3.1",
85
- "stylelint": "^16.21.1"
85
+ "stylelint": "^16.22.0"
86
86
  },
87
87
  "publishConfig": {
88
88
  "access": "public"