@das-fed/utils 7.0.5-test.6 → 7.0.5-test.7
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/index.js +843 -830
- package/api-services/index.js.gz +0 -0
- package/api-services/modules/app-manage/index.js +2 -7
- package/api-services/modules/app-manage/index.js.gz +0 -0
- package/api-services/modules/authentication/index.js +2 -7
- package/api-services/modules/authentication/index.js.gz +0 -0
- package/api-services/modules/bems/index.js +747 -734
- package/api-services/modules/bems/index.js.gz +0 -0
- package/api-services/modules/contract/index.js +2 -7
- package/api-services/modules/contract/index.js.gz +0 -0
- package/api-services/modules/duty-manage/index.js +742 -729
- package/api-services/modules/duty-manage/index.js.gz +0 -0
- package/api-services/modules/enterpriseright/index.js +626 -627
- package/api-services/modules/enterpriseright/index.js.gz +0 -0
- package/api-services/modules/file/index.js +767 -754
- package/api-services/modules/file/index.js.gz +0 -0
- package/api-services/modules/gateway-edge/index.js +2 -7
- package/api-services/modules/gateway-edge/index.js.gz +0 -0
- package/api-services/modules/index.js +2 -7
- package/api-services/modules/index.js.gz +0 -0
- package/api-services/modules/iot/index.js +1003 -990
- package/api-services/modules/iot/index.js.gz +0 -0
- package/api-services/modules/justauth/index.js +727 -750
- package/api-services/modules/justauth/index.js.gz +0 -0
- package/api-services/modules/knowledge/index.js +2 -7
- package/api-services/modules/knowledge/index.js.gz +0 -0
- package/api-services/modules/link/index.js +2 -7
- package/api-services/modules/link/index.js.gz +0 -0
- package/api-services/modules/permission/index.js +2 -7
- package/api-services/modules/permission/index.js.gz +0 -0
- package/api-services/modules/platformManage/index.js +2 -7
- package/api-services/modules/platformManage/index.js.gz +0 -0
- package/api-services/modules/portal/index.js +717 -708
- package/api-services/modules/portal/index.js.gz +0 -0
- package/api-services/modules/space-manage/index.js +2 -7
- package/api-services/modules/space-manage/index.js.gz +0 -0
- package/api-services/modules/super-admin/index.js +728 -751
- package/api-services/modules/super-admin/index.js.gz +0 -0
- package/api-services/modules/supplier/index.js +2 -7
- package/api-services/modules/supplier/index.js.gz +0 -0
- package/api-services/modules/supplychain-manage/index.js +744 -731
- package/api-services/modules/supplychain-manage/index.js.gz +0 -0
- package/api-services/modules/systemConfiguration/index.js +744 -731
- package/api-services/modules/systemConfiguration/index.js.gz +0 -0
- package/api-services/modules/tool/index.js +744 -731
- package/api-services/modules/tool/index.js.gz +0 -0
- package/api-services/src/create-service/index.js +2 -7
- package/api-services/src/create-service/index.js.gz +0 -0
- package/common-info/getInfoFromUrl/index.js +36 -36
- package/common-info/getInfoFromUrl/index.js.gz +0 -0
- package/common-info/set-personal-info/index.js +44 -49
- package/common-info/set-personal-info/index.js.gz +0 -0
- package/common-tools/extract-file-name/index.js +2 -7
- package/common-tools/extract-file-name/index.js.gz +0 -0
- package/create-api-service/index.js +2 -7
- package/create-api-service/index.js.gz +0 -0
- package/create-api-service/sso/index.js +77 -86
- package/create-api-service/sso/index.js.gz +0 -0
- package/curring-http/index.js +47 -52
- package/curring-http/index.js.gz +0 -0
- package/package.json +4 -4
- package/pinyin-first-character/index.js +1 -1
- package/pinyin-first-character/index.js.gz +0 -0
- package/webSocket-service/index.js +40 -50
- package/webSocket-service/index.js.gz +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { unref as vt, getCurrentScope as Bt, onScopeDispose as jt, ref as ne, watch as
|
|
1
|
+
import { unref as vt, getCurrentScope as Bt, onScopeDispose as jt, ref as ne, watch as xe } from "vue";
|
|
2
2
|
import { encryption as qt } from "@das-fed/utils/atob";
|
|
3
3
|
import { getConfig as se } from "@das-fed/utils/config";
|
|
4
|
-
import { getAccessToken as
|
|
5
|
-
import { appendQueryParams as
|
|
6
|
-
import { removeProcessEngineToken as
|
|
4
|
+
import { getAccessToken as $, removeAccessToken as Mt, setAccessToken as Ht, getAccessTokenInfo as de } from "@das-fed/utils/token-tools";
|
|
5
|
+
import { appendQueryParams as Ce } from "@das-fed/utils/common-tools";
|
|
6
|
+
import { removeProcessEngineToken as $t, setProcessEngineToken as zt } from "@das-fed/utils/process-engine-info";
|
|
7
7
|
import { setPersonalInfo as st } from "@das-fed/utils/common-info/set-personal-info";
|
|
8
8
|
function it(e, t) {
|
|
9
9
|
return function() {
|
|
@@ -13,11 +13,11 @@ function it(e, t) {
|
|
|
13
13
|
const { toString: Jt } = Object.prototype, { getPrototypeOf: ke } = Object, { iterator: ie, toStringTag: at } = Symbol, ae = /* @__PURE__ */ ((e) => (t) => {
|
|
14
14
|
const n = Jt.call(t);
|
|
15
15
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
16
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
16
|
+
})(/* @__PURE__ */ Object.create(null)), x = (e) => (e = e.toLowerCase(), (t) => ae(t) === e), ce = (e) => (t) => typeof t === e, { isArray: q } = Array, z = ce("undefined");
|
|
17
17
|
function V(e) {
|
|
18
18
|
return e !== null && !z(e) && e.constructor !== null && !z(e.constructor) && A(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
19
19
|
}
|
|
20
|
-
const ct =
|
|
20
|
+
const ct = x("ArrayBuffer");
|
|
21
21
|
function Vt(e) {
|
|
22
22
|
let t;
|
|
23
23
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && ct(e.buffer), t;
|
|
@@ -35,11 +35,11 @@ const Wt = ce("string"), A = ce("function"), ut = ce("number"), W = (e) => e !==
|
|
|
35
35
|
} catch {
|
|
36
36
|
return !1;
|
|
37
37
|
}
|
|
38
|
-
}, Xt =
|
|
38
|
+
}, Xt = x("Date"), Gt = x("File"), Zt = x("Blob"), Yt = x("FileList"), en = (e) => W(e) && A(e.pipe), tn = (e) => {
|
|
39
39
|
let t;
|
|
40
40
|
return e && (typeof FormData == "function" && e instanceof FormData || A(e.append) && ((t = ae(e)) === "formdata" || // detect form-data instance
|
|
41
41
|
t === "object" && A(e.toString) && e.toString() === "[object FormData]"));
|
|
42
|
-
}, nn =
|
|
42
|
+
}, nn = x("URLSearchParams"), [rn, on, sn, an] = ["ReadableStream", "Request", "Response", "Headers"].map(x), cn = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
43
43
|
function K(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
44
44
|
if (e === null || typeof e > "u")
|
|
45
45
|
return;
|
|
@@ -119,12 +119,12 @@ const un = (e, t, n, { allOwnKeys: r } = {}) => (K(t, (o, s) => {
|
|
|
119
119
|
for (; (n = e.exec(t)) !== null; )
|
|
120
120
|
r.push(n);
|
|
121
121
|
return r;
|
|
122
|
-
}, gn =
|
|
122
|
+
}, gn = x("HTMLFormElement"), bn = (e) => e.toLowerCase().replace(
|
|
123
123
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
124
124
|
function(n, r, o) {
|
|
125
125
|
return r.toUpperCase() + o;
|
|
126
126
|
}
|
|
127
|
-
), Fe = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), En =
|
|
127
|
+
), Fe = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), En = x("RegExp"), dt = (e, t) => {
|
|
128
128
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
129
129
|
K(n, (o, s) => {
|
|
130
130
|
let i;
|
|
@@ -176,7 +176,7 @@ const _n = (e) => {
|
|
|
176
176
|
return r;
|
|
177
177
|
};
|
|
178
178
|
return n(e, 0);
|
|
179
|
-
},
|
|
179
|
+
}, xn = x("AsyncFunction"), Cn = (e) => e && (W(e) || A(e)) && A(e.then) && A(e.catch), pt = ((e, t) => e ? setImmediate : t ? ((n, r) => (D.addEventListener("message", ({ source: o, data: s }) => {
|
|
180
180
|
o === D && s === n && r.length && r.shift()();
|
|
181
181
|
}, !1), (o) => {
|
|
182
182
|
r.push(o), D.postMessage(n, "*");
|
|
@@ -217,7 +217,7 @@ const _n = (e) => {
|
|
|
217
217
|
inherits: fn,
|
|
218
218
|
toFlatObject: dn,
|
|
219
219
|
kindOf: ae,
|
|
220
|
-
kindOfTest:
|
|
220
|
+
kindOfTest: x,
|
|
221
221
|
endsWith: pn,
|
|
222
222
|
toArray: hn,
|
|
223
223
|
forEachEntry: yn,
|
|
@@ -237,8 +237,8 @@ const _n = (e) => {
|
|
|
237
237
|
isContextDefined: ft,
|
|
238
238
|
isSpecCompliantForm: An,
|
|
239
239
|
toJSONObject: _n,
|
|
240
|
-
isAsyncFn:
|
|
241
|
-
isThenable:
|
|
240
|
+
isAsyncFn: xn,
|
|
241
|
+
isThenable: Cn,
|
|
242
242
|
setImmediate: pt,
|
|
243
243
|
asap: kn,
|
|
244
244
|
isIterable: Pn
|
|
@@ -488,18 +488,18 @@ const bt = {
|
|
|
488
488
|
},
|
|
489
489
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
490
490
|
}, Le = typeof window < "u" && typeof document < "u", be = typeof navigator == "object" && navigator || void 0, jn = Le && (!be || ["ReactNative", "NativeScript", "NS"].indexOf(be.product) < 0), qn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
491
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
491
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Mn = Le && window.location.href || "http://localhost", Hn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
492
492
|
__proto__: null,
|
|
493
493
|
hasBrowserEnv: Le,
|
|
494
494
|
hasStandardBrowserEnv: jn,
|
|
495
495
|
hasStandardBrowserWebWorkerEnv: qn,
|
|
496
496
|
navigator: be,
|
|
497
|
-
origin:
|
|
497
|
+
origin: Mn
|
|
498
498
|
}, Symbol.toStringTag, { value: "Module" })), T = {
|
|
499
499
|
...Hn,
|
|
500
500
|
...Bn
|
|
501
501
|
};
|
|
502
|
-
function
|
|
502
|
+
function $n(e, t) {
|
|
503
503
|
return ue(e, new T.classes.URLSearchParams(), {
|
|
504
504
|
visitor: function(n, r, o, s) {
|
|
505
505
|
return T.isNode && c.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : s.defaultVisitor.apply(this, arguments);
|
|
@@ -560,7 +560,7 @@ const Q = {
|
|
|
560
560
|
let a;
|
|
561
561
|
if (s) {
|
|
562
562
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
563
|
-
return
|
|
563
|
+
return $n(t, this.formSerializer).toString();
|
|
564
564
|
if ((a = c.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
565
565
|
const f = this.env && this.env.FormData;
|
|
566
566
|
return ue(
|
|
@@ -824,10 +824,10 @@ function he(e, t) {
|
|
|
824
824
|
function Rt(e) {
|
|
825
825
|
return !!(e && e.__CANCEL__);
|
|
826
826
|
}
|
|
827
|
-
function
|
|
827
|
+
function M(e, t, n) {
|
|
828
828
|
w.call(this, e ?? "canceled", w.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
829
829
|
}
|
|
830
|
-
c.inherits(
|
|
830
|
+
c.inherits(M, w, {
|
|
831
831
|
__CANCEL__: !0
|
|
832
832
|
});
|
|
833
833
|
function St(e, t, n) {
|
|
@@ -938,7 +938,7 @@ function Tt(e, t, n) {
|
|
|
938
938
|
let r = !or(t);
|
|
939
939
|
return e && (r || n == !1) ? sr(e, t) : t;
|
|
940
940
|
}
|
|
941
|
-
const
|
|
941
|
+
const Me = (e) => e instanceof _ ? { ...e } : e;
|
|
942
942
|
function B(e, t) {
|
|
943
943
|
t = t || {};
|
|
944
944
|
const n = {};
|
|
@@ -996,7 +996,7 @@ function B(e, t) {
|
|
|
996
996
|
socketPath: i,
|
|
997
997
|
responseEncoding: i,
|
|
998
998
|
validateStatus: a,
|
|
999
|
-
headers: (l, u, d) => o(
|
|
999
|
+
headers: (l, u, d) => o(Me(l), Me(u), d, !0)
|
|
1000
1000
|
};
|
|
1001
1001
|
return c.forEach(Object.keys({ ...e, ...t }), function(u) {
|
|
1002
1002
|
const d = f[u] || o, m = d(e[u], t[u], u);
|
|
@@ -1072,7 +1072,7 @@ const Ot = (e) => {
|
|
|
1072
1072
|
}, s === void 0 && i.setContentType(null), "setRequestHeader" in h && c.forEach(i.toJSON(), function(k, O) {
|
|
1073
1073
|
h.setRequestHeader(O, k);
|
|
1074
1074
|
}), c.isUndefined(o.withCredentials) || (h.withCredentials = !!o.withCredentials), a && a !== "json" && (h.responseType = o.responseType), l && ([m, p] = re(l, !0), h.addEventListener("progress", m)), f && h.upload && ([d, g] = re(f), h.upload.addEventListener("progress", d), h.upload.addEventListener("loadend", g)), (o.cancelToken || o.signal) && (u = (S) => {
|
|
1075
|
-
h && (r(!S || S.type ? new
|
|
1075
|
+
h && (r(!S || S.type ? new M(null, e, h) : S), h.abort(), h = null);
|
|
1076
1076
|
}, o.cancelToken && o.cancelToken.subscribe(u), o.signal && (o.signal.aborted ? u() : o.signal.addEventListener("abort", u)));
|
|
1077
1077
|
const R = Yn(o.url);
|
|
1078
1078
|
if (R && T.protocols.indexOf(R) === -1) {
|
|
@@ -1089,7 +1089,7 @@ const Ot = (e) => {
|
|
|
1089
1089
|
if (!o) {
|
|
1090
1090
|
o = !0, a();
|
|
1091
1091
|
const u = l instanceof Error ? l : this.reason;
|
|
1092
|
-
r.abort(u instanceof w ? u : new
|
|
1092
|
+
r.abort(u instanceof w ? u : new M(u instanceof Error ? u.message : u));
|
|
1093
1093
|
}
|
|
1094
1094
|
};
|
|
1095
1095
|
let i = t && setTimeout(() => {
|
|
@@ -1177,7 +1177,7 @@ const Ot = (e) => {
|
|
|
1177
1177
|
}
|
|
1178
1178
|
}).headers.has("Content-Type");
|
|
1179
1179
|
return e && !t;
|
|
1180
|
-
}),
|
|
1180
|
+
}), $e = 64 * 1024, Ee = At && _t(() => c.isReadableStream(new Response("").body)), oe = {
|
|
1181
1181
|
stream: Ee && ((e) => e.body)
|
|
1182
1182
|
};
|
|
1183
1183
|
le && ((e) => {
|
|
@@ -1237,7 +1237,7 @@ const hr = async (e) => {
|
|
|
1237
1237
|
h,
|
|
1238
1238
|
re(qe(f))
|
|
1239
1239
|
);
|
|
1240
|
-
r = He(O.body,
|
|
1240
|
+
r = He(O.body, $e, F, X);
|
|
1241
1241
|
}
|
|
1242
1242
|
}
|
|
1243
1243
|
c.isString(d) || (d = d ? "include" : "omit");
|
|
@@ -1263,7 +1263,7 @@ const hr = async (e) => {
|
|
|
1263
1263
|
re(qe(a), !0)
|
|
1264
1264
|
) || [];
|
|
1265
1265
|
R = new Response(
|
|
1266
|
-
He(R.body,
|
|
1266
|
+
He(R.body, $e, F, () => {
|
|
1267
1267
|
X && X(), y && y();
|
|
1268
1268
|
}),
|
|
1269
1269
|
O
|
|
@@ -1303,7 +1303,7 @@ c.forEach(Re, (e, t) => {
|
|
|
1303
1303
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1304
1304
|
}
|
|
1305
1305
|
});
|
|
1306
|
-
const ze = (e) => `- ${e}`, wr = (e) => c.isFunction(e) || e === null || e === !1,
|
|
1306
|
+
const ze = (e) => `- ${e}`, wr = (e) => c.isFunction(e) || e === null || e === !1, xt = {
|
|
1307
1307
|
getAdapter: (e) => {
|
|
1308
1308
|
e = c.isArray(e) ? e : [e];
|
|
1309
1309
|
const { length: t } = e;
|
|
@@ -1336,13 +1336,13 @@ const ze = (e) => `- ${e}`, wr = (e) => c.isFunction(e) || e === null || e === !
|
|
|
1336
1336
|
};
|
|
1337
1337
|
function me(e) {
|
|
1338
1338
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1339
|
-
throw new
|
|
1339
|
+
throw new M(null, e);
|
|
1340
1340
|
}
|
|
1341
1341
|
function Je(e) {
|
|
1342
1342
|
return me(e), e.headers = _.from(e.headers), e.data = he.call(
|
|
1343
1343
|
e,
|
|
1344
1344
|
e.transformRequest
|
|
1345
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1345
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), xt.getAdapter(e.adapter || Q.adapter)(e).then(function(r) {
|
|
1346
1346
|
return me(e), r.data = he.call(
|
|
1347
1347
|
e,
|
|
1348
1348
|
e.transformResponse,
|
|
@@ -1356,7 +1356,7 @@ function Je(e) {
|
|
|
1356
1356
|
), r.response.headers = _.from(r.response.headers))), Promise.reject(r);
|
|
1357
1357
|
});
|
|
1358
1358
|
}
|
|
1359
|
-
const
|
|
1359
|
+
const Ct = "1.11.0", fe = {};
|
|
1360
1360
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1361
1361
|
fe[e] = function(r) {
|
|
1362
1362
|
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
@@ -1365,7 +1365,7 @@ const xt = "1.11.0", fe = {};
|
|
|
1365
1365
|
const Ve = {};
|
|
1366
1366
|
fe.transitional = function(t, n, r) {
|
|
1367
1367
|
function o(s, i) {
|
|
1368
|
-
return "[Axios v" +
|
|
1368
|
+
return "[Axios v" + Ct + "] Transitional option '" + s + "'" + i + (r ? ". " + r : "");
|
|
1369
1369
|
}
|
|
1370
1370
|
return (s, i, a) => {
|
|
1371
1371
|
if (t === !1)
|
|
@@ -1373,16 +1373,11 @@ fe.transitional = function(t, n, r) {
|
|
|
1373
1373
|
o(i, " has been removed" + (n ? " in " + n : "")),
|
|
1374
1374
|
w.ERR_DEPRECATED
|
|
1375
1375
|
);
|
|
1376
|
-
return n && !Ve[i] && (Ve[i] = !0,
|
|
1377
|
-
o(
|
|
1378
|
-
i,
|
|
1379
|
-
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
1380
|
-
)
|
|
1381
|
-
)), t ? t(s, i, a) : !0;
|
|
1376
|
+
return n && !Ve[i] && (Ve[i] = !0), t ? t(s, i, a) : !0;
|
|
1382
1377
|
};
|
|
1383
1378
|
};
|
|
1384
1379
|
fe.spelling = function(t) {
|
|
1385
|
-
return (n, r) =>
|
|
1380
|
+
return (n, r) => !0;
|
|
1386
1381
|
};
|
|
1387
1382
|
function gr(e, t, n) {
|
|
1388
1383
|
if (typeof e != "object")
|
|
@@ -1404,7 +1399,7 @@ function gr(e, t, n) {
|
|
|
1404
1399
|
const te = {
|
|
1405
1400
|
assertOptions: gr,
|
|
1406
1401
|
validators: fe
|
|
1407
|
-
},
|
|
1402
|
+
}, C = te.validators;
|
|
1408
1403
|
let I = class {
|
|
1409
1404
|
constructor(t) {
|
|
1410
1405
|
this.defaults = t || {}, this.interceptors = {
|
|
@@ -1441,17 +1436,17 @@ let I = class {
|
|
|
1441
1436
|
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = B(this.defaults, n);
|
|
1442
1437
|
const { transitional: r, paramsSerializer: o, headers: s } = n;
|
|
1443
1438
|
r !== void 0 && te.assertOptions(r, {
|
|
1444
|
-
silentJSONParsing:
|
|
1445
|
-
forcedJSONParsing:
|
|
1446
|
-
clarifyTimeoutError:
|
|
1439
|
+
silentJSONParsing: C.transitional(C.boolean),
|
|
1440
|
+
forcedJSONParsing: C.transitional(C.boolean),
|
|
1441
|
+
clarifyTimeoutError: C.transitional(C.boolean)
|
|
1447
1442
|
}, !1), o != null && (c.isFunction(o) ? n.paramsSerializer = {
|
|
1448
1443
|
serialize: o
|
|
1449
1444
|
} : te.assertOptions(o, {
|
|
1450
|
-
encode:
|
|
1451
|
-
serialize:
|
|
1445
|
+
encode: C.function,
|
|
1446
|
+
serialize: C.function
|
|
1452
1447
|
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), te.assertOptions(n, {
|
|
1453
|
-
baseUrl:
|
|
1454
|
-
withXsrfToken:
|
|
1448
|
+
baseUrl: C.spelling("baseURL"),
|
|
1449
|
+
withXsrfToken: C.spelling("withXSRFToken")
|
|
1455
1450
|
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
1456
1451
|
let i = s && c.merge(
|
|
1457
1452
|
s.common,
|
|
@@ -1553,7 +1548,7 @@ let br = class kt {
|
|
|
1553
1548
|
r.unsubscribe(s);
|
|
1554
1549
|
}, i;
|
|
1555
1550
|
}, t(function(s, i, a) {
|
|
1556
|
-
r.reason || (r.reason = new
|
|
1551
|
+
r.reason || (r.reason = new M(s, i, a), n(r.reason));
|
|
1557
1552
|
});
|
|
1558
1553
|
}
|
|
1559
1554
|
/**
|
|
@@ -1686,10 +1681,10 @@ function Pt(e) {
|
|
|
1686
1681
|
}
|
|
1687
1682
|
const b = Pt(Q);
|
|
1688
1683
|
b.Axios = I;
|
|
1689
|
-
b.CanceledError =
|
|
1684
|
+
b.CanceledError = M;
|
|
1690
1685
|
b.CancelToken = br;
|
|
1691
1686
|
b.isCancel = Rt;
|
|
1692
|
-
b.VERSION =
|
|
1687
|
+
b.VERSION = Ct;
|
|
1693
1688
|
b.toFormData = ue;
|
|
1694
1689
|
b.AxiosError = w;
|
|
1695
1690
|
b.Cancel = b.CanceledError;
|
|
@@ -1701,7 +1696,7 @@ b.isAxiosError = Rr;
|
|
|
1701
1696
|
b.mergeConfig = B;
|
|
1702
1697
|
b.AxiosHeaders = _;
|
|
1703
1698
|
b.formToJSON = (e) => Et(c.isHTMLForm(e) ? new FormData(e) : e);
|
|
1704
|
-
b.getAdapter =
|
|
1699
|
+
b.getAdapter = xt.getAdapter;
|
|
1705
1700
|
b.HttpStatusCode = Se;
|
|
1706
1701
|
b.default = b;
|
|
1707
1702
|
const {
|
|
@@ -1821,10 +1816,10 @@ function _r(e, t = !0, n = !0, r = !1) {
|
|
|
1821
1816
|
})), !n && !s && (s = setTimeout(() => i = !0, m)), i = !1, f);
|
|
1822
1817
|
};
|
|
1823
1818
|
}
|
|
1824
|
-
function
|
|
1819
|
+
function xr(e) {
|
|
1825
1820
|
return e;
|
|
1826
1821
|
}
|
|
1827
|
-
function
|
|
1822
|
+
function Cr(e) {
|
|
1828
1823
|
return Bt() ? (jt(e), !0) : !1;
|
|
1829
1824
|
}
|
|
1830
1825
|
function kr(e) {
|
|
@@ -1840,12 +1835,12 @@ function Qe(...e) {
|
|
|
1840
1835
|
Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]);
|
|
1841
1836
|
const s = [], i = () => {
|
|
1842
1837
|
s.forEach((u) => u()), s.length = 0;
|
|
1843
|
-
}, a = (u, d, m, g) => (u.addEventListener(d, m, g), () => u.removeEventListener(d, m, g)), f =
|
|
1838
|
+
}, a = (u, d, m, g) => (u.addEventListener(d, m, g), () => u.removeEventListener(d, m, g)), f = xe(() => [kr(t), Ue(o)], ([u, d]) => {
|
|
1844
1839
|
i(), u && s.push(...n.flatMap((m) => r.map((g) => a(u, m, g, d))));
|
|
1845
1840
|
}, { immediate: !0, flush: "post" }), l = () => {
|
|
1846
1841
|
f(), i();
|
|
1847
1842
|
};
|
|
1848
|
-
return
|
|
1843
|
+
return Cr(l), l;
|
|
1849
1844
|
}
|
|
1850
1845
|
const Xe = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Ge = "__vueuse_ssr_handlers__";
|
|
1851
1846
|
Xe[Ge] = Xe[Ge] || {};
|
|
@@ -1911,7 +1906,7 @@ const vr = {
|
|
|
1911
1906
|
easeInOutBack: [0.68, -0.6, 0.32, 1.6]
|
|
1912
1907
|
};
|
|
1913
1908
|
Ir({
|
|
1914
|
-
linear:
|
|
1909
|
+
linear: xr
|
|
1915
1910
|
}, vr);
|
|
1916
1911
|
let Ae;
|
|
1917
1912
|
const Nt = { triggerProxySso: "triggerProxySso" }, Br = () => {
|
|
@@ -1965,39 +1960,35 @@ const L = (e) => new URL(location.href).searchParams.get(e), _e = (e) => {
|
|
|
1965
1960
|
return new Promise(async (r) => {
|
|
1966
1961
|
const o = async (a) => {
|
|
1967
1962
|
try {
|
|
1968
|
-
const f = nt.feishu.login;
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
} catch (f) {
|
|
1973
|
-
console.error("login fail", f), v({ ...N, redirect_uri: U }), r();
|
|
1963
|
+
const f = nt.feishu.login, l = Ce(t, { ignoreAuth: !0 }), d = (await b.create().get(f, { baseURL: tt, params: { code: a, _redirect_url: l } })).request.responseURL;
|
|
1964
|
+
location.replace(d), r();
|
|
1965
|
+
} catch {
|
|
1966
|
+
v({ ...N, redirect_uri: U }), r();
|
|
1974
1967
|
}
|
|
1975
|
-
}, s = await n()
|
|
1976
|
-
console.log("飞书appId===", s);
|
|
1977
|
-
const i = () => {
|
|
1968
|
+
}, s = await n(), i = () => {
|
|
1978
1969
|
window.tt.requestAuthCode({
|
|
1979
1970
|
appId: s,
|
|
1980
1971
|
success: (a) => {
|
|
1981
1972
|
const { code: f } = a;
|
|
1982
|
-
|
|
1973
|
+
o(f);
|
|
1983
1974
|
},
|
|
1984
1975
|
fail: (a) => {
|
|
1985
|
-
|
|
1976
|
+
v({ ...N, redirect_uri: U }), r();
|
|
1986
1977
|
}
|
|
1987
1978
|
});
|
|
1988
1979
|
};
|
|
1989
|
-
window.tt.requestAccess ?
|
|
1980
|
+
window.tt.requestAccess ? window.tt.requestAccess({
|
|
1990
1981
|
appID: s,
|
|
1991
1982
|
scopeList: [],
|
|
1992
1983
|
success: (a) => {
|
|
1993
1984
|
const { code: f } = a;
|
|
1994
|
-
|
|
1985
|
+
o(f);
|
|
1995
1986
|
},
|
|
1996
1987
|
fail: (a) => {
|
|
1997
1988
|
const { errno: f } = a;
|
|
1998
|
-
f === 103 ? i() : (
|
|
1989
|
+
f === 103 ? i() : (v({ ...N, redirect_uri: U }), r());
|
|
1999
1990
|
}
|
|
2000
|
-
})
|
|
1991
|
+
}) : i();
|
|
2001
1992
|
});
|
|
2002
1993
|
}
|
|
2003
1994
|
}, j = {
|
|
@@ -2007,7 +1998,7 @@ const L = (e) => new URL(location.href).searchParams.get(e), _e = (e) => {
|
|
|
2007
1998
|
// 清除登录信息
|
|
2008
1999
|
token: "/api/justauth/oauth-server/v1/visitor/oauth/token"
|
|
2009
2000
|
// 通过code获取token
|
|
2010
|
-
}, { baseURL: rt, noRedireLogin:
|
|
2001
|
+
}, { baseURL: rt, noRedireLogin: Mr = !1 } = se(), U = location.origin + "/home", N = {
|
|
2011
2002
|
response_type: "code",
|
|
2012
2003
|
scope: "sever",
|
|
2013
2004
|
client_id: "sys",
|
|
@@ -2016,7 +2007,7 @@ const L = (e) => new URL(location.href).searchParams.get(e), _e = (e) => {
|
|
|
2016
2007
|
}, Dt = ne(!1), It = (e) => {
|
|
2017
2008
|
if (e <= 0) return;
|
|
2018
2009
|
const { idle: t } = Ur(e);
|
|
2019
|
-
|
|
2010
|
+
xe(
|
|
2020
2011
|
() => t.value,
|
|
2021
2012
|
(n) => {
|
|
2022
2013
|
n === !0 && (Dt.value = !0);
|
|
@@ -2027,10 +2018,10 @@ localStorage.getItem("idelTime") && It(Number(localStorage.getItem("idelTime")))
|
|
|
2027
2018
|
let ot = "";
|
|
2028
2019
|
const Hr = async () => {
|
|
2029
2020
|
const e = L("code") || "", t = L("redirect_url") || "/", n = L("kingdee_token") || "", r = L("loginType") || "";
|
|
2030
|
-
if (r && localStorage.setItem("loginType", r), !e) return
|
|
2021
|
+
if (r && localStorage.setItem("loginType", r), !e) return $();
|
|
2031
2022
|
const o = ["code", "state", "kingdee_token", "redirect_url", "source"];
|
|
2032
2023
|
if (e === ot)
|
|
2033
|
-
return _e(o), window.__isAutoCloseApp = !1, window.location.replace(decodeURIComponent(t)),
|
|
2024
|
+
return _e(o), window.__isAutoCloseApp = !1, window.location.replace(decodeURIComponent(t)), $();
|
|
2034
2025
|
ot = e, _e(o);
|
|
2035
2026
|
let s = {};
|
|
2036
2027
|
const i = {
|
|
@@ -2038,7 +2029,7 @@ const Hr = async () => {
|
|
|
2038
2029
|
code: e,
|
|
2039
2030
|
client_id: N.client_id,
|
|
2040
2031
|
client_secret: N.client_secret,
|
|
2041
|
-
redirect_uri: r ?
|
|
2032
|
+
redirect_uri: r ? Ce(U, { loginType: r }) : U,
|
|
2042
2033
|
timestamp: (/* @__PURE__ */ new Date()).getTime(),
|
|
2043
2034
|
nonce: Ft()
|
|
2044
2035
|
};
|
|
@@ -2078,17 +2069,17 @@ const Hr = async () => {
|
|
|
2078
2069
|
return v({ ...N, redirect_uri: U });
|
|
2079
2070
|
if (Z.value)
|
|
2080
2071
|
return await new Promise(async (r) => {
|
|
2081
|
-
|
|
2072
|
+
xe(
|
|
2082
2073
|
() => Z.value,
|
|
2083
2074
|
(o) => {
|
|
2084
2075
|
if (!o) {
|
|
2085
|
-
const s =
|
|
2076
|
+
const s = $();
|
|
2086
2077
|
r(s);
|
|
2087
2078
|
}
|
|
2088
2079
|
}
|
|
2089
2080
|
);
|
|
2090
2081
|
});
|
|
2091
|
-
let t =
|
|
2082
|
+
let t = $();
|
|
2092
2083
|
const { accessTokenExpiredAt: n } = J().getData();
|
|
2093
2084
|
Z.value = !0;
|
|
2094
2085
|
try {
|
|
@@ -2099,22 +2090,22 @@ const Hr = async () => {
|
|
|
2099
2090
|
Z.value = !1;
|
|
2100
2091
|
}
|
|
2101
2092
|
return t;
|
|
2102
|
-
},
|
|
2093
|
+
}, $r = () => {
|
|
2103
2094
|
let e = !1;
|
|
2104
2095
|
return localStorage.getItem("thirdLogouSource") === "zhongshen" && (e = !0), e;
|
|
2105
2096
|
}, zr = (e) => {
|
|
2106
2097
|
if (localStorage.getItem("thirdLogouSource") === "zhongshen") {
|
|
2107
2098
|
const r = `https://iam.shenyejituan.com:443/idp/profile/OAUTH2/Redirect/GLO?redirctToUrl=${encodeURIComponent(e)}&entityId=AIoT&redirectToLogin=true`;
|
|
2108
|
-
|
|
2099
|
+
localStorage.removeItem("thirdLogouSource"), location.href = r;
|
|
2109
2100
|
}
|
|
2110
2101
|
};
|
|
2111
2102
|
let ye = !1;
|
|
2112
2103
|
const v = (e) => {
|
|
2113
|
-
if (
|
|
2104
|
+
if (!Mr && !ye) {
|
|
2114
2105
|
ye = !0;
|
|
2115
2106
|
try {
|
|
2116
2107
|
const t = { ...e }, n = localStorage.getItem("loginType") || "";
|
|
2117
|
-
n && (t.redirect_uri =
|
|
2108
|
+
n && (t.redirect_uri = Ce(t.redirect_uri, { loginType: n }));
|
|
2118
2109
|
const { baseURL: r, ssoLocale: o } = se();
|
|
2119
2110
|
if (Ae) return Ae(t);
|
|
2120
2111
|
t.logout = "true", o && (t.locale = "locale");
|
|
@@ -2123,7 +2114,7 @@ const v = (e) => {
|
|
|
2123
2114
|
f !== "client_secret" && s.set(f, String(l));
|
|
2124
2115
|
});
|
|
2125
2116
|
const i = s.toString(), a = `${r}${j.oauth}?${i}`;
|
|
2126
|
-
if (localStorage.removeItem("idelTime"), sessionStorage.clear(), J().remove(),
|
|
2117
|
+
if (localStorage.removeItem("idelTime"), sessionStorage.clear(), J().remove(), $r())
|
|
2127
2118
|
zr(a);
|
|
2128
2119
|
else {
|
|
2129
2120
|
try {
|
|
@@ -2171,7 +2162,7 @@ const Jr = async (e) => {
|
|
|
2171
2162
|
}
|
|
2172
2163
|
}, J = () => ({
|
|
2173
2164
|
getData: () => ({
|
|
2174
|
-
accessToken:
|
|
2165
|
+
accessToken: $(),
|
|
2175
2166
|
accessTokenExpiredAt: de("accessTokenExpiredAt") ? Number(de("accessTokenExpiredAt")) : "",
|
|
2176
2167
|
refreshToken: de("refreshToken")
|
|
2177
2168
|
}),
|
|
@@ -2182,7 +2173,7 @@ const Jr = async (e) => {
|
|
|
2182
2173
|
}), zt(e);
|
|
2183
2174
|
},
|
|
2184
2175
|
remove: () => {
|
|
2185
|
-
|
|
2176
|
+
Mt(), $t();
|
|
2186
2177
|
}
|
|
2187
2178
|
});
|
|
2188
2179
|
export {
|
|
Binary file
|