@das-fed/utils 7.0.3 → 7.0.4-test.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.
- package/api-services/modules/app-manage/index.js +717 -735
- package/api-services/modules/app-manage/index.js.gz +0 -0
- package/api-services/modules/enterpriseright/index.js +629 -625
- package/api-services/modules/enterpriseright/index.js.gz +0 -0
- package/api-services/modules/file/index.js +864 -882
- package/api-services/modules/file/index.js.gz +0 -0
- package/api-services/modules/permission/index.js +735 -717
- package/api-services/modules/permission/index.js.gz +0 -0
- package/api-services/modules/supplier/index.js +721 -735
- package/api-services/modules/supplier/index.js.gz +0 -0
- package/api-services/modules/supplychain-manage/index.js +733 -719
- package/api-services/modules/supplychain-manage/index.js.gz +0 -0
- package/api-services/modules/tool/index.js +733 -719
- package/api-services/modules/tool/index.js.gz +0 -0
- package/common-info/index.js +13 -12
- package/common-info/index.js.gz +0 -0
- package/common-info/type.d.ts +2 -0
- package/create-api-service/index.js +716 -734
- package/create-api-service/index.js.gz +0 -0
- package/create-api-service/sso/index.d.ts +1 -1
- package/create-api-service/sso/index.js +33 -36
- package/create-api-service/sso/index.js.gz +0 -0
- package/package.json +4 -4
|
Binary file
|
|
@@ -1683,22 +1683,22 @@ b.getAdapter = Tt.getAdapter;
|
|
|
1683
1683
|
b.HttpStatusCode = be;
|
|
1684
1684
|
b.default = b;
|
|
1685
1685
|
const {
|
|
1686
|
-
Axios:
|
|
1687
|
-
AxiosError:
|
|
1688
|
-
CanceledError:
|
|
1689
|
-
isCancel:
|
|
1690
|
-
CancelToken:
|
|
1691
|
-
VERSION:
|
|
1692
|
-
all:
|
|
1693
|
-
Cancel:
|
|
1694
|
-
isAxiosError:
|
|
1695
|
-
spread:
|
|
1696
|
-
toFormData:
|
|
1697
|
-
AxiosHeaders:
|
|
1698
|
-
HttpStatusCode:
|
|
1699
|
-
formToJSON:
|
|
1700
|
-
getAdapter:
|
|
1701
|
-
mergeConfig:
|
|
1686
|
+
Axios: Gr,
|
|
1687
|
+
AxiosError: Xr,
|
|
1688
|
+
CanceledError: Zr,
|
|
1689
|
+
isCancel: Yr,
|
|
1690
|
+
CancelToken: eo,
|
|
1691
|
+
VERSION: to,
|
|
1692
|
+
all: no,
|
|
1693
|
+
Cancel: ro,
|
|
1694
|
+
isAxiosError: oo,
|
|
1695
|
+
spread: so,
|
|
1696
|
+
toFormData: io,
|
|
1697
|
+
AxiosHeaders: ao,
|
|
1698
|
+
HttpStatusCode: co,
|
|
1699
|
+
formToJSON: uo,
|
|
1700
|
+
getAdapter: lo,
|
|
1701
|
+
mergeConfig: fo
|
|
1702
1702
|
} = b;
|
|
1703
1703
|
/*! js-cookie v3.0.5 | MIT */
|
|
1704
1704
|
function Q(e) {
|
|
@@ -1923,7 +1923,7 @@ const Y = (e) => new URL(location.href).searchParams.get(e), I = {
|
|
|
1923
1923
|
// 清除登录信息
|
|
1924
1924
|
token: "/api/justauth/oauth-server/v1/visitor/oauth/token"
|
|
1925
1925
|
// 通过code获取token
|
|
1926
|
-
}, { baseURL: Ze, noRedireLogin: Fr = !1 } = Oe(), $ = location.origin +
|
|
1926
|
+
}, { baseURL: Ze, noRedireLogin: Fr = !1 } = Oe(), Ir = "/home", $ = location.origin + Ir, F = {
|
|
1927
1927
|
response_type: "code",
|
|
1928
1928
|
scope: "sever",
|
|
1929
1929
|
client_id: "sys",
|
|
@@ -1946,11 +1946,11 @@ const Y = (e) => new URL(location.href).searchParams.get(e), I = {
|
|
|
1946
1946
|
};
|
|
1947
1947
|
localStorage.getItem("idelTime") && Nt(Number(localStorage.getItem("idelTime")));
|
|
1948
1948
|
let et = "";
|
|
1949
|
-
const
|
|
1950
|
-
const e = Y("code") || "", t = Y("redirect_url") || "", n = Y("kingdee_token") || "";
|
|
1949
|
+
const Br = async () => {
|
|
1950
|
+
const e = Y("code") || "", t = Y("redirect_url") || "/", n = Y("kingdee_token") || "";
|
|
1951
1951
|
if (!e) return v();
|
|
1952
1952
|
if (e === et)
|
|
1953
|
-
return Ye(["code", "state", "kingdee_token", "redirect_url"]),
|
|
1953
|
+
return Ye(["code", "state", "kingdee_token", "redirect_url"]), window.__isAutoCloseApp = !1, window.location.replace(decodeURIComponent(t)), v();
|
|
1954
1954
|
et = e, Ye(["code", "state", "kingdee_token", "redirect_url"]);
|
|
1955
1955
|
let r = {};
|
|
1956
1956
|
const o = {
|
|
@@ -1992,7 +1992,7 @@ const Ir = async () => {
|
|
|
1992
1992
|
} catch {
|
|
1993
1993
|
return z({ ...F, redirect_uri: $ });
|
|
1994
1994
|
}
|
|
1995
|
-
}, H = ee(!1),
|
|
1995
|
+
}, H = ee(!1), po = async (e) => {
|
|
1996
1996
|
if (e.public) return "";
|
|
1997
1997
|
if (Lt.value) return z({ ...F, redirect_uri: $ });
|
|
1998
1998
|
if (H.value)
|
|
@@ -2013,15 +2013,15 @@ const Ir = async () => {
|
|
|
2013
2013
|
let r = v();
|
|
2014
2014
|
H.value = !0;
|
|
2015
2015
|
try {
|
|
2016
|
-
typeof t == "number" && t > 0 && +/* @__PURE__ */ new Date() + 6e4 > t && (r = await
|
|
2016
|
+
typeof t == "number" && t > 0 && +/* @__PURE__ */ new Date() + 6e4 > t && (r = await Hr(F)), r = await Br(), H.value = !1;
|
|
2017
2017
|
} catch {
|
|
2018
2018
|
H.value = !1;
|
|
2019
2019
|
}
|
|
2020
2020
|
return r;
|
|
2021
|
-
},
|
|
2021
|
+
}, jr = () => {
|
|
2022
2022
|
let e = !1;
|
|
2023
2023
|
return localStorage.getItem("thirdLogouSource") === "zhongshen" && (e = !0), e;
|
|
2024
|
-
},
|
|
2024
|
+
}, qr = (e) => {
|
|
2025
2025
|
if (localStorage.getItem("thirdLogouSource") === "zhongshen") {
|
|
2026
2026
|
const r = `https://iam.shenyejituan.com:443/idp/profile/OAUTH2/Redirect/GLO?redirctToUrl=${encodeURIComponent(e)}&entityId=AIoT&redirectToLogin=true`;
|
|
2027
2027
|
localStorage.removeItem("thirdLogouSource"), location.href = r;
|
|
@@ -2032,8 +2032,8 @@ const Ir = async () => {
|
|
|
2032
2032
|
if (Re) return Re(e);
|
|
2033
2033
|
e.logout = "true", n && (e.locale = "locale");
|
|
2034
2034
|
const r = Object.keys(e).filter((s) => s !== "client_secret").map((s) => `${s}=${e[s]}`).join("&"), o = `${t}${I.oauth}?${r}`;
|
|
2035
|
-
if (localStorage.removeItem("idelTime"), sessionStorage.clear(), J().remove(),
|
|
2036
|
-
|
|
2035
|
+
if (localStorage.removeItem("idelTime"), sessionStorage.clear(), J().remove(), jr())
|
|
2036
|
+
qr(o);
|
|
2037
2037
|
else {
|
|
2038
2038
|
try {
|
|
2039
2039
|
b.create().get(I.logoutCurpage, { baseURL: t });
|
|
@@ -2043,7 +2043,7 @@ const Ir = async () => {
|
|
|
2043
2043
|
}
|
|
2044
2044
|
};
|
|
2045
2045
|
vr(z);
|
|
2046
|
-
const
|
|
2046
|
+
const Hr = async (e) => {
|
|
2047
2047
|
const { baseURL: t } = Oe(), { refreshToken: n } = J().getData();
|
|
2048
2048
|
try {
|
|
2049
2049
|
await b.create().get(I.token, { baseURL: t });
|
|
@@ -2081,13 +2081,10 @@ const qr = async (e) => {
|
|
|
2081
2081
|
refreshToken: ue("refreshToken")
|
|
2082
2082
|
}),
|
|
2083
2083
|
save: (e) => {
|
|
2084
|
-
Bt(
|
|
2085
|
-
e.
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
refreshToken: e.refreshToken
|
|
2089
|
-
}
|
|
2090
|
-
), qt(e);
|
|
2084
|
+
Bt(e.accessToken ?? "", {
|
|
2085
|
+
accessTokenExpiredAt: e.accessTokenExpiredAt,
|
|
2086
|
+
refreshToken: e.refreshToken
|
|
2087
|
+
}), qt(e);
|
|
2091
2088
|
},
|
|
2092
2089
|
remove: () => {
|
|
2093
2090
|
It(), jt();
|
|
@@ -2095,8 +2092,8 @@ const qr = async (e) => {
|
|
|
2095
2092
|
});
|
|
2096
2093
|
export {
|
|
2097
2094
|
Y as getQuery,
|
|
2098
|
-
|
|
2099
|
-
|
|
2095
|
+
po as getToken,
|
|
2096
|
+
Br as getTokenFromCode,
|
|
2100
2097
|
F as getTokenParams,
|
|
2101
2098
|
z as login,
|
|
2102
2099
|
$ as real_uri,
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@das-fed/utils",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.4-test.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"license": "ISC",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@antv/x6": "^2.18.1",
|
|
12
|
-
"@das-fed/utils": "7.0.
|
|
12
|
+
"@das-fed/utils": "7.0.4-test.1",
|
|
13
13
|
"@vue/shared": "^3.4.21",
|
|
14
14
|
"@vueuse/core": "^9.6.0",
|
|
15
15
|
"axios": "^1.6.7",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"vue": "^3.4.21"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@das-fed/cli": "7.0.
|
|
25
|
-
"@das-fed/web": "7.0.
|
|
24
|
+
"@das-fed/cli": "7.0.4-test.1",
|
|
25
|
+
"@das-fed/web": "7.0.4-test.1",
|
|
26
26
|
"@types/js-cookie": "^3.0.6",
|
|
27
27
|
"@types/lodash-es": "^4.17.12",
|
|
28
28
|
"@types/qs": "^6.9.15",
|