@xingm/http-request-sdk 0.1.5 → 0.1.6
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/dist/{default-sdk-BDsyZQdl.js → default-sdk-DidewzwC.js} +142 -131
- package/dist/default-sdk-YJ5jh07z.cjs +3 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/vue/index.cjs +1 -1
- package/dist/vue/index.js +1 -1
- package/package.json +1 -1
- package/dist/default-sdk-BPbtZraP.cjs +0 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
const
|
|
1
|
+
import L from "axios";
|
|
2
|
+
const K = "System error", Y = {
|
|
3
3
|
400: "Invalid request parameters",
|
|
4
4
|
401: "Unauthorized. Token, username, or password is incorrect.",
|
|
5
5
|
403: "Access is forbidden.",
|
|
@@ -234,8 +234,8 @@ const J = "System error", K = {
|
|
|
234
234
|
1500000013: "payloadTransformScript length cannot exceed {} characters.",
|
|
235
235
|
1500000014: "payloadTransformScript compilation failed: {}",
|
|
236
236
|
1500000015: "Invalid brokerUrl format. Use mqtt://host:port, mqtts://host:port, tcp://host:port, or ssl://host:port.",
|
|
237
|
-
other:
|
|
238
|
-
},
|
|
237
|
+
other: K
|
|
238
|
+
}, X = "系统异常", Z = {
|
|
239
239
|
400: "参数错误",
|
|
240
240
|
401: "用户没有权限(令牌、用户名、密码错误)!",
|
|
241
241
|
403: "用户得到授权,但是访问是被禁止的。!",
|
|
@@ -588,8 +588,8 @@ const J = "System error", K = {
|
|
|
588
588
|
1500000013: "payloadTransformScript 长度不能超过 {} 字符",
|
|
589
589
|
1500000014: "payloadTransformScript 编译失败:{}",
|
|
590
590
|
1500000015: "brokerUrl 格式非法,需使用 mqtt://host:port、mqtts://host:port、tcp://host:port 或 ssl://host:port",
|
|
591
|
-
other:
|
|
592
|
-
},
|
|
591
|
+
other: X
|
|
592
|
+
}, e0 = [0, 200], t0 = {
|
|
593
593
|
"api.accountExpired": "Your account has expired. Please log in again.",
|
|
594
594
|
"api.permissionExpiredTitle": "Permission expired",
|
|
595
595
|
"api.permissionExpiredContent": "Your account has expired. Please log in again.",
|
|
@@ -599,28 +599,28 @@ const J = "System error", K = {
|
|
|
599
599
|
"api.noPermissionOperation": "No permission to perform this operation",
|
|
600
600
|
"api.exportFailed": "Export failed",
|
|
601
601
|
"api.tokenExpired": "Your account has expired. Please log in again."
|
|
602
|
-
},
|
|
603
|
-
var
|
|
602
|
+
}, G = (e, t, n) => r0(n) ? t0[e] ?? t ?? e : t ?? e, r0 = (e) => typeof e == "string" && e.toLowerCase().startsWith("en"), a0 = (e) => {
|
|
603
|
+
var s, u, d;
|
|
604
604
|
if (typeof e != "string") return;
|
|
605
|
-
const t = ((
|
|
605
|
+
const t = ((s = e.match(/【([^】]+)】/)) == null ? void 0 : s[1]) || ((u = e.match(/\(([^)]+)\)/)) == null ? void 0 : u[1]), n = (d = e.match(/原因[::]\s*(.+)$/)) == null ? void 0 : d[1], i = {};
|
|
606
606
|
return t && (i.value = t), n && (i.reason = n), Object.keys(i).length ? i : void 0;
|
|
607
|
-
},
|
|
607
|
+
}, n0 = (e, t) => (n, i, s) => {
|
|
608
608
|
var d;
|
|
609
|
-
const u = (d = e == null ? void 0 : e.translate) == null ? void 0 : d.call(e, n, i,
|
|
610
|
-
return u && u !== n ? u :
|
|
609
|
+
const u = (d = e == null ? void 0 : e.translate) == null ? void 0 : d.call(e, n, i, s);
|
|
610
|
+
return u && u !== n ? u : G(n, i, t);
|
|
611
611
|
}, N = (e, t, n, i) => {
|
|
612
612
|
var T, w;
|
|
613
|
-
const u = `api.errMsg${String(e ?? "")}`, d = (T = n == null ? void 0 : n.translate) == null ? void 0 : T.call(n, u, void 0,
|
|
614
|
-
return d && d !== u ? d : typeof t == "string" && t || ((w = n == null ? void 0 : n.translate) == null ? void 0 : w.call(n, "api.systemException", "系统异常")) ||
|
|
615
|
-
},
|
|
616
|
-
var
|
|
617
|
-
const t =
|
|
613
|
+
const u = `api.errMsg${String(e ?? "")}`, d = (T = n == null ? void 0 : n.translate) == null ? void 0 : T.call(n, u, void 0, a0(t));
|
|
614
|
+
return d && d !== u ? d : typeof t == "string" && t || ((w = n == null ? void 0 : n.translate) == null ? void 0 : w.call(n, "api.systemException", "系统异常")) || G("api.systemException", "系统异常", i);
|
|
615
|
+
}, i0 = (e, t, n = "/admin-api") => typeof e == "function" ? e(t) : e ?? `${n}/system/auth/refresh-token?refreshToken=${t ?? ""}`, s0 = (e) => typeof e == "function" ? e() : e ?? "/login", V = (e, t = e0) => t.some((n) => String(n) === String(e)), o0 = (e, t = "Bearer") => typeof t == "function" ? t(e) : t ? `${t} ${e}` : e, A = () => typeof window < "u" && typeof document < "u", c0 = "http-request-sdk:authorization-expired", U = Z, _ = Y, d0 = (e = {}) => {
|
|
616
|
+
var O;
|
|
617
|
+
const t = n0(e.locale, e.lang);
|
|
618
618
|
let n = !1, i = null;
|
|
619
|
-
const
|
|
619
|
+
const s = L.create({
|
|
620
620
|
baseURL: e.baseURL ?? "/admin-api",
|
|
621
621
|
timeout: e.timeout ?? 3e4,
|
|
622
622
|
validateStatus: (a) => a >= 200 && a < 300 || a === 400,
|
|
623
|
-
paramsSerializer: ((
|
|
623
|
+
paramsSerializer: ((O = e.axiosConfig) == null ? void 0 : O.paramsSerializer) ?? {
|
|
624
624
|
indexes: !0
|
|
625
625
|
},
|
|
626
626
|
headers: {
|
|
@@ -628,22 +628,22 @@ const J = "System error", K = {
|
|
|
628
628
|
},
|
|
629
629
|
...e.axiosConfig
|
|
630
630
|
}), u = () => {
|
|
631
|
-
var
|
|
632
|
-
const a = typeof e.getAccessToken == "function", r = typeof ((
|
|
631
|
+
var f, y, p, l;
|
|
632
|
+
const a = typeof e.getAccessToken == "function", r = typeof ((f = e.token) == null ? void 0 : f.getAccessToken) == "function", o = ((y = e.getAccessToken) == null ? void 0 : y.call(e)) ?? ((l = (p = e.token) == null ? void 0 : p.getAccessToken) == null ? void 0 : l.call(p));
|
|
633
633
|
return console.info("[http-request-sdk][token]", "access-token:resolve", {
|
|
634
634
|
hasGetAccessToken: a,
|
|
635
635
|
hasTokenGetAccessToken: r,
|
|
636
|
-
hasToken: !!
|
|
637
|
-
tokenLength: (
|
|
638
|
-
}),
|
|
636
|
+
hasToken: !!o,
|
|
637
|
+
tokenLength: (o == null ? void 0 : o.length) ?? 0
|
|
638
|
+
}), o;
|
|
639
639
|
}, d = (a, r) => {
|
|
640
640
|
console.info("[http-request-sdk][token]", a, {
|
|
641
641
|
hasToken: !!r,
|
|
642
642
|
tokenLength: (r == null ? void 0 : r.length) ?? 0
|
|
643
643
|
});
|
|
644
644
|
}, T = () => {
|
|
645
|
-
var a, r,
|
|
646
|
-
return ((a = e.getLocale) == null ? void 0 : a.call(e)) ?? ((
|
|
645
|
+
var a, r, o;
|
|
646
|
+
return ((a = e.getLocale) == null ? void 0 : a.call(e)) ?? ((o = (r = e.locale) == null ? void 0 : r.getLocale) == null ? void 0 : o.call(r));
|
|
647
647
|
}, w = () => T() ?? e.lang, g = (a, r) => C(a, r, w()), S = (a) => {
|
|
648
648
|
var r;
|
|
649
649
|
(r = e.onBusinessError) == null || r.call(e, a);
|
|
@@ -651,9 +651,9 @@ const J = "System error", K = {
|
|
|
651
651
|
var r;
|
|
652
652
|
(r = e.onHttpError) == null || r.call(e, a);
|
|
653
653
|
}, k = (a) => {
|
|
654
|
-
var r,
|
|
655
|
-
(
|
|
656
|
-
},
|
|
654
|
+
var r, o;
|
|
655
|
+
(o = (r = e.ui) == null ? void 0 : r.error) == null || o.call(r, a);
|
|
656
|
+
}, h = (a, r) => {
|
|
657
657
|
console.info("[http-request-sdk][permission-expired]", a, r ?? {});
|
|
658
658
|
}, v = () => t("api.accountExpired", "您的账号已失效,请重新登录"), x = async (a) => {
|
|
659
659
|
var y, p;
|
|
@@ -661,119 +661,119 @@ const J = "System error", K = {
|
|
|
661
661
|
...a,
|
|
662
662
|
message: v()
|
|
663
663
|
};
|
|
664
|
-
if (
|
|
664
|
+
if (h("triggerTokenExpired:start", {
|
|
665
665
|
code: r.code,
|
|
666
666
|
message: r.message,
|
|
667
667
|
hasShowPermissionExpired: !!((y = e.ui) != null && y.showPermissionExpired),
|
|
668
668
|
modalVisible: n
|
|
669
669
|
}), n) {
|
|
670
|
-
|
|
670
|
+
h("triggerTokenExpired:skip-visible", {
|
|
671
671
|
code: r.code
|
|
672
672
|
});
|
|
673
673
|
return;
|
|
674
674
|
}
|
|
675
|
-
const
|
|
676
|
-
n = !1,
|
|
675
|
+
const o = () => {
|
|
676
|
+
n = !1, h("modal:visible-reset", {
|
|
677
677
|
code: r.code
|
|
678
678
|
});
|
|
679
|
-
},
|
|
679
|
+
}, f = async () => {
|
|
680
680
|
var l, m, c, b;
|
|
681
|
-
|
|
681
|
+
h("modal:onOk:start", {
|
|
682
682
|
code: r.code,
|
|
683
683
|
hasOnTokenExpired: !!e.onTokenExpired
|
|
684
684
|
});
|
|
685
685
|
try {
|
|
686
|
-
e.onTokenExpired ? await e.onTokenExpired(r) : (await ((m = (l = e.token) == null ? void 0 : l.logout) == null ? void 0 : m.call(l)), (b = (c = e.token) == null ? void 0 : c.clearToken) == null || b.call(c), A() && (window.location.href =
|
|
686
|
+
e.onTokenExpired ? await e.onTokenExpired(r) : (await ((m = (l = e.token) == null ? void 0 : l.logout) == null ? void 0 : m.call(l)), (b = (c = e.token) == null ? void 0 : c.clearToken) == null || b.call(c), A() && (window.location.href = s0(e.loginUrl))), o(), h("modal:onOk:success", {
|
|
687
687
|
code: r.code
|
|
688
688
|
});
|
|
689
689
|
} catch (M) {
|
|
690
|
-
|
|
690
|
+
h("modal:onOk:error", {
|
|
691
691
|
code: r.code,
|
|
692
692
|
error: M
|
|
693
|
-
}),
|
|
693
|
+
}), o();
|
|
694
694
|
}
|
|
695
695
|
};
|
|
696
|
-
if (n = !0,
|
|
696
|
+
if (n = !0, h("modal:visible-set", {
|
|
697
697
|
code: r.code
|
|
698
698
|
}), (p = e.ui) != null && p.showPermissionExpired) {
|
|
699
|
-
|
|
699
|
+
h("modal:showPermissionExpired:call", {
|
|
700
700
|
code: r.code
|
|
701
701
|
}), e.ui.showPermissionExpired({
|
|
702
702
|
title: t("api.permissionExpiredTitle", "权限失效提醒"),
|
|
703
703
|
content: r.message,
|
|
704
704
|
okText: t("api.permissionExpiredOkText", "我知道了"),
|
|
705
|
-
onOk:
|
|
706
|
-
onCancel:
|
|
705
|
+
onOk: f,
|
|
706
|
+
onCancel: o
|
|
707
707
|
});
|
|
708
708
|
return;
|
|
709
709
|
}
|
|
710
710
|
if (A()) {
|
|
711
|
-
|
|
711
|
+
h("modal:adapter-missing:native-alert", {
|
|
712
712
|
code: r.code
|
|
713
713
|
}), window.alert(
|
|
714
714
|
`${t("api.permissionExpiredTitle", "权限失效提醒")}
|
|
715
715
|
|
|
716
716
|
${r.message}`
|
|
717
|
-
), await
|
|
717
|
+
), await f();
|
|
718
718
|
return;
|
|
719
719
|
}
|
|
720
|
-
|
|
720
|
+
h("modal:adapter-missing:run-onOk-without-browser", {
|
|
721
721
|
code: r.code
|
|
722
|
-
}), await
|
|
722
|
+
}), await f();
|
|
723
723
|
}, R = (a) => {
|
|
724
|
-
var r,
|
|
724
|
+
var r, o, f, y, p;
|
|
725
725
|
if (a)
|
|
726
|
-
return a.accessToken && ((
|
|
726
|
+
return a.accessToken && ((o = (r = e.token) == null ? void 0 : r.setToken) == null || o.call(r, a.accessToken)), a.refreshToken && ((y = (f = e.token) == null ? void 0 : f.setRefreshToken) == null || y.call(f, a.refreshToken)), (p = e.onRefreshTokenSuccess) == null || p.call(e, a), a.loginInfo;
|
|
727
727
|
}, D = async () => {
|
|
728
|
-
var
|
|
728
|
+
var f, y, p, l, m, c;
|
|
729
729
|
if (e.refreshAccessToken) {
|
|
730
|
-
const b = (y = (
|
|
730
|
+
const b = (y = (f = e.token) == null ? void 0 : f.getRefreshToken) == null ? void 0 : y.call(f);
|
|
731
731
|
d("refresh-token:custom-get-refresh-token", b);
|
|
732
732
|
const M = await e.refreshAccessToken({
|
|
733
733
|
refreshToken: b,
|
|
734
|
-
service:
|
|
734
|
+
service: s
|
|
735
735
|
});
|
|
736
736
|
return R(M);
|
|
737
737
|
}
|
|
738
738
|
const a = (l = (p = e.token) == null ? void 0 : p.getRefreshToken) == null ? void 0 : l.call(p);
|
|
739
739
|
d("refresh-token:get-refresh-token", a);
|
|
740
|
-
const r = await
|
|
741
|
-
|
|
740
|
+
const r = await L.post(
|
|
741
|
+
i0(
|
|
742
742
|
e.refreshTokenUrl,
|
|
743
743
|
a,
|
|
744
744
|
e.baseURL ?? "/admin-api"
|
|
745
745
|
),
|
|
746
746
|
void 0,
|
|
747
747
|
{
|
|
748
|
-
headers:
|
|
748
|
+
headers: g0(e.headers)
|
|
749
749
|
}
|
|
750
|
-
),
|
|
751
|
-
if (
|
|
750
|
+
), o = ((c = (m = e.token) == null ? void 0 : m.normalizeRefreshResponse) == null ? void 0 : c.call(m, r)) ?? l0(r);
|
|
751
|
+
if (o.code === 401 || o.code === 400)
|
|
752
752
|
throw new Error(v());
|
|
753
|
-
return R(
|
|
754
|
-
},
|
|
753
|
+
return R(o);
|
|
754
|
+
}, W = () => (i || (i = D().finally(() => {
|
|
755
755
|
i = null;
|
|
756
756
|
})), i);
|
|
757
|
-
|
|
757
|
+
s.interceptors.request.use(
|
|
758
758
|
(a) => {
|
|
759
759
|
const r = u();
|
|
760
760
|
d("request:get-access-token", r);
|
|
761
|
-
const
|
|
761
|
+
const o = T();
|
|
762
762
|
return a.params = z(a.params), r && F(
|
|
763
763
|
a,
|
|
764
764
|
e.authHeaderName ?? "Authorization",
|
|
765
|
-
|
|
766
|
-
),
|
|
765
|
+
o0(r, e.authScheme)
|
|
766
|
+
), o && F(a, e.localeHeaderName ?? "Accept-Language", o), p0(a, e.headers), a;
|
|
767
767
|
},
|
|
768
768
|
(a) => {
|
|
769
769
|
var r;
|
|
770
770
|
return (r = e.onRequestError) == null || r.call(e, a), Promise.reject(a);
|
|
771
771
|
}
|
|
772
772
|
);
|
|
773
|
-
const
|
|
773
|
+
const J = (async (a) => {
|
|
774
774
|
var m;
|
|
775
775
|
if (a.config.responseType === "blob")
|
|
776
|
-
return
|
|
776
|
+
return u0(a, e, t);
|
|
777
777
|
if (a.status !== 200 && a.status !== 400) {
|
|
778
778
|
const c = g(
|
|
779
779
|
(m = a.data) == null ? void 0 : m.code,
|
|
@@ -781,18 +781,18 @@ ${r.message}`
|
|
|
781
781
|
);
|
|
782
782
|
return k(c), E({ message: c, response: a }), Promise.reject(new Error(c));
|
|
783
783
|
}
|
|
784
|
-
const { code: r, msg:
|
|
784
|
+
const { code: r, msg: o, message: f, data: y } = a.data, l = o || f || t("api.systemException", "系统异常");
|
|
785
785
|
if (Number(r) === 400) {
|
|
786
786
|
const c = v();
|
|
787
|
-
return
|
|
787
|
+
return h("response:code-400:show-modal", {
|
|
788
788
|
httpStatus: a.status,
|
|
789
789
|
code: r,
|
|
790
790
|
message: c,
|
|
791
791
|
url: a.config.url
|
|
792
792
|
}), await x({ code: r, message: c, response: a }), S({ code: r, message: c, response: a }), Promise.reject(new Error(c));
|
|
793
793
|
}
|
|
794
|
-
if (
|
|
795
|
-
|
|
794
|
+
if (y0(a, e)) {
|
|
795
|
+
h("response:should-refresh-token", {
|
|
796
796
|
httpStatus: a.status,
|
|
797
797
|
code: r,
|
|
798
798
|
message: l,
|
|
@@ -801,23 +801,23 @@ ${r.message}`
|
|
|
801
801
|
const c = a.config;
|
|
802
802
|
if (c._retry) {
|
|
803
803
|
const b = v();
|
|
804
|
-
return
|
|
804
|
+
return h("response:retry-already-used", {
|
|
805
805
|
code: r,
|
|
806
806
|
url: a.config.url
|
|
807
807
|
}), await x({ code: r, message: b, response: a }), Promise.reject(new Error(b));
|
|
808
808
|
}
|
|
809
809
|
c._retry = !0;
|
|
810
810
|
try {
|
|
811
|
-
return
|
|
811
|
+
return h("refresh-token:start", {
|
|
812
812
|
code: r,
|
|
813
813
|
url: a.config.url
|
|
814
|
-
}), await
|
|
814
|
+
}), await W(), h("refresh-token:success:retry-request", {
|
|
815
815
|
code: r,
|
|
816
816
|
url: a.config.url
|
|
817
|
-
}),
|
|
817
|
+
}), s.request(c);
|
|
818
818
|
} catch (b) {
|
|
819
819
|
const M = v();
|
|
820
|
-
return
|
|
820
|
+
return h("refresh-token:error:trigger-modal", {
|
|
821
821
|
code: r,
|
|
822
822
|
url: a.config.url,
|
|
823
823
|
error: b
|
|
@@ -842,12 +842,12 @@ ${r.message}`
|
|
|
842
842
|
expireTime: B(y, "expireTime"),
|
|
843
843
|
rawData: y
|
|
844
844
|
};
|
|
845
|
-
|
|
845
|
+
m0(c, a, e);
|
|
846
846
|
return;
|
|
847
847
|
}
|
|
848
848
|
if (Number(r) === 1002031003)
|
|
849
849
|
return S({ code: r, message: l, response: a }), Promise.reject(new Error(l));
|
|
850
|
-
if (!
|
|
850
|
+
if (!V(r, e.successCodes)) {
|
|
851
851
|
const c = g(
|
|
852
852
|
r,
|
|
853
853
|
N(r, l, e.locale, e.lang)
|
|
@@ -856,10 +856,10 @@ ${r.message}`
|
|
|
856
856
|
}
|
|
857
857
|
return e.transformResponse ? e.transformResponse(a.data) : e.unwrapData ? a.data.data : a.data;
|
|
858
858
|
});
|
|
859
|
-
return
|
|
860
|
-
var
|
|
859
|
+
return s.interceptors.response.use(J, (a) => {
|
|
860
|
+
var o, f, y, p;
|
|
861
861
|
const { response: r } = a;
|
|
862
|
-
if (r && ((
|
|
862
|
+
if (r && ((o = r.config) == null ? void 0 : o.responseType) === "blob" && typeof Blob < "u" && r.data instanceof Blob)
|
|
863
863
|
r.data.text().then((l) => {
|
|
864
864
|
try {
|
|
865
865
|
const m = JSON.parse(l), c = N(
|
|
@@ -894,7 +894,7 @@ ${r.message}`
|
|
|
894
894
|
});
|
|
895
895
|
else if ((r == null ? void 0 : r.status) === 403) {
|
|
896
896
|
const l = g(
|
|
897
|
-
(
|
|
897
|
+
(f = r.data) == null ? void 0 : f.code,
|
|
898
898
|
t("api.noPermissionOperation", "暂无操作权限")
|
|
899
899
|
);
|
|
900
900
|
k(l), E({ code: 403, message: l, response: r, error: a });
|
|
@@ -910,36 +910,36 @@ ${r.message}`
|
|
|
910
910
|
}
|
|
911
911
|
return (p = e.onResponseError) == null || p.call(e, a), Promise.reject(a);
|
|
912
912
|
}), {
|
|
913
|
-
service:
|
|
913
|
+
service: s,
|
|
914
914
|
refreshToken: D,
|
|
915
915
|
request: {
|
|
916
|
-
request: (a) =>
|
|
917
|
-
get: (a, r = {}) => typeof a == "string" ?
|
|
916
|
+
request: (a) => s.request(a),
|
|
917
|
+
get: (a, r = {}) => typeof a == "string" ? s.get(
|
|
918
918
|
a,
|
|
919
919
|
H(r)
|
|
920
|
-
) :
|
|
920
|
+
) : s.request({
|
|
921
921
|
...a,
|
|
922
922
|
method: "get"
|
|
923
923
|
}),
|
|
924
|
-
post: (a, r,
|
|
925
|
-
q(a, "post", r,
|
|
924
|
+
post: (a, r, o = {}) => typeof a == "string" ? s.post(a, r, o) : s.request(
|
|
925
|
+
q(a, "post", r, o)
|
|
926
926
|
),
|
|
927
|
-
put: (a, r,
|
|
928
|
-
q(a, "put", r,
|
|
927
|
+
put: (a, r, o = {}) => typeof a == "string" ? s.put(a, r, o) : s.request(
|
|
928
|
+
q(a, "put", r, o)
|
|
929
929
|
),
|
|
930
|
-
patch: (a, r,
|
|
931
|
-
q(a, "patch", r,
|
|
930
|
+
patch: (a, r, o = {}) => typeof a == "string" ? s.patch(a, r, o) : s.request(
|
|
931
|
+
q(a, "patch", r, o)
|
|
932
932
|
),
|
|
933
|
-
delete: (a, r = {}) => typeof a == "string" ?
|
|
933
|
+
delete: (a, r = {}) => typeof a == "string" ? s.delete(
|
|
934
934
|
a,
|
|
935
935
|
H(r)
|
|
936
|
-
) :
|
|
936
|
+
) : s.request({
|
|
937
937
|
...a,
|
|
938
938
|
method: "delete"
|
|
939
939
|
})
|
|
940
940
|
}
|
|
941
941
|
};
|
|
942
|
-
},
|
|
942
|
+
}, l0 = (e) => {
|
|
943
943
|
const t = e.data.data, n = e.data;
|
|
944
944
|
return {
|
|
945
945
|
code: e.data.code,
|
|
@@ -947,14 +947,14 @@ ${r.message}`
|
|
|
947
947
|
refreshToken: (t == null ? void 0 : t.refreshToken) ?? n.refreshToken,
|
|
948
948
|
loginInfo: t
|
|
949
949
|
};
|
|
950
|
-
},
|
|
951
|
-
var u, d, T, w, g, S, E, k,
|
|
950
|
+
}, u0 = async (e, t, n) => {
|
|
951
|
+
var u, d, T, w, g, S, E, k, h, v;
|
|
952
952
|
const i = ((u = e.headers) == null ? void 0 : u["content-type"]) || "";
|
|
953
953
|
if (!String(i).includes("application/json"))
|
|
954
954
|
return e.data;
|
|
955
|
-
const
|
|
955
|
+
const s = await e.data.text();
|
|
956
956
|
try {
|
|
957
|
-
const x = JSON.parse(
|
|
957
|
+
const x = JSON.parse(s);
|
|
958
958
|
if (Number(x.code) === 403) {
|
|
959
959
|
const D = C(
|
|
960
960
|
x.code,
|
|
@@ -963,7 +963,7 @@ ${r.message}`
|
|
|
963
963
|
);
|
|
964
964
|
return (T = (d = t.ui) == null ? void 0 : d.error) == null || T.call(d, D), (w = t.onBusinessError) == null || w.call(t, { code: x.code, message: D, response: e }), Promise.reject(new Error(D));
|
|
965
965
|
}
|
|
966
|
-
if (
|
|
966
|
+
if (V(x.code, t.successCodes)) return e.data;
|
|
967
967
|
const R = C(
|
|
968
968
|
x.code,
|
|
969
969
|
N(
|
|
@@ -977,16 +977,16 @@ ${r.message}`
|
|
|
977
977
|
return (S = (g = t.ui) == null ? void 0 : g.error) == null || S.call(g, R), (E = t.onBusinessError) == null || E.call(t, { code: x.code, message: R, response: e }), Promise.reject(new Error(R));
|
|
978
978
|
} catch {
|
|
979
979
|
const x = n("api.exportFailed", "导出失败");
|
|
980
|
-
return (
|
|
980
|
+
return (h = (k = t.ui) == null ? void 0 : k.error) == null || h.call(k, x), (v = t.onHttpError) == null || v.call(t, { message: x, response: e }), Promise.reject(new Error(x));
|
|
981
981
|
}
|
|
982
|
-
},
|
|
983
|
-
var i,
|
|
984
|
-
if ((i = n.onAuthorizationExpired) == null || i.call(n, { payload: e, response: t }),
|
|
982
|
+
}, m0 = (e, t, n) => {
|
|
983
|
+
var i, s, u, d, T;
|
|
984
|
+
if ((i = n.onAuthorizationExpired) == null || i.call(n, { payload: e, response: t }), f0(n)) {
|
|
985
985
|
h0(e, n);
|
|
986
986
|
return;
|
|
987
987
|
}
|
|
988
|
-
e.expireTime ? (u = (
|
|
989
|
-
},
|
|
988
|
+
e.expireTime ? (u = (s = n.authorization) == null ? void 0 : s.openExpired) == null || u.call(s, e) : (T = (d = n.authorization) == null ? void 0 : d.open) == null || T.call(d, e);
|
|
989
|
+
}, f0 = (e) => {
|
|
990
990
|
var n;
|
|
991
991
|
if ((n = e.authorization) != null && n.isInMicroApp)
|
|
992
992
|
return e.authorization.isInMicroApp();
|
|
@@ -994,8 +994,8 @@ ${r.message}`
|
|
|
994
994
|
const t = window;
|
|
995
995
|
return !!(t.__MICRO_APP_ENVIRONMENT__ || t.__MICRO_APP_BASE_APPLICATION__);
|
|
996
996
|
}, h0 = (e, t) => {
|
|
997
|
-
var
|
|
998
|
-
if ((
|
|
997
|
+
var s, u, d, T;
|
|
998
|
+
if ((s = t.authorization) != null && s.dispatchMicroAppEvent) {
|
|
999
999
|
t.authorization.dispatchMicroAppEvent(e);
|
|
1000
1000
|
return;
|
|
1001
1001
|
}
|
|
@@ -1016,7 +1016,7 @@ ${r.message}`
|
|
|
1016
1016
|
}
|
|
1017
1017
|
}
|
|
1018
1018
|
window.dispatchEvent(
|
|
1019
|
-
new CustomEvent(((T = t.authorization) == null ? void 0 : T.eventName) ??
|
|
1019
|
+
new CustomEvent(((T = t.authorization) == null ? void 0 : T.eventName) ?? c0, {
|
|
1020
1020
|
detail: n
|
|
1021
1021
|
})
|
|
1022
1022
|
);
|
|
@@ -1026,8 +1026,8 @@ ${r.message}`
|
|
|
1026
1026
|
return typeof n[t] == "string" ? n[t] : void 0;
|
|
1027
1027
|
}, C = (e, t, n) => {
|
|
1028
1028
|
if (e == null || e === "") return t;
|
|
1029
|
-
const i = j(n) ? _ : U,
|
|
1030
|
-
return (i[u] ??
|
|
1029
|
+
const i = j(n) ? _ : U, s = j(n) ? U : _, u = String(e);
|
|
1030
|
+
return (i[u] ?? s[u]) || t || i.other || s.other;
|
|
1031
1031
|
}, j = (e) => typeof e == "string" && e.toLowerCase().startsWith("en"), Q = (e) => {
|
|
1032
1032
|
var t, n, i;
|
|
1033
1033
|
return ((t = e.getLocale) == null ? void 0 : t.call(e)) ?? ((i = (n = e.locale) == null ? void 0 : n.getLocale) == null ? void 0 : i.call(n)) ?? e.lang;
|
|
@@ -1038,22 +1038,23 @@ ${r.message}`
|
|
|
1038
1038
|
return;
|
|
1039
1039
|
}
|
|
1040
1040
|
e.headers[t] = String(n);
|
|
1041
|
-
},
|
|
1041
|
+
}, p0 = (e, t) => {
|
|
1042
1042
|
Object.entries(t ?? {}).forEach(([n, i]) => {
|
|
1043
|
-
i != null && F(e, n, i);
|
|
1043
|
+
i != null && (k0(e, n) || F(e, n, i));
|
|
1044
1044
|
});
|
|
1045
|
-
},
|
|
1045
|
+
}, g0 = (e) => Object.entries(e ?? {}).reduce(
|
|
1046
1046
|
(t, [n, i]) => (i == null || (t[n] = String(i)), t),
|
|
1047
1047
|
{}
|
|
1048
|
-
),
|
|
1048
|
+
), y0 = (e, t) => {
|
|
1049
1049
|
var n;
|
|
1050
1050
|
return t.shouldRefreshToken ? t.shouldRefreshToken(e) : Number((n = e.data) == null ? void 0 : n.code) === 401;
|
|
1051
1051
|
}, q = (e, t, n, i = {}) => ({
|
|
1052
1052
|
...i,
|
|
1053
1053
|
...e,
|
|
1054
|
+
headers: b0(i.headers, e.headers),
|
|
1054
1055
|
method: t,
|
|
1055
1056
|
data: e.data ?? n ?? i.data
|
|
1056
|
-
}), H = (e) => e ?
|
|
1057
|
+
}), H = (e) => e ? T0(e) ? {
|
|
1057
1058
|
...e,
|
|
1058
1059
|
params: z(e.params)
|
|
1059
1060
|
} : {
|
|
@@ -1061,13 +1062,13 @@ ${r.message}`
|
|
|
1061
1062
|
} : {}, z = (e) => {
|
|
1062
1063
|
if (!e) return e;
|
|
1063
1064
|
if (typeof URLSearchParams < "u" && e instanceof URLSearchParams) {
|
|
1064
|
-
const
|
|
1065
|
-
return
|
|
1065
|
+
const s = new URLSearchParams(e);
|
|
1066
|
+
return s.delete("lang"), s;
|
|
1066
1067
|
}
|
|
1067
1068
|
if (typeof e != "object" || Array.isArray(e)) return e;
|
|
1068
1069
|
const t = e, { lang: n, ...i } = t;
|
|
1069
1070
|
return i;
|
|
1070
|
-
},
|
|
1071
|
+
}, x0 = /* @__PURE__ */ new Set([
|
|
1071
1072
|
"adapter",
|
|
1072
1073
|
"auth",
|
|
1073
1074
|
"baseURL",
|
|
@@ -1099,18 +1100,28 @@ ${r.message}`
|
|
|
1099
1100
|
"withCredentials",
|
|
1100
1101
|
"xsrfCookieName",
|
|
1101
1102
|
"xsrfHeaderName"
|
|
1102
|
-
]),
|
|
1103
|
+
]), T0 = (e) => !e || typeof e != "object" || typeof URLSearchParams < "u" && e instanceof URLSearchParams ? !1 : Object.keys(e).some((t) => x0.has(t)), k0 = (e, t) => {
|
|
1104
|
+
const n = e.headers;
|
|
1105
|
+
if (!n) return !1;
|
|
1106
|
+
if (typeof n.has == "function")
|
|
1107
|
+
return n.has(t);
|
|
1108
|
+
const i = t.toLowerCase();
|
|
1109
|
+
return Object.keys(n).some((s) => s.toLowerCase() === i);
|
|
1110
|
+
}, b0 = (e, t) => e ? t ? {
|
|
1111
|
+
...$(e),
|
|
1112
|
+
...$(t)
|
|
1113
|
+
} : e : t, $ = (e) => e ? typeof e.toJSON == "function" ? e.toJSON() : e : {};
|
|
1103
1114
|
let I = null;
|
|
1104
|
-
const
|
|
1105
|
-
const t =
|
|
1115
|
+
const w0 = (e) => {
|
|
1116
|
+
const t = d0(e);
|
|
1106
1117
|
return I = t, t;
|
|
1107
|
-
},
|
|
1118
|
+
}, v0 = (e) => (I = e, e), P = () => {
|
|
1108
1119
|
if (!I)
|
|
1109
1120
|
throw new Error(
|
|
1110
1121
|
"Request SDK is not initialized. Call setupRequestSdk(...) or install the Vue plugin first."
|
|
1111
1122
|
);
|
|
1112
1123
|
return I;
|
|
1113
|
-
},
|
|
1124
|
+
}, S0 = {
|
|
1114
1125
|
request: (e) => P().request.request(e),
|
|
1115
1126
|
get: (e, t) => P().request.get(
|
|
1116
1127
|
e,
|
|
@@ -1123,7 +1134,7 @@ const k0 = (e) => {
|
|
|
1123
1134
|
e,
|
|
1124
1135
|
t
|
|
1125
1136
|
)
|
|
1126
|
-
},
|
|
1137
|
+
}, P0 = new Proxy(
|
|
1127
1138
|
{},
|
|
1128
1139
|
{
|
|
1129
1140
|
get(e, t) {
|
|
@@ -1132,15 +1143,15 @@ const k0 = (e) => {
|
|
|
1132
1143
|
}
|
|
1133
1144
|
);
|
|
1134
1145
|
export {
|
|
1135
|
-
|
|
1146
|
+
c0 as A,
|
|
1136
1147
|
P as a,
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1148
|
+
o0 as b,
|
|
1149
|
+
d0 as c,
|
|
1150
|
+
w0 as d,
|
|
1151
|
+
a0 as e,
|
|
1141
1152
|
N as g,
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1153
|
+
P0 as h,
|
|
1154
|
+
V as i,
|
|
1155
|
+
S0 as r,
|
|
1156
|
+
v0 as s
|
|
1146
1157
|
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";const _=require("axios"),e0="System error",t0={400:"Invalid request parameters",401:"Unauthorized. Token, username, or password is incorrect.",403:"Access is forbidden.",404:"Network request error. Resource not found.",405:"Network request error. Method not allowed.",408:"Network request timed out.",500:"System error",501:"Network request is not implemented.",502:"Network error.",503:"Service unavailable. The server is overloaded or under maintenance.",504:"Network timeout.",505:"HTTP version is not supported.",507:"The maximum export quantity is 100000.",7e5:"Invalid code [{}]",700001:"The export quantity exceeds the limit. The maximum allowed is [{}].",700002:"The data exceeds [{}] records. Please narrow the query range.",700003:"Device [{}] is offline.",700004:"Device [{}] has no GPS information.",700005:"File already exists. Path: [{}]",700006:"Invalid file name.",700007:"File size exceeds the limit.",700008:"Unsupported file type.",700009:"File is empty.",700010:"Only [{}] files are supported.",700011:"File parsing failed.",700012:"File saving failed.",700013:"No online devices.",700014:"Invalid file path.",700015:"File upload failed.",700016:"File export failed.",700017:"User does not exist.",700018:"File does not exist.",700019:"Parameter is empty.",700020:"Local language is empty.",700021:"Device history data does not exist.",700022:"Device [{}] longitude is empty.",700023:"Device [{}] latitude is empty.",700025:"MD5 algorithm is unavailable.",700026:"Export exception.",700027:"ID is empty.",701e3:"DPD-TDOA raw data is empty.",701001:"DPD-TDOA raw data details are empty.",701002:"TDOA collection frequency is incorrect.",701003:"Algorithm type is empty.",701004:"Flight task ID is empty.",701005:"Target coordinates are empty.",701006:"The number of devices for single collection cannot be less than [{}].",701007:"The number of devices for continuous collection cannot be less than [{}].",701008:"Device reported abnormal gpsTime.",701009:"Failed to correct collection task and record.",701010:"Device code is empty.",701011:"Device [{}] has unfinished collection tasks. Duplicate dispatch is not allowed.",701012:"No warning level matched for area type [{}].",701013:"Failed to store IQ data file.",701014:"Failed to store IQ data file.",701015:"Firmware metadata not found.",701016:"Firmware data is empty.",701017:"Firmware for this device model and version already exists.",701018:"Failed to upload and parse firmware.",701019:"Collection data is empty.",701020:"Collection task ID is empty.",701021:"Failed to save drone reported image.",701022:"Failed to convert drone reported image.",701023:"Device height above ground is invalid.",701024:"Device detection range is invalid.",701025:"Failed to convert drone reported video.",701026:"Failed to save trajectory data.",701027:"Whitelist data has expired and cannot be modified.",701028:"Whitelist data has overlapping time and cannot be added.",701029:"Seconds cannot be negative.",701030:"Start time is empty.",701031:"End time is empty.",701032:"Start time is later than end time.",701033:"End time is earlier than current time.",701034:"Start time and end time are the same.",701035:"Failed to build drone warning data.",701036:"Failed to save drone data.",701040:"Area name already exists.",701041:"Area name is empty.",701052:"There are locked drones. Please unlock them before operating.",701056:"Only hourly or daily grouping is supported.",701057:"Firmware package is damaged or unreadable. Please check the firmware file.",704001:"Event identifier cannot be empty.",704002:"Event type cannot be empty.",704003:"Defense area number cannot be empty.",704004:"Data forwarding endpoint cannot be empty.",704020:"Reporting method cannot be empty.",704021:"Platform code cannot be empty.",704022:"Platform name cannot be empty.",704023:"The defense area does not exist.",704024:"Platform code already exists. Please use another one.",704028:"Currently only MQTT forwarding protocol is supported.",704033:"Connection test failed: [{}]",704034:"Test sending failed: [{}]",704037:"Data forwarding task does not exist.",704040:"Data forwarding endpoint does not exist.",705e3:"Configuration ID cannot be empty.",705001:"System configuration information cannot be empty.",705002:"Configuration value cannot be empty.",705003:"Configuration key cannot be empty.",705004:"Configuration key length cannot exceed [{}] characters.",705005:"Configuration key already exists.",705006:"Configuration does not exist.",1001000001:"Parameter configuration does not exist.",1001000002:"Parameter configuration key is duplicated.",1001000003:"Built-in system parameter configurations cannot be deleted.",1001000004:"Failed to get parameter configuration because hidden configurations are not allowed.",1001003001:"File does not exist.",1001003002:"File is empty.",1001003003:"Unsupported image format.",1001003004:"Image file is too large.",1001003005:"Unable to read image file.",1001006e3:"File configuration does not exist.",1001006001:"This file configuration cannot be deleted because it is the primary configuration.",1002e6:"Incorrect account or password.",1002000001:"Login failed. The account has been disabled.",1002000004:"Incorrect verification code.",1002000005:"Account is not bound. Binding is required.",1002000007:"Phone number does not exist.",1002000008:"Incorrect verification code.",1002001e3:"A menu with this name already exists.",1002001001:"Parent menu does not exist.",1002001002:"Cannot set itself as parent menu.",1002001003:"Menu does not exist.",1002001004:"Child menus exist and cannot be deleted.",1002001005:"Parent menu type must be directory or menu.",1002001006:"A menu with this component name already exists.",1002001007:"Invalid menu subtype.",1002001008:"Menu synchronization failed.",1002001009:"Menu node level exceeds the limit.",1002001010:"Invalid menu UUID.",1002001011:"Parent menu does not meet the specification.",1002002e3:"Role does not exist.",1002002001:"Role name is duplicated.",1002002002:"Role code already exists.",1002002003:"Built-in system roles cannot be operated.",1002002004:"Role has been disabled.",1002002005:"Role identifier cannot be used.",1002002006:"This role cannot be deleted.",1002003e3:"This account is already used. Please change it.",1002003001:"The phone number already exists.",1002003002:"The email address already exists.",1002003003:"User does not exist.",1002003004:"Imported user data cannot be empty.",1002003005:"Old password is incorrect.",1002003006:"This user has been disabled.",1002003008:"Failed to create user. Tenant quota exceeded.",1002003010:"This phone number has not been registered.",1002003011:"Registration is disabled.",1002003012:"This user is enabled and cannot be deleted.",1002003013:"Invalid region code.",1002003014:"Login account is display-only and cannot be edited.",1002003015:"Parsing failed.",1002003016:"Parsing failed: each import cannot exceed 10000 records. Please split the file.",1002003017:"Parsing failed: imported data cannot be empty.",1002003018:"Upload failed: file size exceeds the 10MB limit.",1002003019:"File parsing failed: only .xlsx template files are supported.",1002005e3:"The current position does not exist.",1002005001:"The position is not enabled and cannot be selected.",1002005002:"A position with this name already exists.",1002005003:"A position with this identifier already exists.",1002006001:"The current dictionary type does not exist.",1002006002:"The dictionary type is not enabled and cannot be selected.",1002006003:"Dictionary name already exists.",1002006004:"Dictionary code already exists.",1002006005:"Cannot delete. Dictionary values still exist under this dictionary.",1002006006:"Invalid dictionary synchronization request.",1002007001:"The current dictionary data does not exist.",1002007002:"The dictionary data is not enabled and cannot be selected.",1002007003:"Dictionary key already exists.",1002007004:"Dictionary label already exists.",1002031001:"Authorization has expired.",10021e5:"File service exception. Please check and test the file configuration.",1086001001:"System error.",1086001002:"Request error.",1086001003:"Enum not found.",1086001004:"Invalid parameter.",1086001005:"File is empty.",1086001006:"Invalid format.",1086002001:"Manufacturer code does not exist.",1086002002:"Device is not registered. Please register it first.",1086002003:"Invalid device creation parameters.",1086002004:"Dock or drone device already exists. Please check the SN.",1086002005:"Device does not exist.",1086002006:"Device is offline.",1086003004:"No flight or payload control permission.",1086003005:"Dock is offline.",1086003006:"Drone is offline.",1086003028:"Device is offline. DRC control cannot be performed.",1086003032:"Live stream failed because the device is offline.",1086003033:"Unable to pull the device stream. Please try again.",1086003034:"Live stream type is not supported.",1086004001:'File name cannot contain illegal characters <>:"/',1086004002:"Route does not exist.",1086004003:"This route is used by pending tasks. Please delete the tasks first.",1086004004:"Route creation failed.",1086004005:"Route file name already exists.",1086004006:"The number of waypoints is less than 2.",1086004007:"The number of waypoints is greater than 50.",1086004008:"Route update failed.",1086005001:"Speaker or TTS file does not exist.",1086005002:"Speaker file upload failed.",1086005003:"Speaker file saving failed.",1086005004:"Invalid speaker file format. Only MP3 is supported.",1086005005:"Speaker file size exceeds the limit. A single file cannot exceed 5MB.",1086005006:"Speaker file name is duplicated on this device.",1086008001:"Route name cannot be empty.",1086008002:"Plan name already exists.",1086008003:"Execution time cannot be earlier than current time.",1086008004:"Plan does not exist.",1086008008:"Route task does not exist.",1086008014:"Task report is being generated. Please try again later.",1086009001:"Space name is duplicated.",1086009002:"Invalid parent space.",1086009003:"Detected circular parent space.",1086009004:"Space or child nodes are bound to devices and cannot be deleted.",1086009005:"Space level has reached the maximum limit.",1086009006:"Root node cannot be deleted.",1086009007:"Root node already exists and cannot be created again.",1086009008:"Failed to query monitoring device list.",1500000001:"Failed to initialize platform MQTT client instance.",1500000002:"Failed to connect to MQTT broker.",1500000003:"MQTT connection lost unexpectedly.",1500000004:"instanceName cannot be empty.",1500000005:"Forwarding configuration already exists.",1500000006:"Forwarding configuration does not exist.",1500000008:"Target instance is unavailable: {}",1500000009:"Request instance {} does not match current node {}.",1500000010:"Please disable forwarding configuration before deleting it.",1500000011:"Failed to release MQTT physical connection.",1500000012:"Changing forwarding configuration ownership through update is not allowed.",1500000013:"payloadTransformScript length cannot exceed {} characters.",1500000014:"payloadTransformScript compilation failed: {}",1500000015:"Invalid brokerUrl format. Use mqtt://host:port, mqtts://host:port, tcp://host:port, or ssl://host:port.",other:e0},r0="系统异常",a0={400:"参数错误",401:"用户没有权限(令牌、用户名、密码错误)!",403:"用户得到授权,但是访问是被禁止的。!",404:"网络请求错误,未找到该资源!",405:"网络请求错误,请求方法未允许!",408:"网络请求超时!",500:"系统错误",501:"网络未实现!",502:"网络错误!",503:"服务不可用,服务器暂时过载或维护!",504:"网络超时!",505:"http版本不支持该请求!",507:"超过最大导出数量为100000",7e5:"非法的CODE[{}]",700001:"导出数量超过限制,最大允许导出[{}]条",700002:"数据超过[{}]条,请缩小查询范围",700003:"设备[{}]不在线",700004:"设备[{}]未获取到GPS信息",700005:"文件已存在, 路径[{}]",700006:"文件名非法",700007:"文件大小超出限制",700008:"不支持的文件类型",700009:"文件为空",700010:"仅支持[{}]格式的文件",700011:"文件解析失败",700012:"文件保存失败",700013:"当前无在线设备",700014:"文件路径非法",700015:"文件上传失败",700016:"文件导出失败",700017:"用户不存在",700018:"文件不存在",700019:"参数为空",700020:"当地语言为空",700021:"设备历史数据不存在",700022:"设备[{}]经度为空",700023:"设备[{}]纬度为空",700025:"MD5算法不可用",700026:"导出异常",700027:"ID为空",701e3:"dpd-tdoa原始数据为空",701001:"dpd-tdoa原始数据详情为空",701002:"TDOA采集频率不正确",701003:"算法类型为空",701004:"飞行任务ID为空",701005:"靶标坐标为空",701006:"单次采集设备数量不能小于[{}]台",701007:"连续采集设备数量不能小于[{}]台",701008:"设备上报gpsTime异常",701009:"订正采集任务和采集记录异常",701010:"设备编码为空",701011:"设备[{}]有未完成采集任务,禁止重复下发",701012:"区域类型未匹配到预警等级[{}]",701013:"IQ数据文件存储失败",701014:"IQ数据文件存储失败",701015:"未找到固件元信息",701016:"固件数据为空",701017:"该设备型号和固件版本的固件已存在",701018:"上传解析固件失败",701019:"采集数据为空",701020:"采集任务ID为空",701021:"无人机上报图片保存失败",701022:"无人机上报图片转换失败",701023:"设备相对地面高度非法",701024:"设备侦测范围非法",701025:"无人机上报视频转换失败",701026:"轨迹数据保存失败",701027:"白名单数据已失效, 禁止修改",701028:"白名单数据已存在时间交叉, 禁止新增",701029:"秒数不能为负数",701030:"有效时间起为空",701031:"有效时间止为空",701032:"有效时间起大于有效时间止",701033:"有效时间止小于当前时间",701034:"有效时间起止相同",701035:"构建无人机预警数据异常",701036:"保存无人机数据失败",701037:"固件文件访问URL不存在",701038:"没有找到对应设备型号的设备,无法下发固件升级命令",701039:"设备固件发布状态为空",701040:"区域名称已存在",701041:"区域名称为空",701042:"无人机停飞事件处理推送失败",701043:"无人机通用识别类型为空",701044:"无人机识别类型为空",701045:"DISCERN_PARSE识别类型暂不支持锁定和解锁",701046:"TDOA结果上报事件处理失败, 设备编码[{}]",701047:"仿真日志推送事件处理失败",701048:"单次数据采集少于[{}]个IQ文件",701049:"侦测设备位置信息列表为空",701050:"无人机数据为空",701051:"算法结果是否合并参数为空",701052:"有无人机锁定,请先解锁后操作",701053:"锁定信息序列化失败",701054:"解析锁定信息失败",701055:"更新锁定成功动作失败",701056:"仅支持按小时或按天分组",701057:"固件包文件损坏或无法读取, 请检查固件文件是否符合规范",701058:"固件包中存在多个JSON文件, 请检查固件文件是否符合规范",701059:"固件包中存在多个BIN文件, 请检查固件文件是否符合规范",701060:"固件包中缺少JSON文件, 请检查固件文件是否符合规范",701061:"固件包中缺少BIN文件, 请检查固件文件是否符合规范",704e3:"标准化转发事件不能为空",704001:"事件标识不能为空",704002:"事件类型不能为空",704003:"防区编号不能为空",704004:"数据转发端点不能为空",704005:"待发送消息ID不能为空",704006:"待发送消息不存在",704007:"发送成功的消息不允许重发",704008:"待发送消息ID列表不能为空",704009:"待发送消息关联的端点不存在",704010:"待发送消息关联的主任务不存在",704011:"数据转发任务已禁用,请先启用后再重发",704012:"数据转发任务新增请求不能为空",704013:"数据转发任务更新请求不能为空",704014:"更新时任务ID不能为空",704015:"状态更新请求不能为空",704016:"数据转发任务ID不能为空",704017:"端点ID不能为空",704018:"端点状态请求不能为空",704019:"端点配置不能为空",704020:"上报方式不能为空",704021:"平台编码不能为空",704022:"平台名称不能为空",704023:"所属防区不存在",704024:"平台编码已存在,请更换后重试",704025:"启用数据转发任务前至少需要配置一个端点",704026:"同一任务下服务地址与Topic不允许重复",704027:"启用数据转发任务时至少需要一个启用中的端点",704028:"当前仅支持MQTT转发协议",704029:"消息可靠性仅允许0、1、2",704030:"持久会话配置非法",704031:"至少需要选择一种推送数据类型",704032:"存在不支持的推送数据类型",704033:"测试连接失败: [{}]",704034:"测试发送失败: [{}]",704035:"初始化数据转发MQTT客户端失败: [{}]",704036:"刷新数据转发MQTT客户端失败: [{}]",704037:"数据转发任务不存在",704038:"数据转发任务不能为空",704039:"数据转发任务已被其他用户修改,请刷新后重试",704040:"数据转发端点不存在",704041:"当前主任务已启用,至少需要保留一个启用中的端点",704042:"接口地址不能为空",704043:"Topic不能为空",704044:"MQTT客户端标识不能为空",704045:"接口地址格式非法,请使用tcp://ip:port",704046:"接口地址中的IP非法",704047:"接口地址中的端口非法,范围为1-65535",705e3:"配置ID不能为空",705001:"系统配置信息不能为空",705002:"配置值不能为空",705003:"配置键不能为空",705004:"配置键长度不能超过[{}]个字符",705005:"配置键已存在",705006:"配置不存在",1001000001:"参数配置不存在",1001000002:"参数配置 key 重复",1001000003:"不能删除类型为系统内置的参数配置",1001000004:"获取参数配置失败,原因:不允许获取不可见配置",1001003001:"文件不存在",1001003002:"文件为空",1001003003:"不支持的图片格式",1001003004:"图片文件过大",1001003005:"无法读取图片文件",1001006e3:"文件配置不存在",1001006001:"该文件配置不允许删除,原因:它是主配置,删除会导致无法上传文件",1002e6:"账号或密码错误!",1002000001:"登录失败,账号已停用!",1002000004:"验证码不正确",1002000005:"未绑定账号,需要进行绑定",1002000007:"手机号不存在",1002000008:"验证码不正确",1002001e3:"已经存在该名字的菜单",1002001001:"父菜单不存在",1002001002:"不能设置自己为父菜单",1002001003:"菜单不存在",1002001004:"存在子菜单,无法删除",1002001005:"父菜单的类型必须是目录或者菜单",1002001006:"已经存在该组件名的菜单",1002001007:"菜单子类型非法",1002001008:"菜单同步失败",1002001009:"菜单子节点层级超过限制",1002001010:"菜单 UUID 非法",1002001011:"父菜单不符合规范",1002002e3:"角色不存在",1002002001:"角色名称重复",1002002002:"角色编码已存在",1002002003:"不能操作类型为系统内置的角色",1002002004:"角色已被禁用",1002002005:"角色标识不能使用",1002002006:"不允许删除该角色",1002003e3:"该账号已被占用,请更换!",1002003001:"输入手机号已存在!",1002003002:"输入电子邮箱已存在!",1002003003:"用户不存在",1002003004:"导入用户数据不能为空!",1002003005:"旧密码输入错误!",1002003006:"该用户已被禁用",1002003008:"创建用户失败,超过租户最大租户配额",1002003010:"该手机号尚未注册",1002003011:"注册功能已关闭",1002003012:"该用户处于开启状态,不能删除",1002003013:"地区编码错误",1002003014:"登录账号仅展示,不允许编辑",1002003015:"解析失败",1002003016:"解析失败:单次导入数据不得超过10000条,请拆分文件!",1002003017:"解析失败:导入数据不能为空!",1002003018:"上传失败:文件大小超过 10MB 上限!",1002003019:"文件解析失败:仅支持上传 .xlsx 模板文件,请检查后重试!",1002005e3:"当前岗位不存在",1002005001:"岗位不处于开启状态,不允许选择",1002005002:"已经存在该名字的岗位",1002005003:"已经存在该标识的岗位",1002006001:"当前字典类型不存在",1002006002:"字典类型不处于开启状态,不允许选择",1002006003:"字典名称已存在",1002006004:"字典编码已存在",1002006005:"无法删除!当前字典下仍存在字典值!",1002006006:"字典同步请求不合法",1002007001:"当前字典数据不存在",1002007002:"字典数据不处于开启状态,不允许选择",1002007003:"字典键值已存在",1002007004:"字典标签已存在",1002031001:"授权已过期",10021e5:"文件服务异常,请检查并测试文件配置是否正确",1086001001:"系统错误",1086001002:"请求错误",1086001003:"枚举未找到",1086001004:"参数无效",1086001005:"文件为空",1086001006:"格式错误",1086002001:"制造商代码不存在",1086002002:"设备未注册,请先注册后再试!",1086002003:"设备创建参数无效",1086002004:"机库/无人机设备已存在,请检查SN码",1086002005:"设备不存在",1086002006:"设备离线",1086002007:"创建设备型号失败",1086002008:"查询所有列表失败",1086002009:"从父代码查询列表失败",1086002010:"远程调试操作失败",1086002011:"设备未注册远程调试",1086002012:"设备离线,无法进行远程调试",1086002013:"远程调试通信超时",1086002014:"远程调试MQTT错误",1086003001:"飞机调试未知错误",1086003002:"飞机已在返航中",1086003003:"飞机已在调试模式",1086003004:"无飞行/挂载控制权限",1086003005:"机库离线",1086003006:"无人机离线",1086003007:"机库控制指令报错",1086003008:"直点飞行启动报错",1086003009:"直点飞行停止报错",1086003010:"正在执行指令飞行操作,无法执行指点飞行,请稍后重试",1086003011:"正在执行指令飞行操作,无法执行航线下发,请稍后重试",1086003012:"正在执行自动降落/返航操作,无法执行指点飞行",1086003013:"正在执行自动降落/返航操作,无法执行航线下发",1086003014:"下发空中航线报错,具体错误原因:",1086003015:"下发空中航线报错,没有对应一键起飞参数",1086003016:"飞行基础配置不存在",1086003017:"无人机无法起飞,原因是",1086003018:"获取飞行控制权失败",1086003019:"获取负载控制权失败",1086003020:"负载控制命令执行报错",1086003021:"飞行基础配置未找到",1086003022:"保存飞行基础配置失败",1086003023:"进入DRC模式失败",1086003024:"DRC摇杆控制失败",1086003025:"DRC急停失败",1086003026:"DRC紧急迫降失败",1086003027:"设备离线,无法执行DRC控制",1086003028:"DRC探照灯模式设置失败",1086003029:"DRC探照灯亮度设置失败",1086003030:"DRC探照灯角度微调失败",1086003031:"DRC探照灯校准失败",1086003032:"直播流失败原因:设备离线",1086003033:"设备拉不到流,请重试",1086003034:"直播流类型不支持",1086004001:'文件名不能包含非法字符 <>:"/',1086004002:"航线不存在",1086004003:"存在有待执行任务使用该航线,请删除任务后重试!",1086004004:"航线创建失败",1086004005:"航线文件名称已存在",1086004006:"航点数小于2",1086004007:"航点数大于50",1086004008:"航线更新失败",1086004009:"全局返航高度必须为正整数",1086004010:"全局返航高度必须在20-1500之间",1086005001:"扬声器/tts文件不存在",1086005002:"扬声器文件上传失败",1086005003:"扬声器文件保存失败",1086005004:"扬声器文件格式无效,仅支持 MP3 格式",1086005005:"扬声器文件大小超出限制,单个文件大小不得超过 5MB",1086005006:"扬声器文件名重复,该设备已存在同名文件",1086005007:"扬声器文件参数无效",1086005008:"当文件类型为 0 时,必须提供录音文件",1086005009:"当文件类型为 1 时,必须提供扬声器内容",1086005010:"喊话文件超过最大限制数",1086005011:"当前文件状态为下载或传输中,不支持切换文件播放",1086005012:"扬声器未同步到设备,请稍后重试",1086005013:"MP3格式转PCM格式失败,请重新上传MP3文件后重试",1086005014:"录音内容为空",1086005015:"媒体文件不存在",1086005016:"媒体文件删除失败",1086005017:"媒体文件下载失败",1086005018:"文件路径不能为空",1086005019:"OSS文件删除失败",1086005020:"文件压缩失败",1086006001:"http服务调用失败",1086006002:"算法服务未配置",1086006003:"请等待算法服务处理完成!",1086007001:"地图标注不存在",1086008001:"航线名称不能为空",1086008002:"计划名称已存在",1086008003:"执行时间不能早于当前时间",1086008004:"计划不存在",1086008005:"方案计划不存在可执行任务",1086008006:"飞机尚未进入航线或已退出航线,无法暂停",1086008007:"不支持的航线任务控制指令",1086008008:"航线任务不存在",1086008009:"恢复航线任务失败",1086008010:"任务状态不为执行中,暂停失败",1086008011:"任务状态不支持终止",1086008012:"取消航线任务失败",1086008013:"飞机返航失败",1086008014:"任务报告生成中,请稍后重试",1086009001:"空间名称重复",1086009002:"空间父级无效",1086009003:"检测到空间父级循环",1086009004:"空间或其子节点已绑定设备,不允许删除",1086009005:"空间层级已达到最大限制,无法继续新增",1086009006:"根节点不允许删除",1086009007:"根节点已存在,不能重复创建根节点",1086009008:"查询监控设备列表错误",1086010001:"飞行区不存在",1500000001:"初始化平台 MQTT 客户端实例异常",1500000002:"与 MQTT 代理服务器连接失败",1500000003:"MQTT 连接意外丢失",1500000004:"instanceName 不能为空",1500000005:"转发配置已存在",1500000006:"转发配置不存在",1500000008:"目标实例不可用:{}",1500000009:"请求实例 {} 与当前节点 {} 不匹配",1500000010:"请先停用转发配置再删除",1500000011:"MQTT 物理连接释放失败",1500000012:"不允许通过更新变更转发配置归属实例",1500000013:"payloadTransformScript 长度不能超过 {} 字符",1500000014:"payloadTransformScript 编译失败:{}",1500000015:"brokerUrl 格式非法,需使用 mqtt://host:port、mqtts://host:port、tcp://host:port 或 ssl://host:port",other:r0},n0=[0,200],i0={"api.accountExpired":"Your account has expired. Please log in again.","api.permissionExpiredTitle":"Permission expired","api.permissionExpiredContent":"Your account has expired. Please log in again.","api.permissionExpiredOkText":"OK","api.networkExceptionMsg":"Network connection error","api.systemException":"System error","api.noPermissionOperation":"No permission to perform this operation","api.exportFailed":"Export failed","api.tokenExpired":"Your account has expired. Please log in again."},G=(e,t,n)=>s0(n)?i0[e]??t??e:t??e,s0=e=>typeof e=="string"&&e.toLowerCase().startsWith("en"),W=e=>{var s,u,d;if(typeof e!="string")return;const t=((s=e.match(/【([^】]+)】/))==null?void 0:s[1])||((u=e.match(/\(([^)]+)\)/))==null?void 0:u[1]),n=(d=e.match(/原因[::]\s*(.+)$/))==null?void 0:d[1],i={};return t&&(i.value=t),n&&(i.reason=n),Object.keys(i).length?i:void 0},o0=(e,t)=>(n,i,s)=>{var d;const u=(d=e==null?void 0:e.translate)==null?void 0:d.call(e,n,i,s);return u&&u!==n?u:G(n,i,t)},q=(e,t,n,i)=>{var x,w;const u=`api.errMsg${String(e??"")}`,d=(x=n==null?void 0:n.translate)==null?void 0:x.call(n,u,void 0,W(t));return d&&d!==u?d:typeof t=="string"&&t||((w=n==null?void 0:n.translate)==null?void 0:w.call(n,"api.systemException","系统异常"))||G("api.systemException","系统异常",i)},c0=(e,t,n="/admin-api")=>typeof e=="function"?e(t):e??`${n}/system/auth/refresh-token?refreshToken=${t??""}`,d0=e=>typeof e=="function"?e():e??"/login",O=(e,t=n0)=>t.some(n=>String(n)===String(e)),J=(e,t="Bearer")=>typeof t=="function"?t(e):t?`${t} ${e}`:e,A=()=>typeof window<"u"&&typeof document<"u",K="http-request-sdk:authorization-expired",U=a0,B=t0,Y=(e={})=>{var L;const t=o0(e.locale,e.lang);let n=!1,i=null;const s=_.create({baseURL:e.baseURL??"/admin-api",timeout:e.timeout??3e4,validateStatus:a=>a>=200&&a<300||a===400,paramsSerializer:((L=e.axiosConfig)==null?void 0:L.paramsSerializer)??{indexes:!0},headers:{"Content-Type":"application/json;charset=UTF-8"},...e.axiosConfig}),u=()=>{var f,y,p,l;const a=typeof e.getAccessToken=="function",r=typeof((f=e.token)==null?void 0:f.getAccessToken)=="function",o=((y=e.getAccessToken)==null?void 0:y.call(e))??((l=(p=e.token)==null?void 0:p.getAccessToken)==null?void 0:l.call(p));return console.info("[http-request-sdk][token]","access-token:resolve",{hasGetAccessToken:a,hasTokenGetAccessToken:r,hasToken:!!o,tokenLength:(o==null?void 0:o.length)??0}),o},d=(a,r)=>{console.info("[http-request-sdk][token]",a,{hasToken:!!r,tokenLength:(r==null?void 0:r.length)??0})},x=()=>{var a,r,o;return((a=e.getLocale)==null?void 0:a.call(e))??((o=(r=e.locale)==null?void 0:r.getLocale)==null?void 0:o.call(r))},w=()=>x()??e.lang,g=(a,r)=>C(a,r,w()),P=a=>{var r;(r=e.onBusinessError)==null||r.call(e,a)},E=a=>{var r;(r=e.onHttpError)==null||r.call(e,a)},k=a=>{var r,o;(o=(r=e.ui)==null?void 0:r.error)==null||o.call(r,a)},h=(a,r)=>{console.info("[http-request-sdk][permission-expired]",a,r??{})},S=()=>t("api.accountExpired","您的账号已失效,请重新登录"),T=async a=>{var y,p;const r={...a,message:S()};if(h("triggerTokenExpired:start",{code:r.code,message:r.message,hasShowPermissionExpired:!!((y=e.ui)!=null&&y.showPermissionExpired),modalVisible:n}),n){h("triggerTokenExpired:skip-visible",{code:r.code});return}const o=()=>{n=!1,h("modal:visible-reset",{code:r.code})},f=async()=>{var l,m,c,b;h("modal:onOk:start",{code:r.code,hasOnTokenExpired:!!e.onTokenExpired});try{e.onTokenExpired?await e.onTokenExpired(r):(await((m=(l=e.token)==null?void 0:l.logout)==null?void 0:m.call(l)),(b=(c=e.token)==null?void 0:c.clearToken)==null||b.call(c),A()&&(window.location.href=d0(e.loginUrl))),o(),h("modal:onOk:success",{code:r.code})}catch(M){h("modal:onOk:error",{code:r.code,error:M}),o()}};if(n=!0,h("modal:visible-set",{code:r.code}),(p=e.ui)!=null&&p.showPermissionExpired){h("modal:showPermissionExpired:call",{code:r.code}),e.ui.showPermissionExpired({title:t("api.permissionExpiredTitle","权限失效提醒"),content:r.message,okText:t("api.permissionExpiredOkText","我知道了"),onOk:f,onCancel:o});return}if(A()){h("modal:adapter-missing:native-alert",{code:r.code}),window.alert(`${t("api.permissionExpiredTitle","权限失效提醒")}
|
|
2
|
+
|
|
3
|
+
${r.message}`),await f();return}h("modal:adapter-missing:run-onOk-without-browser",{code:r.code}),await f()},R=a=>{var r,o,f,y,p;if(a)return a.accessToken&&((o=(r=e.token)==null?void 0:r.setToken)==null||o.call(r,a.accessToken)),a.refreshToken&&((y=(f=e.token)==null?void 0:f.setRefreshToken)==null||y.call(f,a.refreshToken)),(p=e.onRefreshTokenSuccess)==null||p.call(e,a),a.loginInfo},D=async()=>{var f,y,p,l,m,c;if(e.refreshAccessToken){const b=(y=(f=e.token)==null?void 0:f.getRefreshToken)==null?void 0:y.call(f);d("refresh-token:custom-get-refresh-token",b);const M=await e.refreshAccessToken({refreshToken:b,service:s});return R(M)}const a=(l=(p=e.token)==null?void 0:p.getRefreshToken)==null?void 0:l.call(p);d("refresh-token:get-refresh-token",a);const r=await _.post(c0(e.refreshTokenUrl,a,e.baseURL??"/admin-api"),void 0,{headers:g0(e.headers)}),o=((c=(m=e.token)==null?void 0:m.normalizeRefreshResponse)==null?void 0:c.call(m,r))??l0(r);if(o.code===401||o.code===400)throw new Error(S());return R(o)},X=()=>(i||(i=D().finally(()=>{i=null})),i);s.interceptors.request.use(a=>{const r=u();d("request:get-access-token",r);const o=x();return a.params=z(a.params),r&&F(a,e.authHeaderName??"Authorization",J(r,e.authScheme)),o&&F(a,e.localeHeaderName??"Accept-Language",o),p0(a,e.headers),a},a=>{var r;return(r=e.onRequestError)==null||r.call(e,a),Promise.reject(a)});const Z=(async a=>{var m;if(a.config.responseType==="blob")return u0(a,e,t);if(a.status!==200&&a.status!==400){const c=g((m=a.data)==null?void 0:m.code,t("api.networkExceptionMsg","网络连接异常"));return k(c),E({message:c,response:a}),Promise.reject(new Error(c))}const{code:r,msg:o,message:f,data:y}=a.data,l=o||f||t("api.systemException","系统异常");if(Number(r)===400){const c=S();return h("response:code-400:show-modal",{httpStatus:a.status,code:r,message:c,url:a.config.url}),await T({code:r,message:c,response:a}),P({code:r,message:c,response:a}),Promise.reject(new Error(c))}if(y0(a,e)){h("response:should-refresh-token",{httpStatus:a.status,code:r,message:l,url:a.config.url});const c=a.config;if(c._retry){const b=S();return h("response:retry-already-used",{code:r,url:a.config.url}),await T({code:r,message:b,response:a}),Promise.reject(new Error(b))}c._retry=!0;try{return h("refresh-token:start",{code:r,url:a.config.url}),await X(),h("refresh-token:success:retry-request",{code:r,url:a.config.url}),s.request(c)}catch(b){const M=S();return h("refresh-token:error:trigger-modal",{code:r,url:a.config.url,error:b}),await T({code:r,message:M,response:a,error:b}),Promise.reject(new Error(M))}}if(Number(r)===403){const c=g(r,t("api.noPermissionOperation","暂无操作权限"));return k(c),P({code:r,message:c,response:a}),Promise.reject(new Error(c))}if(Number(r)===510){const c={machineCode:j(y,"machineCode"),expireTime:j(y,"expireTime"),rawData:y};m0(c,a,e);return}if(Number(r)===1002031003)return P({code:r,message:l,response:a}),Promise.reject(new Error(l));if(!O(r,e.successCodes)){const c=g(r,q(r,l,e.locale,e.lang));return k(c),P({code:r,message:c,response:a}),Promise.reject(new Error(c))}return e.transformResponse?e.transformResponse(a.data):e.unwrapData?a.data.data:a.data});return s.interceptors.response.use(Z,a=>{var o,f,y,p;const{response:r}=a;if(r&&((o=r.config)==null?void 0:o.responseType)==="blob"&&typeof Blob<"u"&&r.data instanceof Blob)r.data.text().then(l=>{try{const m=JSON.parse(l),c=q(m.code,m.msg||m.message,e.locale,e.lang);Number(m.code)===403?k(g(m.code,t("api.noPermissionOperation","暂无操作权限"))):k(g(m.code,c||t("api.exportFailed","导出失败"))),E({code:m.code,message:g(m.code,c||t("api.exportFailed","导出失败")),response:r,error:a})}catch{const m=t("api.exportFailed","导出失败");k(m),E({message:m,response:r,error:a})}});else if((r==null?void 0:r.status)===403){const l=g((f=r.data)==null?void 0:f.code,t("api.noPermissionOperation","暂无操作权限"));k(l),E({code:403,message:l,response:r,error:a})}else if(r){const l=g((y=r.data)==null?void 0:y.code,t("api.networkExceptionMsg","网络连接异常"));k(l),E({code:r==null?void 0:r.status,message:l,response:r,error:a})}else{const l=t("api.networkExceptionMsg","网络连接异常");k(l),E({message:l,error:a})}return(p=e.onResponseError)==null||p.call(e,a),Promise.reject(a)}),{service:s,refreshToken:D,request:{request:a=>s.request(a),get:(a,r={})=>typeof a=="string"?s.get(a,$(r)):s.request({...a,method:"get"}),post:(a,r,o={})=>typeof a=="string"?s.post(a,r,o):s.request(N(a,"post",r,o)),put:(a,r,o={})=>typeof a=="string"?s.put(a,r,o):s.request(N(a,"put",r,o)),patch:(a,r,o={})=>typeof a=="string"?s.patch(a,r,o):s.request(N(a,"patch",r,o)),delete:(a,r={})=>typeof a=="string"?s.delete(a,$(r)):s.request({...a,method:"delete"})}}},l0=e=>{const t=e.data.data,n=e.data;return{code:e.data.code,accessToken:(t==null?void 0:t.accessToken)??n.accessToken,refreshToken:(t==null?void 0:t.refreshToken)??n.refreshToken,loginInfo:t}},u0=async(e,t,n)=>{var u,d,x,w,g,P,E,k,h,S;const i=((u=e.headers)==null?void 0:u["content-type"])||"";if(!String(i).includes("application/json"))return e.data;const s=await e.data.text();try{const T=JSON.parse(s);if(Number(T.code)===403){const D=C(T.code,n("api.noPermissionOperation","暂无操作权限"),H(t));return(x=(d=t.ui)==null?void 0:d.error)==null||x.call(d,D),(w=t.onBusinessError)==null||w.call(t,{code:T.code,message:D,response:e}),Promise.reject(new Error(D))}if(O(T.code,t.successCodes))return e.data;const R=C(T.code,q(T.code,T.msg||T.message,t.locale,t.lang),H(t));return(P=(g=t.ui)==null?void 0:g.error)==null||P.call(g,R),(E=t.onBusinessError)==null||E.call(t,{code:T.code,message:R,response:e}),Promise.reject(new Error(R))}catch{const T=n("api.exportFailed","导出失败");return(h=(k=t.ui)==null?void 0:k.error)==null||h.call(k,T),(S=t.onHttpError)==null||S.call(t,{message:T,response:e}),Promise.reject(new Error(T))}},m0=(e,t,n)=>{var i,s,u,d,x;if((i=n.onAuthorizationExpired)==null||i.call(n,{payload:e,response:t}),f0(n)){h0(e,n);return}e.expireTime?(u=(s=n.authorization)==null?void 0:s.openExpired)==null||u.call(s,e):(x=(d=n.authorization)==null?void 0:d.open)==null||x.call(d,e)},f0=e=>{var n;if((n=e.authorization)!=null&&n.isInMicroApp)return e.authorization.isInMicroApp();if(!A())return!1;const t=window;return!!(t.__MICRO_APP_ENVIRONMENT__||t.__MICRO_APP_BASE_APPLICATION__)},h0=(e,t)=>{var s,u,d,x;if((s=t.authorization)!=null&&s.dispatchMicroAppEvent){t.authorization.dispatchMicroAppEvent(e);return}if(!A())return;const n={type:"authorization_expired",machineCode:e.machineCode,expireTime:e.expireTime},i=(u=t.authorization)==null?void 0:u.eventCenterName;if(i){const g=window[i];if(typeof(g==null?void 0:g.dispatch)=="function"){g.dispatch({myname:((d=t.authorization)==null?void 0:d.microAppName)??i,data:n});return}}window.dispatchEvent(new CustomEvent(((x=t.authorization)==null?void 0:x.eventName)??K,{detail:n}))},j=(e,t)=>{if(!e||typeof e!="object")return;const n=e;return typeof n[t]=="string"?n[t]:void 0},C=(e,t,n)=>{if(e==null||e==="")return t;const i=Q(n)?B:U,s=Q(n)?U:B,u=String(e);return(i[u]??s[u])||t||i.other||s.other},Q=e=>typeof e=="string"&&e.toLowerCase().startsWith("en"),H=e=>{var t,n,i;return((t=e.getLocale)==null?void 0:t.call(e))??((i=(n=e.locale)==null?void 0:n.getLocale)==null?void 0:i.call(n))??e.lang},F=(e,t,n)=>{const i=e.headers;if(i&&typeof i.set=="function"){i.set(t,String(n));return}e.headers[t]=String(n)},p0=(e,t)=>{Object.entries(t??{}).forEach(([n,i])=>{i!=null&&(k0(e,n)||F(e,n,i))})},g0=e=>Object.entries(e??{}).reduce((t,[n,i])=>(i==null||(t[n]=String(i)),t),{}),y0=(e,t)=>{var n;return t.shouldRefreshToken?t.shouldRefreshToken(e):Number((n=e.data)==null?void 0:n.code)===401},N=(e,t,n,i={})=>({...i,...e,headers:b0(i.headers,e.headers),method:t,data:e.data??n??i.data}),$=e=>e?x0(e)?{...e,params:z(e.params)}:{params:z(e)}:{},z=e=>{if(!e)return e;if(typeof URLSearchParams<"u"&&e instanceof URLSearchParams){const s=new URLSearchParams(e);return s.delete("lang"),s}if(typeof e!="object"||Array.isArray(e))return e;const t=e,{lang:n,...i}=t;return i},T0=new Set(["adapter","auth","baseURL","cancelToken","data","decompress","headers","httpAgent","httpsAgent","maxBodyLength","maxContentLength","method","onDownloadProgress","onUploadProgress","params","paramsSerializer","proxy","responseEncoding","responseType","signal","socketPath","timeout","timeoutErrorMessage","transformRequest","transformResponse","transitional","url","validateStatus","withCredentials","xsrfCookieName","xsrfHeaderName"]),x0=e=>!e||typeof e!="object"||typeof URLSearchParams<"u"&&e instanceof URLSearchParams?!1:Object.keys(e).some(t=>T0.has(t)),k0=(e,t)=>{const n=e.headers;if(!n)return!1;if(typeof n.has=="function")return n.has(t);const i=t.toLowerCase();return Object.keys(n).some(s=>s.toLowerCase()===i)},b0=(e,t)=>e?t?{...V(e),...V(t)}:e:t,V=e=>e?typeof e.toJSON=="function"?e.toJSON():e:{};let I=null;const E0=e=>{const t=Y(e);return I=t,t},w0=e=>(I=e,e),v=()=>{if(!I)throw new Error("Request SDK is not initialized. Call setupRequestSdk(...) or install the Vue plugin first.");return I},S0={request:e=>v().request.request(e),get:(e,t)=>v().request.get(e,t),post:(e,t,n)=>v().request.post(e,t,n),put:(e,t,n)=>v().request.put(e,t,n),patch:(e,t,n)=>v().request.patch(e,t,n),delete:(e,t)=>v().request.delete(e,t)},v0=new Proxy({},{get(e,t){return Reflect.get(v().service,t)}});exports.AUTHORIZATION_EXPIRED_EVENT=K;exports.buildAuthHeaderValue=J;exports.createRequestSdk=Y;exports.extractI18nParams=W;exports.getBizErrorMsg=q;exports.getDefaultRequestSdk=v;exports.http=v0;exports.isSuccessCode=O;exports.request=S0;exports.setDefaultRequestSdk=w0;exports.setupRequestSdk=E0;
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./default-sdk-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./default-sdk-YJ5jh07z.cjs"),t=require("./adapters/storage-token.cjs");exports.AUTHORIZATION_EXPIRED_EVENT=e.AUTHORIZATION_EXPIRED_EVENT;exports.buildAuthHeaderValue=e.buildAuthHeaderValue;exports.createRequestSdk=e.createRequestSdk;exports.extractI18nParams=e.extractI18nParams;exports.getBizErrorMsg=e.getBizErrorMsg;exports.getDefaultRequestSdk=e.getDefaultRequestSdk;exports.http=e.http;exports.isSuccessCode=e.isSuccessCode;exports.request=e.request;exports.setDefaultRequestSdk=e.setDefaultRequestSdk;exports.setupRequestSdk=e.setupRequestSdk;exports.createStorageTokenAdapter=t.createStorageTokenAdapter;
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as a, b as t, c as r, e as u, g as d, a as o, h as c, i as R, r as S, s as g, d as k } from "./default-sdk-
|
|
1
|
+
import { A as a, b as t, c as r, e as u, g as d, a as o, h as c, i as R, r as S, s as g, d as k } from "./default-sdk-DidewzwC.js";
|
|
2
2
|
import { createStorageTokenAdapter as q } from "./adapters/storage-token.js";
|
|
3
3
|
export {
|
|
4
4
|
a as AUTHORIZATION_EXPIRED_EVENT,
|
package/dist/vue/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),s=require("../default-sdk-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),s=require("../default-sdk-YJ5jh07z.cjs"),u=Symbol("requestSdk"),l=r=>{const e=s.createRequestSdk(r);return{sdk:e,install(t){s.setDefaultRequestSdk(e),t.provide(u,e),t.config.globalProperties.$request=e.request,t.config.globalProperties.$http=e.service}}},n=()=>o.inject(u,null)??s.getDefaultRequestSdk();exports.createRequestSdkPlugin=l;exports.requestSdkKey=u;exports.useRequestSdk=n;
|
package/dist/vue/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";const L=require("axios"),Z="System error",e0={400:"Invalid request parameters",401:"Unauthorized. Token, username, or password is incorrect.",403:"Access is forbidden.",404:"Network request error. Resource not found.",405:"Network request error. Method not allowed.",408:"Network request timed out.",500:"System error",501:"Network request is not implemented.",502:"Network error.",503:"Service unavailable. The server is overloaded or under maintenance.",504:"Network timeout.",505:"HTTP version is not supported.",507:"The maximum export quantity is 100000.",7e5:"Invalid code [{}]",700001:"The export quantity exceeds the limit. The maximum allowed is [{}].",700002:"The data exceeds [{}] records. Please narrow the query range.",700003:"Device [{}] is offline.",700004:"Device [{}] has no GPS information.",700005:"File already exists. Path: [{}]",700006:"Invalid file name.",700007:"File size exceeds the limit.",700008:"Unsupported file type.",700009:"File is empty.",700010:"Only [{}] files are supported.",700011:"File parsing failed.",700012:"File saving failed.",700013:"No online devices.",700014:"Invalid file path.",700015:"File upload failed.",700016:"File export failed.",700017:"User does not exist.",700018:"File does not exist.",700019:"Parameter is empty.",700020:"Local language is empty.",700021:"Device history data does not exist.",700022:"Device [{}] longitude is empty.",700023:"Device [{}] latitude is empty.",700025:"MD5 algorithm is unavailable.",700026:"Export exception.",700027:"ID is empty.",701e3:"DPD-TDOA raw data is empty.",701001:"DPD-TDOA raw data details are empty.",701002:"TDOA collection frequency is incorrect.",701003:"Algorithm type is empty.",701004:"Flight task ID is empty.",701005:"Target coordinates are empty.",701006:"The number of devices for single collection cannot be less than [{}].",701007:"The number of devices for continuous collection cannot be less than [{}].",701008:"Device reported abnormal gpsTime.",701009:"Failed to correct collection task and record.",701010:"Device code is empty.",701011:"Device [{}] has unfinished collection tasks. Duplicate dispatch is not allowed.",701012:"No warning level matched for area type [{}].",701013:"Failed to store IQ data file.",701014:"Failed to store IQ data file.",701015:"Firmware metadata not found.",701016:"Firmware data is empty.",701017:"Firmware for this device model and version already exists.",701018:"Failed to upload and parse firmware.",701019:"Collection data is empty.",701020:"Collection task ID is empty.",701021:"Failed to save drone reported image.",701022:"Failed to convert drone reported image.",701023:"Device height above ground is invalid.",701024:"Device detection range is invalid.",701025:"Failed to convert drone reported video.",701026:"Failed to save trajectory data.",701027:"Whitelist data has expired and cannot be modified.",701028:"Whitelist data has overlapping time and cannot be added.",701029:"Seconds cannot be negative.",701030:"Start time is empty.",701031:"End time is empty.",701032:"Start time is later than end time.",701033:"End time is earlier than current time.",701034:"Start time and end time are the same.",701035:"Failed to build drone warning data.",701036:"Failed to save drone data.",701040:"Area name already exists.",701041:"Area name is empty.",701052:"There are locked drones. Please unlock them before operating.",701056:"Only hourly or daily grouping is supported.",701057:"Firmware package is damaged or unreadable. Please check the firmware file.",704001:"Event identifier cannot be empty.",704002:"Event type cannot be empty.",704003:"Defense area number cannot be empty.",704004:"Data forwarding endpoint cannot be empty.",704020:"Reporting method cannot be empty.",704021:"Platform code cannot be empty.",704022:"Platform name cannot be empty.",704023:"The defense area does not exist.",704024:"Platform code already exists. Please use another one.",704028:"Currently only MQTT forwarding protocol is supported.",704033:"Connection test failed: [{}]",704034:"Test sending failed: [{}]",704037:"Data forwarding task does not exist.",704040:"Data forwarding endpoint does not exist.",705e3:"Configuration ID cannot be empty.",705001:"System configuration information cannot be empty.",705002:"Configuration value cannot be empty.",705003:"Configuration key cannot be empty.",705004:"Configuration key length cannot exceed [{}] characters.",705005:"Configuration key already exists.",705006:"Configuration does not exist.",1001000001:"Parameter configuration does not exist.",1001000002:"Parameter configuration key is duplicated.",1001000003:"Built-in system parameter configurations cannot be deleted.",1001000004:"Failed to get parameter configuration because hidden configurations are not allowed.",1001003001:"File does not exist.",1001003002:"File is empty.",1001003003:"Unsupported image format.",1001003004:"Image file is too large.",1001003005:"Unable to read image file.",1001006e3:"File configuration does not exist.",1001006001:"This file configuration cannot be deleted because it is the primary configuration.",1002e6:"Incorrect account or password.",1002000001:"Login failed. The account has been disabled.",1002000004:"Incorrect verification code.",1002000005:"Account is not bound. Binding is required.",1002000007:"Phone number does not exist.",1002000008:"Incorrect verification code.",1002001e3:"A menu with this name already exists.",1002001001:"Parent menu does not exist.",1002001002:"Cannot set itself as parent menu.",1002001003:"Menu does not exist.",1002001004:"Child menus exist and cannot be deleted.",1002001005:"Parent menu type must be directory or menu.",1002001006:"A menu with this component name already exists.",1002001007:"Invalid menu subtype.",1002001008:"Menu synchronization failed.",1002001009:"Menu node level exceeds the limit.",1002001010:"Invalid menu UUID.",1002001011:"Parent menu does not meet the specification.",1002002e3:"Role does not exist.",1002002001:"Role name is duplicated.",1002002002:"Role code already exists.",1002002003:"Built-in system roles cannot be operated.",1002002004:"Role has been disabled.",1002002005:"Role identifier cannot be used.",1002002006:"This role cannot be deleted.",1002003e3:"This account is already used. Please change it.",1002003001:"The phone number already exists.",1002003002:"The email address already exists.",1002003003:"User does not exist.",1002003004:"Imported user data cannot be empty.",1002003005:"Old password is incorrect.",1002003006:"This user has been disabled.",1002003008:"Failed to create user. Tenant quota exceeded.",1002003010:"This phone number has not been registered.",1002003011:"Registration is disabled.",1002003012:"This user is enabled and cannot be deleted.",1002003013:"Invalid region code.",1002003014:"Login account is display-only and cannot be edited.",1002003015:"Parsing failed.",1002003016:"Parsing failed: each import cannot exceed 10000 records. Please split the file.",1002003017:"Parsing failed: imported data cannot be empty.",1002003018:"Upload failed: file size exceeds the 10MB limit.",1002003019:"File parsing failed: only .xlsx template files are supported.",1002005e3:"The current position does not exist.",1002005001:"The position is not enabled and cannot be selected.",1002005002:"A position with this name already exists.",1002005003:"A position with this identifier already exists.",1002006001:"The current dictionary type does not exist.",1002006002:"The dictionary type is not enabled and cannot be selected.",1002006003:"Dictionary name already exists.",1002006004:"Dictionary code already exists.",1002006005:"Cannot delete. Dictionary values still exist under this dictionary.",1002006006:"Invalid dictionary synchronization request.",1002007001:"The current dictionary data does not exist.",1002007002:"The dictionary data is not enabled and cannot be selected.",1002007003:"Dictionary key already exists.",1002007004:"Dictionary label already exists.",1002031001:"Authorization has expired.",10021e5:"File service exception. Please check and test the file configuration.",1086001001:"System error.",1086001002:"Request error.",1086001003:"Enum not found.",1086001004:"Invalid parameter.",1086001005:"File is empty.",1086001006:"Invalid format.",1086002001:"Manufacturer code does not exist.",1086002002:"Device is not registered. Please register it first.",1086002003:"Invalid device creation parameters.",1086002004:"Dock or drone device already exists. Please check the SN.",1086002005:"Device does not exist.",1086002006:"Device is offline.",1086003004:"No flight or payload control permission.",1086003005:"Dock is offline.",1086003006:"Drone is offline.",1086003028:"Device is offline. DRC control cannot be performed.",1086003032:"Live stream failed because the device is offline.",1086003033:"Unable to pull the device stream. Please try again.",1086003034:"Live stream type is not supported.",1086004001:'File name cannot contain illegal characters <>:"/',1086004002:"Route does not exist.",1086004003:"This route is used by pending tasks. Please delete the tasks first.",1086004004:"Route creation failed.",1086004005:"Route file name already exists.",1086004006:"The number of waypoints is less than 2.",1086004007:"The number of waypoints is greater than 50.",1086004008:"Route update failed.",1086005001:"Speaker or TTS file does not exist.",1086005002:"Speaker file upload failed.",1086005003:"Speaker file saving failed.",1086005004:"Invalid speaker file format. Only MP3 is supported.",1086005005:"Speaker file size exceeds the limit. A single file cannot exceed 5MB.",1086005006:"Speaker file name is duplicated on this device.",1086008001:"Route name cannot be empty.",1086008002:"Plan name already exists.",1086008003:"Execution time cannot be earlier than current time.",1086008004:"Plan does not exist.",1086008008:"Route task does not exist.",1086008014:"Task report is being generated. Please try again later.",1086009001:"Space name is duplicated.",1086009002:"Invalid parent space.",1086009003:"Detected circular parent space.",1086009004:"Space or child nodes are bound to devices and cannot be deleted.",1086009005:"Space level has reached the maximum limit.",1086009006:"Root node cannot be deleted.",1086009007:"Root node already exists and cannot be created again.",1086009008:"Failed to query monitoring device list.",1500000001:"Failed to initialize platform MQTT client instance.",1500000002:"Failed to connect to MQTT broker.",1500000003:"MQTT connection lost unexpectedly.",1500000004:"instanceName cannot be empty.",1500000005:"Forwarding configuration already exists.",1500000006:"Forwarding configuration does not exist.",1500000008:"Target instance is unavailable: {}",1500000009:"Request instance {} does not match current node {}.",1500000010:"Please disable forwarding configuration before deleting it.",1500000011:"Failed to release MQTT physical connection.",1500000012:"Changing forwarding configuration ownership through update is not allowed.",1500000013:"payloadTransformScript length cannot exceed {} characters.",1500000014:"payloadTransformScript compilation failed: {}",1500000015:"Invalid brokerUrl format. Use mqtt://host:port, mqtts://host:port, tcp://host:port, or ssl://host:port.",other:Z},t0="系统异常",r0={400:"参数错误",401:"用户没有权限(令牌、用户名、密码错误)!",403:"用户得到授权,但是访问是被禁止的。!",404:"网络请求错误,未找到该资源!",405:"网络请求错误,请求方法未允许!",408:"网络请求超时!",500:"系统错误",501:"网络未实现!",502:"网络错误!",503:"服务不可用,服务器暂时过载或维护!",504:"网络超时!",505:"http版本不支持该请求!",507:"超过最大导出数量为100000",7e5:"非法的CODE[{}]",700001:"导出数量超过限制,最大允许导出[{}]条",700002:"数据超过[{}]条,请缩小查询范围",700003:"设备[{}]不在线",700004:"设备[{}]未获取到GPS信息",700005:"文件已存在, 路径[{}]",700006:"文件名非法",700007:"文件大小超出限制",700008:"不支持的文件类型",700009:"文件为空",700010:"仅支持[{}]格式的文件",700011:"文件解析失败",700012:"文件保存失败",700013:"当前无在线设备",700014:"文件路径非法",700015:"文件上传失败",700016:"文件导出失败",700017:"用户不存在",700018:"文件不存在",700019:"参数为空",700020:"当地语言为空",700021:"设备历史数据不存在",700022:"设备[{}]经度为空",700023:"设备[{}]纬度为空",700025:"MD5算法不可用",700026:"导出异常",700027:"ID为空",701e3:"dpd-tdoa原始数据为空",701001:"dpd-tdoa原始数据详情为空",701002:"TDOA采集频率不正确",701003:"算法类型为空",701004:"飞行任务ID为空",701005:"靶标坐标为空",701006:"单次采集设备数量不能小于[{}]台",701007:"连续采集设备数量不能小于[{}]台",701008:"设备上报gpsTime异常",701009:"订正采集任务和采集记录异常",701010:"设备编码为空",701011:"设备[{}]有未完成采集任务,禁止重复下发",701012:"区域类型未匹配到预警等级[{}]",701013:"IQ数据文件存储失败",701014:"IQ数据文件存储失败",701015:"未找到固件元信息",701016:"固件数据为空",701017:"该设备型号和固件版本的固件已存在",701018:"上传解析固件失败",701019:"采集数据为空",701020:"采集任务ID为空",701021:"无人机上报图片保存失败",701022:"无人机上报图片转换失败",701023:"设备相对地面高度非法",701024:"设备侦测范围非法",701025:"无人机上报视频转换失败",701026:"轨迹数据保存失败",701027:"白名单数据已失效, 禁止修改",701028:"白名单数据已存在时间交叉, 禁止新增",701029:"秒数不能为负数",701030:"有效时间起为空",701031:"有效时间止为空",701032:"有效时间起大于有效时间止",701033:"有效时间止小于当前时间",701034:"有效时间起止相同",701035:"构建无人机预警数据异常",701036:"保存无人机数据失败",701037:"固件文件访问URL不存在",701038:"没有找到对应设备型号的设备,无法下发固件升级命令",701039:"设备固件发布状态为空",701040:"区域名称已存在",701041:"区域名称为空",701042:"无人机停飞事件处理推送失败",701043:"无人机通用识别类型为空",701044:"无人机识别类型为空",701045:"DISCERN_PARSE识别类型暂不支持锁定和解锁",701046:"TDOA结果上报事件处理失败, 设备编码[{}]",701047:"仿真日志推送事件处理失败",701048:"单次数据采集少于[{}]个IQ文件",701049:"侦测设备位置信息列表为空",701050:"无人机数据为空",701051:"算法结果是否合并参数为空",701052:"有无人机锁定,请先解锁后操作",701053:"锁定信息序列化失败",701054:"解析锁定信息失败",701055:"更新锁定成功动作失败",701056:"仅支持按小时或按天分组",701057:"固件包文件损坏或无法读取, 请检查固件文件是否符合规范",701058:"固件包中存在多个JSON文件, 请检查固件文件是否符合规范",701059:"固件包中存在多个BIN文件, 请检查固件文件是否符合规范",701060:"固件包中缺少JSON文件, 请检查固件文件是否符合规范",701061:"固件包中缺少BIN文件, 请检查固件文件是否符合规范",704e3:"标准化转发事件不能为空",704001:"事件标识不能为空",704002:"事件类型不能为空",704003:"防区编号不能为空",704004:"数据转发端点不能为空",704005:"待发送消息ID不能为空",704006:"待发送消息不存在",704007:"发送成功的消息不允许重发",704008:"待发送消息ID列表不能为空",704009:"待发送消息关联的端点不存在",704010:"待发送消息关联的主任务不存在",704011:"数据转发任务已禁用,请先启用后再重发",704012:"数据转发任务新增请求不能为空",704013:"数据转发任务更新请求不能为空",704014:"更新时任务ID不能为空",704015:"状态更新请求不能为空",704016:"数据转发任务ID不能为空",704017:"端点ID不能为空",704018:"端点状态请求不能为空",704019:"端点配置不能为空",704020:"上报方式不能为空",704021:"平台编码不能为空",704022:"平台名称不能为空",704023:"所属防区不存在",704024:"平台编码已存在,请更换后重试",704025:"启用数据转发任务前至少需要配置一个端点",704026:"同一任务下服务地址与Topic不允许重复",704027:"启用数据转发任务时至少需要一个启用中的端点",704028:"当前仅支持MQTT转发协议",704029:"消息可靠性仅允许0、1、2",704030:"持久会话配置非法",704031:"至少需要选择一种推送数据类型",704032:"存在不支持的推送数据类型",704033:"测试连接失败: [{}]",704034:"测试发送失败: [{}]",704035:"初始化数据转发MQTT客户端失败: [{}]",704036:"刷新数据转发MQTT客户端失败: [{}]",704037:"数据转发任务不存在",704038:"数据转发任务不能为空",704039:"数据转发任务已被其他用户修改,请刷新后重试",704040:"数据转发端点不存在",704041:"当前主任务已启用,至少需要保留一个启用中的端点",704042:"接口地址不能为空",704043:"Topic不能为空",704044:"MQTT客户端标识不能为空",704045:"接口地址格式非法,请使用tcp://ip:port",704046:"接口地址中的IP非法",704047:"接口地址中的端口非法,范围为1-65535",705e3:"配置ID不能为空",705001:"系统配置信息不能为空",705002:"配置值不能为空",705003:"配置键不能为空",705004:"配置键长度不能超过[{}]个字符",705005:"配置键已存在",705006:"配置不存在",1001000001:"参数配置不存在",1001000002:"参数配置 key 重复",1001000003:"不能删除类型为系统内置的参数配置",1001000004:"获取参数配置失败,原因:不允许获取不可见配置",1001003001:"文件不存在",1001003002:"文件为空",1001003003:"不支持的图片格式",1001003004:"图片文件过大",1001003005:"无法读取图片文件",1001006e3:"文件配置不存在",1001006001:"该文件配置不允许删除,原因:它是主配置,删除会导致无法上传文件",1002e6:"账号或密码错误!",1002000001:"登录失败,账号已停用!",1002000004:"验证码不正确",1002000005:"未绑定账号,需要进行绑定",1002000007:"手机号不存在",1002000008:"验证码不正确",1002001e3:"已经存在该名字的菜单",1002001001:"父菜单不存在",1002001002:"不能设置自己为父菜单",1002001003:"菜单不存在",1002001004:"存在子菜单,无法删除",1002001005:"父菜单的类型必须是目录或者菜单",1002001006:"已经存在该组件名的菜单",1002001007:"菜单子类型非法",1002001008:"菜单同步失败",1002001009:"菜单子节点层级超过限制",1002001010:"菜单 UUID 非法",1002001011:"父菜单不符合规范",1002002e3:"角色不存在",1002002001:"角色名称重复",1002002002:"角色编码已存在",1002002003:"不能操作类型为系统内置的角色",1002002004:"角色已被禁用",1002002005:"角色标识不能使用",1002002006:"不允许删除该角色",1002003e3:"该账号已被占用,请更换!",1002003001:"输入手机号已存在!",1002003002:"输入电子邮箱已存在!",1002003003:"用户不存在",1002003004:"导入用户数据不能为空!",1002003005:"旧密码输入错误!",1002003006:"该用户已被禁用",1002003008:"创建用户失败,超过租户最大租户配额",1002003010:"该手机号尚未注册",1002003011:"注册功能已关闭",1002003012:"该用户处于开启状态,不能删除",1002003013:"地区编码错误",1002003014:"登录账号仅展示,不允许编辑",1002003015:"解析失败",1002003016:"解析失败:单次导入数据不得超过10000条,请拆分文件!",1002003017:"解析失败:导入数据不能为空!",1002003018:"上传失败:文件大小超过 10MB 上限!",1002003019:"文件解析失败:仅支持上传 .xlsx 模板文件,请检查后重试!",1002005e3:"当前岗位不存在",1002005001:"岗位不处于开启状态,不允许选择",1002005002:"已经存在该名字的岗位",1002005003:"已经存在该标识的岗位",1002006001:"当前字典类型不存在",1002006002:"字典类型不处于开启状态,不允许选择",1002006003:"字典名称已存在",1002006004:"字典编码已存在",1002006005:"无法删除!当前字典下仍存在字典值!",1002006006:"字典同步请求不合法",1002007001:"当前字典数据不存在",1002007002:"字典数据不处于开启状态,不允许选择",1002007003:"字典键值已存在",1002007004:"字典标签已存在",1002031001:"授权已过期",10021e5:"文件服务异常,请检查并测试文件配置是否正确",1086001001:"系统错误",1086001002:"请求错误",1086001003:"枚举未找到",1086001004:"参数无效",1086001005:"文件为空",1086001006:"格式错误",1086002001:"制造商代码不存在",1086002002:"设备未注册,请先注册后再试!",1086002003:"设备创建参数无效",1086002004:"机库/无人机设备已存在,请检查SN码",1086002005:"设备不存在",1086002006:"设备离线",1086002007:"创建设备型号失败",1086002008:"查询所有列表失败",1086002009:"从父代码查询列表失败",1086002010:"远程调试操作失败",1086002011:"设备未注册远程调试",1086002012:"设备离线,无法进行远程调试",1086002013:"远程调试通信超时",1086002014:"远程调试MQTT错误",1086003001:"飞机调试未知错误",1086003002:"飞机已在返航中",1086003003:"飞机已在调试模式",1086003004:"无飞行/挂载控制权限",1086003005:"机库离线",1086003006:"无人机离线",1086003007:"机库控制指令报错",1086003008:"直点飞行启动报错",1086003009:"直点飞行停止报错",1086003010:"正在执行指令飞行操作,无法执行指点飞行,请稍后重试",1086003011:"正在执行指令飞行操作,无法执行航线下发,请稍后重试",1086003012:"正在执行自动降落/返航操作,无法执行指点飞行",1086003013:"正在执行自动降落/返航操作,无法执行航线下发",1086003014:"下发空中航线报错,具体错误原因:",1086003015:"下发空中航线报错,没有对应一键起飞参数",1086003016:"飞行基础配置不存在",1086003017:"无人机无法起飞,原因是",1086003018:"获取飞行控制权失败",1086003019:"获取负载控制权失败",1086003020:"负载控制命令执行报错",1086003021:"飞行基础配置未找到",1086003022:"保存飞行基础配置失败",1086003023:"进入DRC模式失败",1086003024:"DRC摇杆控制失败",1086003025:"DRC急停失败",1086003026:"DRC紧急迫降失败",1086003027:"设备离线,无法执行DRC控制",1086003028:"DRC探照灯模式设置失败",1086003029:"DRC探照灯亮度设置失败",1086003030:"DRC探照灯角度微调失败",1086003031:"DRC探照灯校准失败",1086003032:"直播流失败原因:设备离线",1086003033:"设备拉不到流,请重试",1086003034:"直播流类型不支持",1086004001:'文件名不能包含非法字符 <>:"/',1086004002:"航线不存在",1086004003:"存在有待执行任务使用该航线,请删除任务后重试!",1086004004:"航线创建失败",1086004005:"航线文件名称已存在",1086004006:"航点数小于2",1086004007:"航点数大于50",1086004008:"航线更新失败",1086004009:"全局返航高度必须为正整数",1086004010:"全局返航高度必须在20-1500之间",1086005001:"扬声器/tts文件不存在",1086005002:"扬声器文件上传失败",1086005003:"扬声器文件保存失败",1086005004:"扬声器文件格式无效,仅支持 MP3 格式",1086005005:"扬声器文件大小超出限制,单个文件大小不得超过 5MB",1086005006:"扬声器文件名重复,该设备已存在同名文件",1086005007:"扬声器文件参数无效",1086005008:"当文件类型为 0 时,必须提供录音文件",1086005009:"当文件类型为 1 时,必须提供扬声器内容",1086005010:"喊话文件超过最大限制数",1086005011:"当前文件状态为下载或传输中,不支持切换文件播放",1086005012:"扬声器未同步到设备,请稍后重试",1086005013:"MP3格式转PCM格式失败,请重新上传MP3文件后重试",1086005014:"录音内容为空",1086005015:"媒体文件不存在",1086005016:"媒体文件删除失败",1086005017:"媒体文件下载失败",1086005018:"文件路径不能为空",1086005019:"OSS文件删除失败",1086005020:"文件压缩失败",1086006001:"http服务调用失败",1086006002:"算法服务未配置",1086006003:"请等待算法服务处理完成!",1086007001:"地图标注不存在",1086008001:"航线名称不能为空",1086008002:"计划名称已存在",1086008003:"执行时间不能早于当前时间",1086008004:"计划不存在",1086008005:"方案计划不存在可执行任务",1086008006:"飞机尚未进入航线或已退出航线,无法暂停",1086008007:"不支持的航线任务控制指令",1086008008:"航线任务不存在",1086008009:"恢复航线任务失败",1086008010:"任务状态不为执行中,暂停失败",1086008011:"任务状态不支持终止",1086008012:"取消航线任务失败",1086008013:"飞机返航失败",1086008014:"任务报告生成中,请稍后重试",1086009001:"空间名称重复",1086009002:"空间父级无效",1086009003:"检测到空间父级循环",1086009004:"空间或其子节点已绑定设备,不允许删除",1086009005:"空间层级已达到最大限制,无法继续新增",1086009006:"根节点不允许删除",1086009007:"根节点已存在,不能重复创建根节点",1086009008:"查询监控设备列表错误",1086010001:"飞行区不存在",1500000001:"初始化平台 MQTT 客户端实例异常",1500000002:"与 MQTT 代理服务器连接失败",1500000003:"MQTT 连接意外丢失",1500000004:"instanceName 不能为空",1500000005:"转发配置已存在",1500000006:"转发配置不存在",1500000008:"目标实例不可用:{}",1500000009:"请求实例 {} 与当前节点 {} 不匹配",1500000010:"请先停用转发配置再删除",1500000011:"MQTT 物理连接释放失败",1500000012:"不允许通过更新变更转发配置归属实例",1500000013:"payloadTransformScript 长度不能超过 {} 字符",1500000014:"payloadTransformScript 编译失败:{}",1500000015:"brokerUrl 格式非法,需使用 mqtt://host:port、mqtts://host:port、tcp://host:port 或 ssl://host:port",other:t0},a0=[0,200],n0={"api.accountExpired":"Your account has expired. Please log in again.","api.permissionExpiredTitle":"Permission expired","api.permissionExpiredContent":"Your account has expired. Please log in again.","api.permissionExpiredOkText":"OK","api.networkExceptionMsg":"Network connection error","api.systemException":"System error","api.noPermissionOperation":"No permission to perform this operation","api.exportFailed":"Export failed","api.tokenExpired":"Your account has expired. Please log in again."},V=(e,t,n)=>i0(n)?n0[e]??t??e:t??e,i0=e=>typeof e=="string"&&e.toLowerCase().startsWith("en"),G=e=>{var o,u,c;if(typeof e!="string")return;const t=((o=e.match(/【([^】]+)】/))==null?void 0:o[1])||((u=e.match(/\(([^)]+)\)/))==null?void 0:u[1]),n=(c=e.match(/原因[::]\s*(.+)$/))==null?void 0:c[1],i={};return t&&(i.value=t),n&&(i.reason=n),Object.keys(i).length?i:void 0},s0=(e,t)=>(n,i,o)=>{var c;const u=(c=e==null?void 0:e.translate)==null?void 0:c.call(e,n,i,o);return u&&u!==n?u:V(n,i,t)},q=(e,t,n,i)=>{var x,w;const u=`api.errMsg${String(e??"")}`,c=(x=n==null?void 0:n.translate)==null?void 0:x.call(n,u,void 0,G(t));return c&&c!==u?c:typeof t=="string"&&t||((w=n==null?void 0:n.translate)==null?void 0:w.call(n,"api.systemException","系统异常"))||V("api.systemException","系统异常",i)},o0=(e,t,n="/admin-api")=>typeof e=="function"?e(t):e??`${n}/system/auth/refresh-token?refreshToken=${t??""}`,d0=e=>typeof e=="function"?e():e??"/login",O=(e,t=a0)=>t.some(n=>String(n)===String(e)),W=(e,t="Bearer")=>typeof t=="function"?t(e):t?`${t} ${e}`:e,A=()=>typeof window<"u"&&typeof document<"u",J="http-request-sdk:authorization-expired",U=r0,B=e0,K=(e={})=>{var _;const t=s0(e.locale,e.lang);let n=!1,i=null;const o=L.create({baseURL:e.baseURL??"/admin-api",timeout:e.timeout??3e4,validateStatus:a=>a>=200&&a<300||a===400,paramsSerializer:((_=e.axiosConfig)==null?void 0:_.paramsSerializer)??{indexes:!0},headers:{"Content-Type":"application/json;charset=UTF-8"},...e.axiosConfig}),u=()=>{var h,y,p,l;const a=typeof e.getAccessToken=="function",r=typeof((h=e.token)==null?void 0:h.getAccessToken)=="function",s=((y=e.getAccessToken)==null?void 0:y.call(e))??((l=(p=e.token)==null?void 0:p.getAccessToken)==null?void 0:l.call(p));return console.info("[http-request-sdk][token]","access-token:resolve",{hasGetAccessToken:a,hasTokenGetAccessToken:r,hasToken:!!s,tokenLength:(s==null?void 0:s.length)??0}),s},c=(a,r)=>{console.info("[http-request-sdk][token]",a,{hasToken:!!r,tokenLength:(r==null?void 0:r.length)??0})},x=()=>{var a,r,s;return((a=e.getLocale)==null?void 0:a.call(e))??((s=(r=e.locale)==null?void 0:r.getLocale)==null?void 0:s.call(r))},w=()=>x()??e.lang,g=(a,r)=>C(a,r,w()),P=a=>{var r;(r=e.onBusinessError)==null||r.call(e,a)},E=a=>{var r;(r=e.onHttpError)==null||r.call(e,a)},k=a=>{var r,s;(s=(r=e.ui)==null?void 0:r.error)==null||s.call(r,a)},f=(a,r)=>{console.info("[http-request-sdk][permission-expired]",a,r??{})},v=()=>t("api.accountExpired","您的账号已失效,请重新登录"),T=async a=>{var y,p;const r={...a,message:v()};if(f("triggerTokenExpired:start",{code:r.code,message:r.message,hasShowPermissionExpired:!!((y=e.ui)!=null&&y.showPermissionExpired),modalVisible:n}),n){f("triggerTokenExpired:skip-visible",{code:r.code});return}const s=()=>{n=!1,f("modal:visible-reset",{code:r.code})},h=async()=>{var l,m,d,b;f("modal:onOk:start",{code:r.code,hasOnTokenExpired:!!e.onTokenExpired});try{e.onTokenExpired?await e.onTokenExpired(r):(await((m=(l=e.token)==null?void 0:l.logout)==null?void 0:m.call(l)),(b=(d=e.token)==null?void 0:d.clearToken)==null||b.call(d),A()&&(window.location.href=d0(e.loginUrl))),s(),f("modal:onOk:success",{code:r.code})}catch(M){f("modal:onOk:error",{code:r.code,error:M}),s()}};if(n=!0,f("modal:visible-set",{code:r.code}),(p=e.ui)!=null&&p.showPermissionExpired){f("modal:showPermissionExpired:call",{code:r.code}),e.ui.showPermissionExpired({title:t("api.permissionExpiredTitle","权限失效提醒"),content:r.message,okText:t("api.permissionExpiredOkText","我知道了"),onOk:h,onCancel:s});return}if(A()){f("modal:adapter-missing:native-alert",{code:r.code}),window.alert(`${t("api.permissionExpiredTitle","权限失效提醒")}
|
|
2
|
-
|
|
3
|
-
${r.message}`),await h();return}f("modal:adapter-missing:run-onOk-without-browser",{code:r.code}),await h()},R=a=>{var r,s,h,y,p;if(a)return a.accessToken&&((s=(r=e.token)==null?void 0:r.setToken)==null||s.call(r,a.accessToken)),a.refreshToken&&((y=(h=e.token)==null?void 0:h.setRefreshToken)==null||y.call(h,a.refreshToken)),(p=e.onRefreshTokenSuccess)==null||p.call(e,a),a.loginInfo},D=async()=>{var h,y,p,l,m,d;if(e.refreshAccessToken){const b=(y=(h=e.token)==null?void 0:h.getRefreshToken)==null?void 0:y.call(h);c("refresh-token:custom-get-refresh-token",b);const M=await e.refreshAccessToken({refreshToken:b,service:o});return R(M)}const a=(l=(p=e.token)==null?void 0:p.getRefreshToken)==null?void 0:l.call(p);c("refresh-token:get-refresh-token",a);const r=await L.post(o0(e.refreshTokenUrl,a,e.baseURL??"/admin-api"),void 0,{headers:p0(e.headers)}),s=((d=(m=e.token)==null?void 0:m.normalizeRefreshResponse)==null?void 0:d.call(m,r))??c0(r);if(s.code===401||s.code===400)throw new Error(v());return R(s)},Y=()=>(i||(i=D().finally(()=>{i=null})),i);o.interceptors.request.use(a=>{const r=u();c("request:get-access-token",r);const s=x();return a.params=z(a.params),r&&F(a,e.authHeaderName??"Authorization",W(r,e.authScheme)),s&&F(a,e.localeHeaderName??"Accept-Language",s),f0(a,e.headers),a},a=>{var r;return(r=e.onRequestError)==null||r.call(e,a),Promise.reject(a)});const X=(async a=>{var m;if(a.config.responseType==="blob")return l0(a,e,t);if(a.status!==200&&a.status!==400){const d=g((m=a.data)==null?void 0:m.code,t("api.networkExceptionMsg","网络连接异常"));return k(d),E({message:d,response:a}),Promise.reject(new Error(d))}const{code:r,msg:s,message:h,data:y}=a.data,l=s||h||t("api.systemException","系统异常");if(Number(r)===400){const d=v();return f("response:code-400:show-modal",{httpStatus:a.status,code:r,message:d,url:a.config.url}),await T({code:r,message:d,response:a}),P({code:r,message:d,response:a}),Promise.reject(new Error(d))}if(g0(a,e)){f("response:should-refresh-token",{httpStatus:a.status,code:r,message:l,url:a.config.url});const d=a.config;if(d._retry){const b=v();return f("response:retry-already-used",{code:r,url:a.config.url}),await T({code:r,message:b,response:a}),Promise.reject(new Error(b))}d._retry=!0;try{return f("refresh-token:start",{code:r,url:a.config.url}),await Y(),f("refresh-token:success:retry-request",{code:r,url:a.config.url}),o.request(d)}catch(b){const M=v();return f("refresh-token:error:trigger-modal",{code:r,url:a.config.url,error:b}),await T({code:r,message:M,response:a,error:b}),Promise.reject(new Error(M))}}if(Number(r)===403){const d=g(r,t("api.noPermissionOperation","暂无操作权限"));return k(d),P({code:r,message:d,response:a}),Promise.reject(new Error(d))}if(Number(r)===510){const d={machineCode:j(y,"machineCode"),expireTime:j(y,"expireTime"),rawData:y};u0(d,a,e);return}if(Number(r)===1002031003)return P({code:r,message:l,response:a}),Promise.reject(new Error(l));if(!O(r,e.successCodes)){const d=g(r,q(r,l,e.locale,e.lang));return k(d),P({code:r,message:d,response:a}),Promise.reject(new Error(d))}return e.transformResponse?e.transformResponse(a.data):e.unwrapData?a.data.data:a.data});return o.interceptors.response.use(X,a=>{var s,h,y,p;const{response:r}=a;if(r&&((s=r.config)==null?void 0:s.responseType)==="blob"&&typeof Blob<"u"&&r.data instanceof Blob)r.data.text().then(l=>{try{const m=JSON.parse(l),d=q(m.code,m.msg||m.message,e.locale,e.lang);Number(m.code)===403?k(g(m.code,t("api.noPermissionOperation","暂无操作权限"))):k(g(m.code,d||t("api.exportFailed","导出失败"))),E({code:m.code,message:g(m.code,d||t("api.exportFailed","导出失败")),response:r,error:a})}catch{const m=t("api.exportFailed","导出失败");k(m),E({message:m,response:r,error:a})}});else if((r==null?void 0:r.status)===403){const l=g((h=r.data)==null?void 0:h.code,t("api.noPermissionOperation","暂无操作权限"));k(l),E({code:403,message:l,response:r,error:a})}else if(r){const l=g((y=r.data)==null?void 0:y.code,t("api.networkExceptionMsg","网络连接异常"));k(l),E({code:r==null?void 0:r.status,message:l,response:r,error:a})}else{const l=t("api.networkExceptionMsg","网络连接异常");k(l),E({message:l,error:a})}return(p=e.onResponseError)==null||p.call(e,a),Promise.reject(a)}),{service:o,refreshToken:D,request:{request:a=>o.request(a),get:(a,r={})=>typeof a=="string"?o.get(a,$(r)):o.request({...a,method:"get"}),post:(a,r,s={})=>typeof a=="string"?o.post(a,r,s):o.request(N(a,"post",r,s)),put:(a,r,s={})=>typeof a=="string"?o.put(a,r,s):o.request(N(a,"put",r,s)),patch:(a,r,s={})=>typeof a=="string"?o.patch(a,r,s):o.request(N(a,"patch",r,s)),delete:(a,r={})=>typeof a=="string"?o.delete(a,$(r)):o.request({...a,method:"delete"})}}},c0=e=>{const t=e.data.data,n=e.data;return{code:e.data.code,accessToken:(t==null?void 0:t.accessToken)??n.accessToken,refreshToken:(t==null?void 0:t.refreshToken)??n.refreshToken,loginInfo:t}},l0=async(e,t,n)=>{var u,c,x,w,g,P,E,k,f,v;const i=((u=e.headers)==null?void 0:u["content-type"])||"";if(!String(i).includes("application/json"))return e.data;const o=await e.data.text();try{const T=JSON.parse(o);if(Number(T.code)===403){const D=C(T.code,n("api.noPermissionOperation","暂无操作权限"),H(t));return(x=(c=t.ui)==null?void 0:c.error)==null||x.call(c,D),(w=t.onBusinessError)==null||w.call(t,{code:T.code,message:D,response:e}),Promise.reject(new Error(D))}if(O(T.code,t.successCodes))return e.data;const R=C(T.code,q(T.code,T.msg||T.message,t.locale,t.lang),H(t));return(P=(g=t.ui)==null?void 0:g.error)==null||P.call(g,R),(E=t.onBusinessError)==null||E.call(t,{code:T.code,message:R,response:e}),Promise.reject(new Error(R))}catch{const T=n("api.exportFailed","导出失败");return(f=(k=t.ui)==null?void 0:k.error)==null||f.call(k,T),(v=t.onHttpError)==null||v.call(t,{message:T,response:e}),Promise.reject(new Error(T))}},u0=(e,t,n)=>{var i,o,u,c,x;if((i=n.onAuthorizationExpired)==null||i.call(n,{payload:e,response:t}),m0(n)){h0(e,n);return}e.expireTime?(u=(o=n.authorization)==null?void 0:o.openExpired)==null||u.call(o,e):(x=(c=n.authorization)==null?void 0:c.open)==null||x.call(c,e)},m0=e=>{var n;if((n=e.authorization)!=null&&n.isInMicroApp)return e.authorization.isInMicroApp();if(!A())return!1;const t=window;return!!(t.__MICRO_APP_ENVIRONMENT__||t.__MICRO_APP_BASE_APPLICATION__)},h0=(e,t)=>{var o,u,c,x;if((o=t.authorization)!=null&&o.dispatchMicroAppEvent){t.authorization.dispatchMicroAppEvent(e);return}if(!A())return;const n={type:"authorization_expired",machineCode:e.machineCode,expireTime:e.expireTime},i=(u=t.authorization)==null?void 0:u.eventCenterName;if(i){const g=window[i];if(typeof(g==null?void 0:g.dispatch)=="function"){g.dispatch({myname:((c=t.authorization)==null?void 0:c.microAppName)??i,data:n});return}}window.dispatchEvent(new CustomEvent(((x=t.authorization)==null?void 0:x.eventName)??J,{detail:n}))},j=(e,t)=>{if(!e||typeof e!="object")return;const n=e;return typeof n[t]=="string"?n[t]:void 0},C=(e,t,n)=>{if(e==null||e==="")return t;const i=Q(n)?B:U,o=Q(n)?U:B,u=String(e);return(i[u]??o[u])||t||i.other||o.other},Q=e=>typeof e=="string"&&e.toLowerCase().startsWith("en"),H=e=>{var t,n,i;return((t=e.getLocale)==null?void 0:t.call(e))??((i=(n=e.locale)==null?void 0:n.getLocale)==null?void 0:i.call(n))??e.lang},F=(e,t,n)=>{const i=e.headers;if(i&&typeof i.set=="function"){i.set(t,String(n));return}e.headers[t]=String(n)},f0=(e,t)=>{Object.entries(t??{}).forEach(([n,i])=>{i!=null&&F(e,n,i)})},p0=e=>Object.entries(e??{}).reduce((t,[n,i])=>(i==null||(t[n]=String(i)),t),{}),g0=(e,t)=>{var n;return t.shouldRefreshToken?t.shouldRefreshToken(e):Number((n=e.data)==null?void 0:n.code)===401},N=(e,t,n,i={})=>({...i,...e,method:t,data:e.data??n??i.data}),$=e=>e?T0(e)?{...e,params:z(e.params)}:{params:z(e)}:{},z=e=>{if(!e)return e;if(typeof URLSearchParams<"u"&&e instanceof URLSearchParams){const o=new URLSearchParams(e);return o.delete("lang"),o}if(typeof e!="object"||Array.isArray(e))return e;const t=e,{lang:n,...i}=t;return i},y0=new Set(["adapter","auth","baseURL","cancelToken","data","decompress","headers","httpAgent","httpsAgent","maxBodyLength","maxContentLength","method","onDownloadProgress","onUploadProgress","params","paramsSerializer","proxy","responseEncoding","responseType","signal","socketPath","timeout","timeoutErrorMessage","transformRequest","transformResponse","transitional","url","validateStatus","withCredentials","xsrfCookieName","xsrfHeaderName"]),T0=e=>!e||typeof e!="object"||typeof URLSearchParams<"u"&&e instanceof URLSearchParams?!1:Object.keys(e).some(t=>y0.has(t));let I=null;const x0=e=>{const t=K(e);return I=t,t},k0=e=>(I=e,e),S=()=>{if(!I)throw new Error("Request SDK is not initialized. Call setupRequestSdk(...) or install the Vue plugin first.");return I},b0={request:e=>S().request.request(e),get:(e,t)=>S().request.get(e,t),post:(e,t,n)=>S().request.post(e,t,n),put:(e,t,n)=>S().request.put(e,t,n),patch:(e,t,n)=>S().request.patch(e,t,n),delete:(e,t)=>S().request.delete(e,t)},E0=new Proxy({},{get(e,t){return Reflect.get(S().service,t)}});exports.AUTHORIZATION_EXPIRED_EVENT=J;exports.buildAuthHeaderValue=W;exports.createRequestSdk=K;exports.extractI18nParams=G;exports.getBizErrorMsg=q;exports.getDefaultRequestSdk=S;exports.http=E0;exports.isSuccessCode=O;exports.request=b0;exports.setDefaultRequestSdk=k0;exports.setupRequestSdk=x0;
|