@ibiz-template/core 0.0.1-alpha.13 → 0.0.1-alpha.16

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 +1 @@
1
- {"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../../src/environment/environment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,YAOzB,CAAC"}
1
+ {"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../../src/environment/environment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,YAQzB,CAAC"}
@@ -8,4 +8,5 @@ export const Environment = {
8
8
  dcSystem: '',
9
9
  ExportFile: '/ibizutil/download',
10
10
  UploadFile: '/ibizutil/upload',
11
+ casLoginUrl: '',
11
12
  };
@@ -23,6 +23,14 @@ export interface IEnvironment {
23
23
  * @type {string}
24
24
  */
25
25
  baseUrl: string;
26
+ /**
27
+ * 中央认证登录地址
28
+ *
29
+ * @author lxm
30
+ * @date 2022-10-11 12:10:21
31
+ * @type {string}
32
+ */
33
+ casLoginUrl: string;
26
34
  /**
27
35
  * 远程模型路径
28
36
  *
@@ -1 +1 @@
1
- {"version":3,"file":"i-environment.d.ts","sourceRoot":"","sources":["../../../src/interface/i-environment/i-environment.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;;;OAMG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;;;;OAMG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;;;;;OAMG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;;OAMG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;;;;OAMG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;;;;OAMG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB"}
1
+ {"version":3,"file":"i-environment.d.ts","sourceRoot":"","sources":["../../../src/interface/i-environment/i-environment.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;;;OAMG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;;;;OAMG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;;;OAMG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;;;;;OAMG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;;OAMG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;;;;OAMG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;;;;OAMG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB"}
@@ -4,4 +4,5 @@ export { IHttpResponse, HttpResponse } from './net/http-response';
4
4
  export { Net } from './net/net';
5
5
  export { plural, pluralLower } from './plural/plural';
6
6
  export * from './util/util';
7
+ export * from './url-helper/url-helper';
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACtD,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACtD,cAAc,aAAa,CAAC;AAC5B,cAAc,yBAAyB,CAAC"}
@@ -4,3 +4,4 @@ export { HttpResponse } from './net/http-response';
4
4
  export { Net } from './net/net';
5
5
  export { plural, pluralLower } from './plural/plural';
6
6
  export * from './util/util';
7
+ export * from './url-helper/url-helper';
@@ -27,7 +27,7 @@ export interface IHttpResponse<T = IData> extends AxiosResponse {
27
27
  * @date 2022-08-18 15:08:44
28
28
  * @type {boolean}
29
29
  */
30
- local?: boolean;
30
+ local: boolean;
31
31
  data: T;
32
32
  /**
33
33
  * 当前页
@@ -1 +1 @@
1
- {"version":3,"file":"http-response.d.ts","sourceRoot":"","sources":["../../../src/utils/net/http-response.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAEhF;;;;;;;;;GASG;AACH,MAAM,WAAW,aAAa,CAAC,CAAC,GAAG,KAAK,CAAE,SAAQ,aAAa;IAC7D;;;;;;;OAOG;IACH,EAAE,EAAE,OAAO,CAAC;IACZ;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB,IAAI,EAAE,CAAC,CAAC;IAER;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;GASG;AACH,qBAAa,YAAY,CAAC,CAAC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AAoB,CAAM;IAEnC;;;;;;OAMG;IACH,MAAM,EAAE,kBAAkB,CAAC,KAAK,CAAC,CAAM;IAEvC;;;;;;;;OAQG;gBACS,IAAI,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM;CAQjE"}
@@ -0,0 +1,51 @@
1
+ /**
2
+ * 路径解析助手
3
+ *
4
+ * @author lxm
5
+ * @date 2022-10-11 14:10:12
6
+ * @export
7
+ * @class UrlHelper
8
+ */
9
+ export declare class UrlHelper {
10
+ /**
11
+ * 路由路径前面的基础路径
12
+ * 如:http://172.16.103.120:30061/portalwebapp/#/index/appportalview?params=123
13
+ * 返回:http://172.16.103.120:30061/portalwebapp/#
14
+ *
15
+ * @author lxm
16
+ * @date 2022-10-11 20:10:29
17
+ * @returns {*}
18
+ */
19
+ static get routeBase(): string;
20
+ /**
21
+ * 应用的的基础路径
22
+ * 如:http://172.16.103.120:30061/portalwebapp/#/index/appportalview?params=123
23
+ * 返回:http://172.16.103.120:30061/portalwebapp
24
+ *
25
+ * @author lxm
26
+ * @date 2022-10-11 20:10:29
27
+ * @returns {*}
28
+ */
29
+ static get appBase(): string;
30
+ /**
31
+ * #开始到末尾,即路由地址
32
+ * 如:http://172.16.103.120:30061/portalwebapp/#/index/appportalview?params=123
33
+ * 返回:/index/appportalview?params=123
34
+ *
35
+ * @author lxm
36
+ * @date 2022-10-11 16:10:40
37
+ * @returns {*}
38
+ */
39
+ static get routePath(): string;
40
+ /**
41
+ * 当前地址的全路径,包含域名和参数
42
+ * 如:http://172.16.103.120:30061/portalwebapp/#/index/appportalview?params=123
43
+ *
44
+ * @author lxm
45
+ * @date 2022-10-11 21:10:39
46
+ * @readonly
47
+ * @static
48
+ */
49
+ static get fullPath(): string;
50
+ }
51
+ //# sourceMappingURL=url-helper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"url-helper.d.ts","sourceRoot":"","sources":["../../../src/utils/url-helper/url-helper.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,qBAAa,SAAS;IACpB;;;;;;;;OAQG;IACH,MAAM,KAAK,SAAS,WAEnB;IAED;;;;;;;;OAQG;IACH,MAAM,KAAK,OAAO,WAGjB;IAED;;;;;;;;OAQG;IACH,MAAM,KAAK,SAAS,WAEnB;IAED;;;;;;;;OAQG;IACH,MAAM,KAAK,QAAQ,WAElB;CACF"}
@@ -0,0 +1,59 @@
1
+ /**
2
+ * 路径解析助手
3
+ *
4
+ * @author lxm
5
+ * @date 2022-10-11 14:10:12
6
+ * @export
7
+ * @class UrlHelper
8
+ */
9
+ export class UrlHelper {
10
+ /**
11
+ * 路由路径前面的基础路径
12
+ * 如:http://172.16.103.120:30061/portalwebapp/#/index/appportalview?params=123
13
+ * 返回:http://172.16.103.120:30061/portalwebapp/#
14
+ *
15
+ * @author lxm
16
+ * @date 2022-10-11 20:10:29
17
+ * @returns {*}
18
+ */
19
+ static get routeBase() {
20
+ return `${this.appBase}/#`;
21
+ }
22
+ /**
23
+ * 应用的的基础路径
24
+ * 如:http://172.16.103.120:30061/portalwebapp/#/index/appportalview?params=123
25
+ * 返回:http://172.16.103.120:30061/portalwebapp
26
+ *
27
+ * @author lxm
28
+ * @date 2022-10-11 20:10:29
29
+ * @returns {*}
30
+ */
31
+ static get appBase() {
32
+ const { origin, pathname } = window.location;
33
+ return `${origin}${pathname}`.replace(/\/$/, '');
34
+ }
35
+ /**
36
+ * #开始到末尾,即路由地址
37
+ * 如:http://172.16.103.120:30061/portalwebapp/#/index/appportalview?params=123
38
+ * 返回:/index/appportalview?params=123
39
+ *
40
+ * @author lxm
41
+ * @date 2022-10-11 16:10:40
42
+ * @returns {*}
43
+ */
44
+ static get routePath() {
45
+ return window.location.hash.replace('#', '');
46
+ }
47
+ /**
48
+ * 当前地址的全路径,包含域名和参数
49
+ * 如:http://172.16.103.120:30061/portalwebapp/#/index/appportalview?params=123
50
+ *
51
+ * @author lxm
52
+ * @date 2022-10-11 21:10:39
53
+ * @readonly
54
+ * @static
55
+ */
56
+ static get fullPath() {
57
+ return window.location.href;
58
+ }
59
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ibiz-template/core",
3
- "version": "0.0.1-alpha.13",
3
+ "version": "0.0.1-alpha.16",
4
4
  "description": "核心包",
5
5
  "main": "out/index.js",
6
6
  "types": "out/index.d.ts",
@@ -39,5 +39,5 @@
39
39
  "lodash-es": "^4.17.21",
40
40
  "qx-util": "^0.4.1"
41
41
  },
42
- "gitHead": "e72517e4226353804443c9a0cd7b40aaf0edf846"
42
+ "gitHead": "6e22ada91af231ce1add4b411418226b2ff85d3b"
43
43
  }
@@ -10,4 +10,5 @@ export const Environment: IEnvironment = {
10
10
  dcSystem: '',
11
11
  ExportFile: '/ibizutil/download',
12
12
  UploadFile: '/ibizutil/upload',
13
+ casLoginUrl: '',
13
14
  };
@@ -25,6 +25,15 @@ export interface IEnvironment {
25
25
  */
26
26
  baseUrl: string;
27
27
 
28
+ /**
29
+ * 中央认证登录地址
30
+ *
31
+ * @author lxm
32
+ * @date 2022-10-11 12:10:21
33
+ * @type {string}
34
+ */
35
+ casLoginUrl: string;
36
+
28
37
  /**
29
38
  * 远程模型路径
30
39
  *
@@ -4,3 +4,4 @@ export { IHttpResponse, HttpResponse } from './net/http-response';
4
4
  export { Net } from './net/net';
5
5
  export { plural, pluralLower } from './plural/plural';
6
6
  export * from './util/util';
7
+ export * from './url-helper/url-helper';
@@ -28,7 +28,7 @@ export interface IHttpResponse<T = IData> extends AxiosResponse {
28
28
  * @date 2022-08-18 15:08:44
29
29
  * @type {boolean}
30
30
  */
31
- local?: boolean;
31
+ local: boolean;
32
32
 
33
33
  data: T;
34
34
 
@@ -0,0 +1,62 @@
1
+ /**
2
+ * 路径解析助手
3
+ *
4
+ * @author lxm
5
+ * @date 2022-10-11 14:10:12
6
+ * @export
7
+ * @class UrlHelper
8
+ */
9
+ export class UrlHelper {
10
+ /**
11
+ * 路由路径前面的基础路径
12
+ * 如:http://172.16.103.120:30061/portalwebapp/#/index/appportalview?params=123
13
+ * 返回:http://172.16.103.120:30061/portalwebapp/#
14
+ *
15
+ * @author lxm
16
+ * @date 2022-10-11 20:10:29
17
+ * @returns {*}
18
+ */
19
+ static get routeBase() {
20
+ return `${this.appBase}/#`;
21
+ }
22
+
23
+ /**
24
+ * 应用的的基础路径
25
+ * 如:http://172.16.103.120:30061/portalwebapp/#/index/appportalview?params=123
26
+ * 返回:http://172.16.103.120:30061/portalwebapp
27
+ *
28
+ * @author lxm
29
+ * @date 2022-10-11 20:10:29
30
+ * @returns {*}
31
+ */
32
+ static get appBase() {
33
+ const { origin, pathname } = window.location;
34
+ return `${origin}${pathname}`.replace(/\/$/, '');
35
+ }
36
+
37
+ /**
38
+ * #开始到末尾,即路由地址
39
+ * 如:http://172.16.103.120:30061/portalwebapp/#/index/appportalview?params=123
40
+ * 返回:/index/appportalview?params=123
41
+ *
42
+ * @author lxm
43
+ * @date 2022-10-11 16:10:40
44
+ * @returns {*}
45
+ */
46
+ static get routePath() {
47
+ return window.location.hash.replace('#', '');
48
+ }
49
+
50
+ /**
51
+ * 当前地址的全路径,包含域名和参数
52
+ * 如:http://172.16.103.120:30061/portalwebapp/#/index/appportalview?params=123
53
+ *
54
+ * @author lxm
55
+ * @date 2022-10-11 21:10:39
56
+ * @readonly
57
+ * @static
58
+ */
59
+ static get fullPath() {
60
+ return window.location.href;
61
+ }
62
+ }