yuang-framework-ui-common 1.0.80 → 1.0.82

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.
@@ -60,4 +60,6 @@ export interface FrameworkBaseQueryParam {
60
60
  uimsApplicationIdForEqual?: string;
61
61
  /** 上级id */
62
62
  parentIdForEqual?: string;
63
+ /** id */
64
+ idForEqual?: string;
63
65
  }
@@ -17,6 +17,8 @@ export interface FrameworkLog extends FrameworkBase {
17
17
 
18
18
  /** 请求id */
19
19
  requestId?: string;
20
+ /** 请求设备 */
21
+ requestDevice?: string;
20
22
  /** 请求操作系统 */
21
23
  requestOs?: string;
22
24
 
@@ -0,0 +1,22 @@
1
+ import type { FrameworkBase, FrameworkBaseQueryParam } from '../framework/frameworkBase';
2
+
3
+ /**
4
+ * 网关路由
5
+ */
6
+ export interface GatewayRoute extends FrameworkBase {
7
+ routeId?: string;
8
+ name?: string;
9
+ forwardTargetUrl?: string;
10
+ predicateRoutePath?: string;
11
+ status?: number;
12
+
13
+ }
14
+
15
+ /**
16
+ * 网关路由搜索条件
17
+ */
18
+ export interface UimsApiQueryParam extends FrameworkBaseQueryParam {
19
+ identifierForLike?: string;
20
+ nameForLike?: string;
21
+ statusForEqual?: number;
22
+ }
@@ -17,6 +17,14 @@ const getAesRandomKey = () => {
17
17
  return randomKey
18
18
  }
19
19
 
20
+ /**
21
+ * 获取Aec静态key
22
+ */
23
+ const getAesStaticKey = () => {
24
+ return "yuang-framework$";
25
+ }
26
+
27
+
20
28
  /**
21
29
  * aes加密
22
30
  * @param aesKey
@@ -52,6 +60,7 @@ const aesDecrypt = (aesKey:string, originalData:string) => {
52
60
 
53
61
  export {
54
62
  getAesRandomKey,
63
+ getAesStaticKey,
55
64
  aesEncrypt,
56
65
  aesDecrypt
57
66
  }
@@ -91,6 +91,7 @@ const getSsoEncryptList = (passwordList = []) => {
91
91
 
92
92
 
93
93
  const ssoAccessTokenCookieKey: string = 'Sso-Access-Token';
94
+ const ssoRefreshTokenCookieKey: string = 'Sso-Refresh-Token';
94
95
  const ssoAccessTokenLocalKey: string = 'ssoAccessToken';
95
96
  const ssoRefreshTokenLocalKey: string = 'ssoRefreshToken';
96
97
 
@@ -153,6 +154,7 @@ const setSsoCookieAccessToken = (param: any) => {
153
154
 
154
155
  const clearSsoAccessToken = () => {
155
156
  Cookies.remove(ssoAccessTokenCookieKey);
157
+ Cookies.remove(ssoRefreshTokenCookieKey);
156
158
 
157
159
  removeLocalStorageItem(ssoAccessTokenLocalKey);
158
160
  removeLocalStorageItem(ssoRefreshTokenLocalKey);
@@ -2,7 +2,7 @@
2
2
  * 判断session存储数据是否过期
3
3
  * @param key
4
4
  */
5
- const isSessionStorageExpired = (key) => {
5
+ const isSessionStorageExpired = (key: string) => {
6
6
  const value = sessionStorage.getItem(key);
7
7
  if (!value) {
8
8
  return false;
@@ -27,7 +27,7 @@ const isSessionStorageExpired = (key) => {
27
27
  * @param value
28
28
  * @param expiresTime 过期时间,单位:秒
29
29
  */
30
- const setSessionStorageItem = (key, value, expiresTime) => {
30
+ const setSessionStorageItem = (key: string, value: string, expiresTime: number) => {
31
31
  if(!key) {
32
32
  console.error('参数[key]为空')
33
33
  return;
@@ -45,7 +45,7 @@ const setSessionStorageItem = (key, value, expiresTime) => {
45
45
  * 获取session存储数据
46
46
  * @param key
47
47
  */
48
- const getSessionStorageItem = (key) => {
48
+ const getSessionStorageItem = (key: string) => {
49
49
  if (isSessionStorageExpired(key)) {
50
50
  return null;
51
51
  }
@@ -64,7 +64,7 @@ const getSessionStorageItem = (key) => {
64
64
  * 删除session存储数据
65
65
  * @param key
66
66
  */
67
- const removeSessionStorageItem = (key) => {
67
+ const removeSessionStorageItem = (key: string) => {
68
68
  sessionStorage.removeItem(key);
69
69
  }
70
70
 
@@ -73,7 +73,7 @@ const removeSessionStorageItem = (key) => {
73
73
  * 判断local存储数据是否过期
74
74
  * @param key
75
75
  */
76
- const isLocalStorageExpired = (key) => {
76
+ const isLocalStorageExpired = (key: string) => {
77
77
  const value = localStorage.getItem(key);
78
78
  if (!value) {
79
79
  return false;
@@ -99,7 +99,7 @@ const isLocalStorageExpired = (key) => {
99
99
  * @param value
100
100
  * @param expiresTime 过期时间,单位:秒
101
101
  */
102
- const setLocalStorageItem = (key, value, expiresTime) => {
102
+ const setLocalStorageItem = (key: string, value: string, expiresTime: number) => {
103
103
  if(!key) {
104
104
  console.error('参数[key]为空')
105
105
  return;
@@ -117,7 +117,7 @@ const setLocalStorageItem = (key, value, expiresTime) => {
117
117
  * 获取local存储数据
118
118
  * @param key
119
119
  */
120
- const getLocalStorageItem = (key) => {
120
+ const getLocalStorageItem = (key: string) => {
121
121
  if (isLocalStorageExpired(key)) {
122
122
  return null;
123
123
  }
@@ -136,7 +136,7 @@ const getLocalStorageItem = (key) => {
136
136
  * 删除local存储数据
137
137
  * @param key
138
138
  */
139
- const removeLocalStorageItem = (key) => {
139
+ const removeLocalStorageItem = (key: string) => {
140
140
  localStorage.removeItem(key);
141
141
  }
142
142
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yuang-framework-ui-common",
3
- "version": "1.0.80",
3
+ "version": "1.0.82",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "scripts": {
package/dist/favicon.ico DELETED
Binary file
@@ -1,4 +0,0 @@
1
- const e = {};
2
- export {
3
- e as default
4
- };
@@ -1 +0,0 @@
1
- (function(e,n){typeof exports=="object"&&typeof module<"u"?module.exports=n():typeof define=="function"&&define.amd?define(n):(e=typeof globalThis<"u"?globalThis:e||self,e["yuang-framework-ui-common"]=n())})(this,function(){"use strict";return{}});