@das-fed/utils 6.4.0-hot.23 → 6.4.0-hot.25

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.
Binary file
@@ -1844,13 +1844,13 @@ const _t = (e) => new URL(location.href).searchParams.get(e), _e = {
1844
1844
  // 重定向到登录页
1845
1845
  token: "/api/justauth/oauth-server/v1/visitor/oauth/token"
1846
1846
  // 通过code获取token
1847
- }, { baseURL: kr, noRedireLogin: Cr = !1 } = be(), z = `${location.origin}/`, F = {
1847
+ }, { baseURL: kr, noRedireLogin: Cr = !1 } = be(), Nr = "/application", z = location.origin + Nr, F = {
1848
1848
  response_type: "code",
1849
1849
  scope: "sever",
1850
1850
  client_id: "sys",
1851
1851
  client_secret: Lt("das123"),
1852
1852
  state: +/* @__PURE__ */ new Date()
1853
- }, Nr = () => {
1853
+ }, Lr = () => {
1854
1854
  const e = Ge(location.href, "redirect_url") || "";
1855
1855
  if (e)
1856
1856
  window.__isAutoCloseApp = !1, window.location.replace(decodeURIComponent(e));
@@ -1869,7 +1869,7 @@ const _t = (e) => new URL(location.href).searchParams.get(e), _e = {
1869
1869
  );
1870
1870
  };
1871
1871
  localStorage.getItem("idelTime") && Pt(Number(localStorage.getItem("idelTime")));
1872
- const Lr = async () => {
1872
+ const Ur = async () => {
1873
1873
  const e = _t("code") || "";
1874
1874
  if (!e) return M();
1875
1875
  const { redirectUri: t } = B().getData(), n = Ge(location.href, "kingdee_token") || "";
@@ -1902,11 +1902,11 @@ const Lr = async () => {
1902
1902
  };
1903
1903
  B().save(l), await Ze(o);
1904
1904
  const u = Number(f) - (/* @__PURE__ */ new Date()).getTime();
1905
- return u && u > 0 && (Pt(u), u && localStorage.setItem("idelTime", u.toString())), Nr(), o;
1905
+ return u && u > 0 && (Pt(u), u && localStorage.setItem("idelTime", u.toString())), Lr(), o;
1906
1906
  } catch {
1907
1907
  return $({ ...F, redirect_uri: t || z });
1908
1908
  }
1909
- }, q = X(!1), Mr = async (e) => {
1909
+ }, q = X(!1), Hr = async (e) => {
1910
1910
  if (e.public) return "";
1911
1911
  if (xt.value) return $({ ...F, redirect_uri: z });
1912
1912
  if (q.value)
@@ -1927,7 +1927,7 @@ const Lr = async () => {
1927
1927
  let r = M();
1928
1928
  q.value = !0;
1929
1929
  try {
1930
- typeof t == "number" && t > 0 && +/* @__PURE__ */ new Date() + 6e4 > t && (r = await Ur(F)), r = await Lr(), q.value = !1;
1930
+ typeof t == "number" && t > 0 && +/* @__PURE__ */ new Date() + 6e4 > t && (r = await Dr(F)), r = await Ur(), q.value = !1;
1931
1931
  } catch {
1932
1932
  q.value = !1;
1933
1933
  }
@@ -1941,7 +1941,7 @@ const Lr = async () => {
1941
1941
  Xe(), sessionStorage.clear(), localStorage.removeItem("idelTime"), B().save({ redirectUri: e.redirect_uri }), window.__isAutoCloseApp = !1, location.replace(s);
1942
1942
  };
1943
1943
  Pr($);
1944
- const Ur = async (e) => {
1944
+ const Dr = async (e) => {
1945
1945
  const { baseURL: t } = be(), { refreshToken: n, redirectUri: r } = B().getData();
1946
1946
  try {
1947
1947
  const s = await E.create().post(
@@ -1989,8 +1989,8 @@ const Ur = async (e) => {
1989
1989
  });
1990
1990
  export {
1991
1991
  _t as getQuery,
1992
- Mr as getToken,
1993
- Lr as getTokenFromCode,
1992
+ Hr as getToken,
1993
+ Ur as getTokenFromCode,
1994
1994
  F as getTokenParams,
1995
1995
  $ as login,
1996
1996
  z as real_uri,
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@das-fed/utils",
3
- "version": "6.4.0-hot.23",
3
+ "version": "6.4.0-hot.25",
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": "6.4.0-hot.23",
12
+ "@das-fed/utils": "6.4.0-hot.25",
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": "6.4.0-hot.23",
25
- "@das-fed/web": "6.4.0-hot.23",
24
+ "@das-fed/cli": "6.4.0-hot.25",
25
+ "@das-fed/web": "6.4.0-hot.25",
26
26
  "@types/js-cookie": "^3.0.6",
27
27
  "@types/lodash-es": "^4.17.12",
28
28
  "@types/qs": "^6.9.15",