@indfnd/utils 0.1.39 → 0.1.41
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/CHANGELOG.md +14 -0
- package/dist/ind-utils.es.js +18 -11
- package/dist/ind-utils.umd.cjs +13 -13
- package/package.json +3 -3
- package/src/utils/token.ts +23 -11
- package/types/api/com.d.ts +2 -4
- package/types/api/index-desc.d.ts +2 -4
- package/types/api/index.d.ts +7 -7
- package/types/api/item.d.ts +4 -6
- package/types/api/permission.d.ts +2 -2
- package/types/api/platform/base64.d.ts +5 -5
- package/types/api/platform/config.d.ts +2 -2
- package/types/api/platform/dict.d.ts +4 -6
- package/types/api/platform/index.d.ts +6 -6
- package/types/api/platform/menu.d.ts +11 -21
- package/types/api/platform/oss.d.ts +8 -16
- package/types/api/platform/user.d.ts +12 -19
- package/types/api/user.d.ts +2 -2
- package/types/config/base.config.d.ts +33 -33
- package/types/config/dev.config.d.ts +3 -3
- package/types/config/index.d.ts +6 -6
- package/types/config/prod.config.d.ts +3 -3
- package/types/index.d.ts +4 -4
- package/types/utils/base64.d.ts +22 -22
- package/types/utils/blob.d.ts +3 -3
- package/types/utils/cache/dict-cache.d.ts +3 -3
- package/types/utils/cache/index-desc.d.ts +4 -4
- package/types/utils/cache/index.d.ts +4 -4
- package/types/utils/cache/permission-cache.d.ts +4 -4
- package/types/utils/cache/user-cache.d.ts +4 -4
- package/types/utils/date.d.ts +4 -4
- package/types/utils/enum.d.ts +39 -43
- package/types/utils/event.d.ts +5 -13
- package/types/utils/excel.d.ts +5 -5
- package/types/utils/half-year.d.ts +6 -6
- package/types/utils/index.d.ts +20 -20
- package/types/utils/is-type.d.ts +33 -33
- package/types/utils/mime-type.d.ts +67 -67
- package/types/utils/number.d.ts +8 -8
- package/types/utils/quarter.d.ts +7 -7
- package/types/utils/request/axios.extends.d.ts +6 -18
- package/types/utils/request/cache-rules.d.ts +3 -3
- package/types/utils/request/content-type.d.ts +9 -9
- package/types/utils/request/index.d.ts +9 -9
- package/types/utils/request/interceptors.d.ts +4 -4
- package/types/utils/request/url-params.d.ts +6 -6
- package/types/utils/sm3/index.d.ts +6 -6
- package/types/utils/sm3/sm3.d.ts +3 -3
- package/types/utils/storage.d.ts +8 -8
- package/types/utils/table.d.ts +31 -40
- package/types/utils/token.d.ts +3 -3
- package/types/utils/token.d.ts.map +1 -1
- package/types/utils/uuid.d.ts +4 -4
- package/types/utils/validate.d.ts +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.1.41](http://git.inspur.com/imp-ec/ind-front/ind-utils/compare/v0.1.40...v0.1.41) (2026-03-24)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* 修改token逻辑 ([8109018](http://git.inspur.com/imp-ec/ind-front/ind-utils/commit/81090187f9ede0e90635b73056318d3e5f899396))
|
|
11
|
+
|
|
12
|
+
### [0.1.40](http://git.inspur.com/imp-ec/ind-front/ind-utils/compare/v0.1.39...v0.1.40) (2026-03-19)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* 升级axios ([3ea2a37](http://git.inspur.com/imp-ec/ind-front/ind-utils/commit/3ea2a37b7ff6eae81ebdb6545e3c49c2c3f4c90e))
|
|
18
|
+
|
|
5
19
|
### [0.1.39](http://git.inspur.com/imp-ec/ind-front/ind-utils/compare/v0.1.38...v0.1.39) (2026-03-09)
|
|
6
20
|
|
|
7
21
|
|
package/dist/ind-utils.es.js
CHANGED
|
@@ -4535,22 +4535,29 @@ const CONTENT_TYPE = {
|
|
|
4535
4535
|
};
|
|
4536
4536
|
const TOKEN_KEY = "v8-token";
|
|
4537
4537
|
const TOKEN_KEY_IBP = "lambo-token";
|
|
4538
|
+
function isHb$3() {
|
|
4539
|
+
return window.location.pathname.includes("scyxweb");
|
|
4540
|
+
}
|
|
4538
4541
|
function setToken(token) {
|
|
4539
|
-
setLocalStorage(TOKEN_KEY, token);
|
|
4540
4542
|
setSessionStorage(TOKEN_KEY_IBP, token);
|
|
4541
|
-
|
|
4542
|
-
|
|
4543
|
+
if (!isHb$3) {
|
|
4544
|
+
setLocalStorage(TOKEN_KEY, token);
|
|
4545
|
+
Cookie.set("TOKEN_KEY", token, 1);
|
|
4546
|
+
Cookie.set("lambo-sso-key", token, 1);
|
|
4547
|
+
}
|
|
4543
4548
|
}
|
|
4544
4549
|
function getToken() {
|
|
4545
4550
|
let token = getSessionStorage(TOKEN_KEY_IBP);
|
|
4546
|
-
if (!
|
|
4547
|
-
|
|
4548
|
-
|
|
4549
|
-
|
|
4550
|
-
|
|
4551
|
-
|
|
4552
|
-
|
|
4553
|
-
|
|
4551
|
+
if (!isHb$3) {
|
|
4552
|
+
if (!token) {
|
|
4553
|
+
token = Cookie.get("lambo-sso-key");
|
|
4554
|
+
}
|
|
4555
|
+
if (!token) {
|
|
4556
|
+
token = Cookie.get("TOKEN_KEY");
|
|
4557
|
+
}
|
|
4558
|
+
if (!token) {
|
|
4559
|
+
token = getLocalStorage(TOKEN_KEY);
|
|
4560
|
+
}
|
|
4554
4561
|
}
|
|
4555
4562
|
return token || false;
|
|
4556
4563
|
}
|