@das-fed/utils 7.0.5 → 7.0.7-beta.1

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 (68) hide show
  1. package/api-services/index.js +560 -541
  2. package/api-services/index.js.gz +0 -0
  3. package/api-services/modules/app-manage/index.js +350 -331
  4. package/api-services/modules/app-manage/index.js.gz +0 -0
  5. package/api-services/modules/authentication/index.js +350 -331
  6. package/api-services/modules/authentication/index.js.gz +0 -0
  7. package/api-services/modules/bems/index.js +712 -697
  8. package/api-services/modules/bems/index.js.gz +0 -0
  9. package/api-services/modules/contract/index.js +350 -331
  10. package/api-services/modules/contract/index.js.gz +0 -0
  11. package/api-services/modules/duty-manage/index.js +868 -831
  12. package/api-services/modules/duty-manage/index.js.gz +0 -0
  13. package/api-services/modules/enterpriseright/index.js +880 -843
  14. package/api-services/modules/enterpriseright/index.js.gz +0 -0
  15. package/api-services/modules/file/index.js +573 -554
  16. package/api-services/modules/file/index.js.gz +0 -0
  17. package/api-services/modules/gateway-edge/index.js +834 -833
  18. package/api-services/modules/gateway-edge/index.js.gz +0 -0
  19. package/api-services/modules/index.js +1022 -985
  20. package/api-services/modules/index.js.gz +0 -0
  21. package/api-services/modules/iot/index.js +1200 -1163
  22. package/api-services/modules/iot/index.js.gz +0 -0
  23. package/api-services/modules/justauth/index.js +431 -412
  24. package/api-services/modules/justauth/index.js.gz +0 -0
  25. package/api-services/modules/knowledge/index.js +350 -331
  26. package/api-services/modules/knowledge/index.js.gz +0 -0
  27. package/api-services/modules/link/index.js +350 -331
  28. package/api-services/modules/link/index.js.gz +0 -0
  29. package/api-services/modules/permission/index.js +350 -331
  30. package/api-services/modules/permission/index.js.gz +0 -0
  31. package/api-services/modules/platformManage/index.js +350 -331
  32. package/api-services/modules/platformManage/index.js.gz +0 -0
  33. package/api-services/modules/portal/index.js +350 -331
  34. package/api-services/modules/portal/index.js.gz +0 -0
  35. package/api-services/modules/space-manage/index.js +874 -841
  36. package/api-services/modules/space-manage/index.js.gz +0 -0
  37. package/api-services/modules/super-admin/index.js +867 -830
  38. package/api-services/modules/super-admin/index.js.gz +0 -0
  39. package/api-services/modules/supplier/index.js +866 -829
  40. package/api-services/modules/supplier/index.js.gz +0 -0
  41. package/api-services/modules/supplychain-manage/index.js +350 -331
  42. package/api-services/modules/supplychain-manage/index.js.gz +0 -0
  43. package/api-services/modules/systemConfiguration/index.js +834 -833
  44. package/api-services/modules/systemConfiguration/index.js.gz +0 -0
  45. package/api-services/modules/tool/index.js +880 -843
  46. package/api-services/modules/tool/index.js.gz +0 -0
  47. package/api-services/src/create-service/index.js +350 -331
  48. package/api-services/src/create-service/index.js.gz +0 -0
  49. package/common-info/index.js +13 -12
  50. package/common-info/index.js.gz +0 -0
  51. package/common-info/set-personal-info/index.js +243 -227
  52. package/common-info/set-personal-info/index.js.gz +0 -0
  53. package/common-info/type.d.ts +2 -0
  54. package/common-tools/extract-file-name/index.js +566 -550
  55. package/common-tools/extract-file-name/index.js.gz +0 -0
  56. package/common-tools/platform-tools/index.d.ts +1 -1
  57. package/common-tools/platform-tools/index.js +22 -15
  58. package/create-api-service/index.js +350 -331
  59. package/create-api-service/index.js.gz +0 -0
  60. package/create-api-service/sso/index.d.ts +1 -1
  61. package/create-api-service/sso/index.js +334 -321
  62. package/create-api-service/sso/index.js.gz +0 -0
  63. package/curring-http/index.js +582 -566
  64. package/curring-http/index.js.gz +0 -0
  65. package/package.json +4 -4
  66. package/style/index.js +1 -1
  67. package/style/index.js.gz +0 -0
  68. package/vue/hooks/use-model-value/index.d.ts +5 -1
@@ -9,7 +9,7 @@ export declare const isRelativeOrSameDomain: (url: string) => boolean;
9
9
  * @param url
10
10
  * @returns
11
11
  */
12
- export declare const setShowLayout: (url: string) => string;
12
+ export declare const setShowLayout: (url: string) => any;
13
13
  export declare const setShowWatermark: (url: string) => string;
14
14
  /**
15
15
  * url携带token
@@ -1,19 +1,26 @@
1
- import { getToken as s } from "@das-fed/utils/common-info";
2
- const o = (e) => !!(!e.startsWith("http") || e.startsWith(location.origin)), n = (e) => {
3
- if (!e) return "";
4
- let t = e;
5
- return o(e) && !e.includes("showLayout=false") && (t = e.indexOf("?") !== -1 ? e + "&showLayout=false" : e + "?showLayout=false"), t;
6
- }, i = (e) => {
7
- if (!e) return "";
8
- let t = "";
9
- return o(e) && !e.includes("showWatermark=false") ? t = e.indexOf("?") !== -1 ? e + "&showWatermark=false" : e + "?showWatermark=false" : t = e, t;
10
- }, r = (e) => {
11
- const t = s();
12
- return e.includes("?") ? `${e}&token=${t}` : `${e}?token=${t}`;
1
+ import { getToken as n } from "@das-fed/utils/common-info";
2
+ const o = (t) => {
3
+ try {
4
+ return new URL(t, location.origin).origin === location.origin;
5
+ } catch {
6
+ return !0;
7
+ }
8
+ }, r = (t) => {
9
+ if (!t) return "";
10
+ if (!o(t)) return t;
11
+ const e = new URL(t, location.origin);
12
+ return e.searchParams.has("showLayout") || e.searchParams.set("showLayout", "false"), e.toString();
13
+ }, s = (t) => {
14
+ if (!t) return "";
15
+ let e = "";
16
+ return o(t) && !t.includes("showWatermark=false") ? e = t.indexOf("?") !== -1 ? t + "&showWatermark=false" : t + "?showWatermark=false" : e = t, e;
17
+ }, i = (t) => {
18
+ const e = n();
19
+ return t.includes("?") ? `${t}&token=${e}` : `${t}?token=${e}`;
13
20
  };
14
21
  export {
15
22
  o as isRelativeOrSameDomain,
16
- n as setShowLayout,
17
- i as setShowWatermark,
18
- r as withToken
23
+ r as setShowLayout,
24
+ s as setShowWatermark,
25
+ i as withToken
19
26
  };