@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.
Files changed (54) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/ind-utils.es.js +18 -11
  3. package/dist/ind-utils.umd.cjs +13 -13
  4. package/package.json +3 -3
  5. package/src/utils/token.ts +23 -11
  6. package/types/api/com.d.ts +2 -4
  7. package/types/api/index-desc.d.ts +2 -4
  8. package/types/api/index.d.ts +7 -7
  9. package/types/api/item.d.ts +4 -6
  10. package/types/api/permission.d.ts +2 -2
  11. package/types/api/platform/base64.d.ts +5 -5
  12. package/types/api/platform/config.d.ts +2 -2
  13. package/types/api/platform/dict.d.ts +4 -6
  14. package/types/api/platform/index.d.ts +6 -6
  15. package/types/api/platform/menu.d.ts +11 -21
  16. package/types/api/platform/oss.d.ts +8 -16
  17. package/types/api/platform/user.d.ts +12 -19
  18. package/types/api/user.d.ts +2 -2
  19. package/types/config/base.config.d.ts +33 -33
  20. package/types/config/dev.config.d.ts +3 -3
  21. package/types/config/index.d.ts +6 -6
  22. package/types/config/prod.config.d.ts +3 -3
  23. package/types/index.d.ts +4 -4
  24. package/types/utils/base64.d.ts +22 -22
  25. package/types/utils/blob.d.ts +3 -3
  26. package/types/utils/cache/dict-cache.d.ts +3 -3
  27. package/types/utils/cache/index-desc.d.ts +4 -4
  28. package/types/utils/cache/index.d.ts +4 -4
  29. package/types/utils/cache/permission-cache.d.ts +4 -4
  30. package/types/utils/cache/user-cache.d.ts +4 -4
  31. package/types/utils/date.d.ts +4 -4
  32. package/types/utils/enum.d.ts +39 -43
  33. package/types/utils/event.d.ts +5 -13
  34. package/types/utils/excel.d.ts +5 -5
  35. package/types/utils/half-year.d.ts +6 -6
  36. package/types/utils/index.d.ts +20 -20
  37. package/types/utils/is-type.d.ts +33 -33
  38. package/types/utils/mime-type.d.ts +67 -67
  39. package/types/utils/number.d.ts +8 -8
  40. package/types/utils/quarter.d.ts +7 -7
  41. package/types/utils/request/axios.extends.d.ts +6 -18
  42. package/types/utils/request/cache-rules.d.ts +3 -3
  43. package/types/utils/request/content-type.d.ts +9 -9
  44. package/types/utils/request/index.d.ts +9 -9
  45. package/types/utils/request/interceptors.d.ts +4 -4
  46. package/types/utils/request/url-params.d.ts +6 -6
  47. package/types/utils/sm3/index.d.ts +6 -6
  48. package/types/utils/sm3/sm3.d.ts +3 -3
  49. package/types/utils/storage.d.ts +8 -8
  50. package/types/utils/table.d.ts +31 -40
  51. package/types/utils/token.d.ts +3 -3
  52. package/types/utils/token.d.ts.map +1 -1
  53. package/types/utils/uuid.d.ts +4 -4
  54. 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
 
@@ -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
- Cookie.set("TOKEN_KEY", token, 1);
4542
- Cookie.set("lambo-sso-key", token, 1);
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 (!token) {
4547
- token = Cookie.get("lambo-sso-key");
4548
- }
4549
- if (!token) {
4550
- token = Cookie.get("TOKEN_KEY");
4551
- }
4552
- if (!token) {
4553
- token = getLocalStorage(TOKEN_KEY);
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
  }