yc-vep-ui 0.6.7 → 0.6.9
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.
|
@@ -1737,15 +1737,20 @@ var fn = { style: {
|
|
|
1737
1737
|
}), Zn = /* @__PURE__ */ V({ default: () => Qn }), Qn = Xn;
|
|
1738
1738
|
//#endregion
|
|
1739
1739
|
//#region src/utils/request.ts
|
|
1740
|
-
function $n(e
|
|
1741
|
-
|
|
1740
|
+
function $n(e) {
|
|
1741
|
+
let { url: t, options: n } = e, r = n.headers || {};
|
|
1742
|
+
return n.headers = new Headers({
|
|
1742
1743
|
"Content-Type": "application/json",
|
|
1743
1744
|
token: localStorage.getItem("TOKEN") || "",
|
|
1744
|
-
...
|
|
1745
|
-
})
|
|
1745
|
+
...r
|
|
1746
|
+
}), {
|
|
1747
|
+
url: t,
|
|
1748
|
+
options: n
|
|
1749
|
+
};
|
|
1746
1750
|
}
|
|
1747
1751
|
function er(e) {
|
|
1748
|
-
|
|
1752
|
+
let t = window.location.pathname;
|
|
1753
|
+
if (e.code !== "ok" && ["无效的token", "当前用户未登录"].includes(e.message) && t !== "/") {
|
|
1749
1754
|
console.log("=========== 来到 无效的token 拦截器 ==========="), localStorage.setItem("referrer", window.location.href);
|
|
1750
1755
|
let e = localStorage.getItem("authUrl") || "";
|
|
1751
1756
|
if (!e) return;
|
|
@@ -1758,28 +1763,36 @@ async function tr(e, t, n = {}) {
|
|
|
1758
1763
|
let e = new URLSearchParams(t).toString();
|
|
1759
1764
|
e && (r = `${r}?${e}`);
|
|
1760
1765
|
}
|
|
1761
|
-
let i =
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
}
|
|
1765
|
-
|
|
1766
|
+
let i = {
|
|
1767
|
+
method: "GET",
|
|
1768
|
+
...n
|
|
1769
|
+
}, a = $n({
|
|
1770
|
+
url: r,
|
|
1771
|
+
options: i
|
|
1772
|
+
}), o = await (await fetch(a.url, a.options)).json();
|
|
1773
|
+
return er(o), o;
|
|
1766
1774
|
}
|
|
1767
1775
|
async function nr(e, t, n = {}) {
|
|
1768
|
-
let r =
|
|
1769
|
-
headers: $n(n.headers || {}),
|
|
1776
|
+
let r = {
|
|
1770
1777
|
method: "POST",
|
|
1771
1778
|
body: JSON.stringify(t),
|
|
1772
1779
|
...n
|
|
1773
|
-
}
|
|
1774
|
-
|
|
1780
|
+
}, i = $n({
|
|
1781
|
+
url: `${ir}${e}`,
|
|
1782
|
+
options: r
|
|
1783
|
+
}), a = await (await fetch(i.url, i.options)).json();
|
|
1784
|
+
return er(a), a;
|
|
1775
1785
|
}
|
|
1776
1786
|
async function rr(e, t, n = {}) {
|
|
1777
|
-
|
|
1778
|
-
headers: $n(n.headers || {}),
|
|
1787
|
+
let r = {
|
|
1779
1788
|
method: "POST",
|
|
1780
1789
|
body: JSON.stringify(t),
|
|
1781
1790
|
...n
|
|
1782
|
-
}
|
|
1791
|
+
}, i = $n({
|
|
1792
|
+
url: `${ir}${e}`,
|
|
1793
|
+
options: r
|
|
1794
|
+
});
|
|
1795
|
+
return (await fetch(i.url, i.options)).blob();
|
|
1783
1796
|
}
|
|
1784
1797
|
var q = {
|
|
1785
1798
|
get: tr,
|
package/dist/hooks/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { c as e, d as t, f as n, l as r, p as i, u as a } from "../entry-
|
|
1
|
+
import { c as e, d as t, f as n, l as r, p as i, u as a } from "../entry-D43qrSJJ.js";
|
|
2
2
|
export { r as useDictionary, i as useFetch, a as useRoute, t as useRouter, n as useTable, e as useUser };
|
package/dist/utils/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as e, S as t, _ as n, b as r, v as i, x as a, y as o } from "../entry-
|
|
1
|
+
import { A as e, S as t, _ as n, b as r, v as i, x as a, y as o } from "../entry-D43qrSJJ.js";
|
|
2
2
|
export { n as baseUrl, i as formatDate, o as omit, t as request, e as tempToRender, r as uniq, a as uniqBy };
|
package/dist/vep-ui.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as e, D as t, E as n, M as r, O as i, T as a, a as o, g as s, h as c, i as l, j as u, k as d, m as f, n as p, o as m, r as h, s as g, t as _, w as v } from "./entry-
|
|
1
|
+
import { C as e, D as t, E as n, M as r, O as i, T as a, a as o, g as s, h as c, i as l, j as u, k as d, m as f, n as p, o as m, r as h, s as g, t as _, w as v } from "./entry-D43qrSJJ.js";
|
|
2
2
|
export { r as UiCard, v as UiDescriptions, e as UiDialog, t as UiEditor, d as UiFilter, i as UiForm, a as UiInfiniteScroll, f as UiStaffSelect, u as UiTable, n as UiTree, m as UiUpload, s as WcUtils, o as YcApproval, c as YcMessage, l as YcPageAgent, h as default, h as ycPlugin, _ as getHostVue, g as hooks, p as setHostVue };
|