@huyooo/ui 0.7.20 → 0.7.26
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/{AuthkitAuthModal-DxxZlUbh.js → AuthkitAuthModal-C1Kgu1TA.js} +670 -685
- package/dist/{AuthkitSignInPhone-BfqNvheZ.js → AuthkitSignInPhone-BG7r63dN.js} +224 -232
- package/dist/{Clipboard-C_4QFg2W.js → Clipboard-8rWlOPTZ.js} +2 -2
- package/dist/{Contact-DJtDuS50.js → Contact-Bpl7sIjY.js} +2 -2
- package/dist/{FeedbackItem-CI-w_fOt.js → FeedbackItem-DMpvHrOD.js} +3 -3
- package/dist/{FeedbackModal-3k-cMuoY.js → FeedbackModal-DIhSPUPO.js} +329 -342
- package/dist/{MessageHandle-Pxxvhs-7.js → MessageHandle-WA95I84_.js} +212 -236
- package/dist/{MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-BVvzvLUA.js → MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-BRficqbp.js} +26 -28
- package/dist/{MessageNotifications-FkiOW4qU.js → MessageNotifications-DmgFNjH7.js} +1 -1
- package/dist/{PaySubscriptions-BHTKDYFN.js → PaySubscriptions-F5sNex0h.js} +50 -74
- package/dist/{ReferrerReferees-9wk0_tGC.js → ReferrerReferees-DMA8Tj5i.js} +30 -32
- package/dist/{Upload.vue_vue_type_script_setup_true_lang-RZzfS9p1.js → Upload.vue_vue_type_script_setup_true_lang-D7ZGc2ZS.js} +1 -1
- package/dist/{UserAccountMenu-CKGTR8GB.js → UserAccountMenu-CkUtqNxY.js} +7 -7
- package/dist/{WidthContainer-BC30d-AV.js → WidthContainer-DSQui1pX.js} +7 -7
- package/dist/api/Authkit/Users.d.ts +7 -7
- package/dist/api/Authkit/apps.d.ts +2 -2
- package/dist/api/Authkit/auth.d.ts +10 -10
- package/dist/api/Authkit/oauth.d.ts +3 -3
- package/dist/api/Authkit/verify.d.ts +18 -5
- package/dist/api/Buckets/Files.d.ts +7 -7
- package/dist/api/Buckets.d.ts +2 -2
- package/dist/api/Invoices.d.ts +6 -6
- package/dist/api/Message/ChangelogNotifications.d.ts +2 -31
- package/dist/api/Message/EventNotifications.d.ts +2 -35
- package/dist/api/Message/MessageNotifications.d.ts +5 -35
- package/dist/api/Message/NoticeNotifications.d.ts +5 -42
- package/dist/api/Messages.d.ts +2 -2
- package/dist/api/Orders.d.ts +9 -9
- package/dist/api/Products.d.ts +6 -6
- package/dist/api/Quotas.d.ts +6 -6
- package/dist/api/Referrer.d.ts +1 -1
- package/dist/api/Subscriptions.d.ts +7 -7
- package/dist/api/index.d.ts +8 -8
- package/dist/authkit.js +6 -6
- package/dist/common/globalConfig.d.ts +2 -2
- package/dist/common.js +1 -1
- package/dist/composables/Authkit/useAuthkitAppsAuthPageInfo.d.ts +1 -1
- package/dist/composables/Authkit/useAuthkitAuth.d.ts +3 -3
- package/dist/composables/useMessageNotifications.d.ts +3 -3
- package/dist/composables.js +9 -9
- package/dist/feedback.js +3 -3
- package/dist/index.js +24 -24
- package/dist/main.d.ts +1 -0
- package/dist/message.js +3 -3
- package/dist/pay.js +1 -1
- package/dist/privateCom.js +1 -1
- package/dist/referrer.js +1 -1
- package/dist/request-B4CMspsP.js +196 -0
- package/dist/style.css +1 -1
- package/dist/upload.js +2 -2
- package/dist/{useAuthkitAppsAuthPageInfo-AFq46sfo.js → useAuthkitAppsAuthPageInfo-CtsTqri7.js} +17 -19
- package/dist/{useAuthkitCreateAndUpdate-BZXteclG.js → useAuthkitCreateAndUpdate-BUyZbiBj.js} +1 -1
- package/dist/useAuthkitUsersProfile-B7wHZwe-.js +257 -0
- package/dist/{useDownloads-2DzDw0ic.js → useDownloads-Cl_-B4sP.js} +1 -1
- package/dist/useMessageNotifications-CP7gi893.js +78 -0
- package/dist/{useSEO-BmD-Tu3B.js → useSEO-C_4yDk7S.js} +2 -2
- package/dist/{useTableHandle-SmqaOxbN.js → useTableHandle-6ekhLVbK.js} +1 -1
- package/dist/{useUploadCos-8imaHXLO.js → useUploadCos-dYc8op7M.js} +10 -7
- package/dist/user.js +1 -1
- package/dist/utils/request.d.ts +25 -2
- package/package.json +1 -1
- package/dist/auth-CfexrvhT.js +0 -188
- package/dist/useAuthkitUsersProfile-B26kPQrp.js +0 -234
- package/dist/useMessageNotifications-DiF1CPlT.js +0 -84
package/dist/upload.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as p } from "./Upload.vue_vue_type_script_setup_true_lang-
|
|
2
|
-
import { u as s } from "./useUploadCos-
|
|
1
|
+
import { _ as p } from "./Upload.vue_vue_type_script_setup_true_lang-D7ZGc2ZS.js";
|
|
2
|
+
import { u as s } from "./useUploadCos-dYc8op7M.js";
|
|
3
3
|
export {
|
|
4
4
|
p as Upload,
|
|
5
5
|
s as useUploadCos
|
package/dist/{useAuthkitAppsAuthPageInfo-AFq46sfo.js → useAuthkitAppsAuthPageInfo-CtsTqri7.js}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { c as u, g as p } from "./
|
|
3
|
-
function f(
|
|
1
|
+
import { ref as i } from "vue";
|
|
2
|
+
import { c as u, g as p } from "./request-B4CMspsP.js";
|
|
3
|
+
function f(o) {
|
|
4
4
|
return u({
|
|
5
5
|
url: `${p.authPrefixUrl}/apps/findOne`,
|
|
6
6
|
method: "post",
|
|
7
|
-
data:
|
|
7
|
+
data: o
|
|
8
8
|
});
|
|
9
9
|
}
|
|
10
10
|
function r() {
|
|
@@ -13,7 +13,7 @@ function r() {
|
|
|
13
13
|
method: "post"
|
|
14
14
|
});
|
|
15
15
|
}
|
|
16
|
-
const
|
|
16
|
+
const e = i({
|
|
17
17
|
id: "",
|
|
18
18
|
appKey: "",
|
|
19
19
|
name: "",
|
|
@@ -85,25 +85,23 @@ const a = l({
|
|
|
85
85
|
backgroundImageUrl: "",
|
|
86
86
|
backgroundImage: "/66a0d5b35203890887f0e1a4/6714e2458fe86895bf3da8ae/1ef8ed72-1731-6e00-93d1-fa24165f1a3e.webp"
|
|
87
87
|
}
|
|
88
|
-
}),
|
|
89
|
-
function
|
|
90
|
-
function
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
o.value = !1, n.value = !1, console.error("获取应用认证页面信息失败:", e);
|
|
97
|
-
});
|
|
88
|
+
}), t = i(!1), n = i(!1);
|
|
89
|
+
function d() {
|
|
90
|
+
async function o(l) {
|
|
91
|
+
t.value = !0, n.value = !1;
|
|
92
|
+
const {
|
|
93
|
+
data: a
|
|
94
|
+
} = await r();
|
|
95
|
+
t.value = !1, a && (n.value = !0, e.value.id = a.id, e.value.appKey = a.appKey, e.value.name = a.name, e.value.description = a.description, e.value.homePageUrl = a.homePageUrl, e.value.applicationLogo = a.applicationLogo, e.value.applicationLogoUrl = a.applicationLogoUrl, e.value.publicRoutes = a.publicRoutes || [], e.value.oauth = a.oauth, e.value.authorizationCallback = a.authorizationCallback, e.value.aboutUs = a.aboutUs, e.value.brand = a.brand, l && l());
|
|
98
96
|
}
|
|
99
97
|
return {
|
|
100
|
-
appsData:
|
|
101
|
-
appsAuthPageInfoApi:
|
|
102
|
-
appsAuthPageInfoLoading:
|
|
98
|
+
appsData: e,
|
|
99
|
+
appsAuthPageInfoApi: o,
|
|
100
|
+
appsAuthPageInfoLoading: t,
|
|
103
101
|
appsAuthPageInfoSuccess: n
|
|
104
102
|
};
|
|
105
103
|
}
|
|
106
104
|
export {
|
|
107
105
|
f as a,
|
|
108
|
-
|
|
106
|
+
d as u
|
|
109
107
|
};
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
import { ref as s, readonly as b, computed as T } from "vue";
|
|
2
|
+
import { c as a, g as r } from "./request-B4CMspsP.js";
|
|
3
|
+
function x(e) {
|
|
4
|
+
return a({
|
|
5
|
+
url: `${r.authPrefixUrl}/auth/signIn`,
|
|
6
|
+
method: "post",
|
|
7
|
+
data: e
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
function A(e) {
|
|
11
|
+
return a({
|
|
12
|
+
url: `${r.authPrefixUrl}/auth/resetPassword`,
|
|
13
|
+
method: "post",
|
|
14
|
+
data: e
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
function $(e) {
|
|
18
|
+
return a({
|
|
19
|
+
url: `${r.authPrefixUrl}/auth/signUp`,
|
|
20
|
+
method: "post",
|
|
21
|
+
data: e
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
function q(e) {
|
|
25
|
+
return a({
|
|
26
|
+
url: `${r.authPrefixUrl}/oauth2/authorize`,
|
|
27
|
+
method: "post",
|
|
28
|
+
data: e
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
const f = s("signIn"), k = [], v = [], I = [], l = s(null);
|
|
32
|
+
function P() {
|
|
33
|
+
try {
|
|
34
|
+
const e = new URLSearchParams(window.location.search), n = e.get("token");
|
|
35
|
+
if (n) {
|
|
36
|
+
g(n);
|
|
37
|
+
const i = window.location.pathname;
|
|
38
|
+
window.history.replaceState({}, "", i);
|
|
39
|
+
const c = e.get("userId"), o = e.get("appId");
|
|
40
|
+
return k.forEach((w) => w({
|
|
41
|
+
jwtToken: n,
|
|
42
|
+
userId: c,
|
|
43
|
+
appId: o
|
|
44
|
+
})), !0;
|
|
45
|
+
}
|
|
46
|
+
} catch (e) {
|
|
47
|
+
console.warn("Failed to handle OAuth callback:", e);
|
|
48
|
+
}
|
|
49
|
+
return !1;
|
|
50
|
+
}
|
|
51
|
+
function C() {
|
|
52
|
+
if (P())
|
|
53
|
+
return !0;
|
|
54
|
+
try {
|
|
55
|
+
const e = localStorage.getItem("jwtToken");
|
|
56
|
+
if (e)
|
|
57
|
+
return l.value = e, !0;
|
|
58
|
+
} catch (e) {
|
|
59
|
+
console.warn("Failed to access localStorage:", e);
|
|
60
|
+
}
|
|
61
|
+
return !1;
|
|
62
|
+
}
|
|
63
|
+
function j() {
|
|
64
|
+
if (l.value)
|
|
65
|
+
return l.value;
|
|
66
|
+
try {
|
|
67
|
+
const e = localStorage.getItem("jwtToken");
|
|
68
|
+
return e && (l.value = e), e;
|
|
69
|
+
} catch (e) {
|
|
70
|
+
return console.warn("Failed to access localStorage:", e), null;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
function g(e) {
|
|
74
|
+
l.value = e;
|
|
75
|
+
try {
|
|
76
|
+
localStorage.setItem("jwtToken", e);
|
|
77
|
+
} catch (n) {
|
|
78
|
+
console.warn("Failed to save token to localStorage:", n);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
function E() {
|
|
82
|
+
l.value = null;
|
|
83
|
+
try {
|
|
84
|
+
localStorage.removeItem("jwtToken");
|
|
85
|
+
} catch (e) {
|
|
86
|
+
console.warn("Failed to clear localStorage:", e);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
function F(e) {
|
|
90
|
+
k.push(e);
|
|
91
|
+
}
|
|
92
|
+
function L(e) {
|
|
93
|
+
v.push(e);
|
|
94
|
+
}
|
|
95
|
+
function V(e) {
|
|
96
|
+
I.push(e);
|
|
97
|
+
}
|
|
98
|
+
function R() {
|
|
99
|
+
const e = s(!1), n = s(!1), i = s(!1);
|
|
100
|
+
async function c(t) {
|
|
101
|
+
e.value = !0;
|
|
102
|
+
const {
|
|
103
|
+
data: u
|
|
104
|
+
} = await x({
|
|
105
|
+
email: t.email,
|
|
106
|
+
password: t.password
|
|
107
|
+
});
|
|
108
|
+
e.value = !1, u && (g(u.jwtToken), k.forEach((h) => h(u)));
|
|
109
|
+
}
|
|
110
|
+
async function o(t) {
|
|
111
|
+
n.value = !0;
|
|
112
|
+
const {
|
|
113
|
+
error: u
|
|
114
|
+
} = await $({
|
|
115
|
+
email: t.email,
|
|
116
|
+
userToken: t.userToken,
|
|
117
|
+
emailVerifyId: t.emailVerifyId,
|
|
118
|
+
password: t.password,
|
|
119
|
+
referrerId: t.referrerId
|
|
120
|
+
});
|
|
121
|
+
n.value = !1, u || (f.value = "signIn", v.forEach((h) => h()));
|
|
122
|
+
}
|
|
123
|
+
async function w(t) {
|
|
124
|
+
i.value = !0;
|
|
125
|
+
const {
|
|
126
|
+
error: u
|
|
127
|
+
} = await A({
|
|
128
|
+
email: t.email,
|
|
129
|
+
userToken: t.userToken,
|
|
130
|
+
emailVerifyId: t.emailVerifyId,
|
|
131
|
+
password: t.password
|
|
132
|
+
});
|
|
133
|
+
i.value = !1, u || (f.value = "signIn", I.forEach((h) => h()));
|
|
134
|
+
}
|
|
135
|
+
function U() {
|
|
136
|
+
f.value = "signUp";
|
|
137
|
+
}
|
|
138
|
+
function S() {
|
|
139
|
+
f.value = "resetPassword";
|
|
140
|
+
}
|
|
141
|
+
function y() {
|
|
142
|
+
f.value = "signIn";
|
|
143
|
+
}
|
|
144
|
+
return {
|
|
145
|
+
signInSubmit: c,
|
|
146
|
+
signUpSubmit: o,
|
|
147
|
+
resetPasswordSubmit: w,
|
|
148
|
+
currentView: f,
|
|
149
|
+
authSignInLoading: e,
|
|
150
|
+
authSignUpLoading: n,
|
|
151
|
+
resetPasswordLoading: i,
|
|
152
|
+
switchSignUp: U,
|
|
153
|
+
switchResetPassword: S,
|
|
154
|
+
switchSignIn: y,
|
|
155
|
+
addSignInCallback: F,
|
|
156
|
+
addSignUpCallback: L,
|
|
157
|
+
addResetPasswordCallback: V,
|
|
158
|
+
// 简化的token管理
|
|
159
|
+
jwtToken: b(l),
|
|
160
|
+
getToken: j,
|
|
161
|
+
setToken: g,
|
|
162
|
+
initializeAuth: C,
|
|
163
|
+
clearAuth: E,
|
|
164
|
+
handleOAuthCallback: P
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
function z(e) {
|
|
168
|
+
return a({
|
|
169
|
+
url: `${r.authPrefixUrl}/users/profile`,
|
|
170
|
+
method: "post",
|
|
171
|
+
data: e
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
function G(e) {
|
|
175
|
+
return a({
|
|
176
|
+
url: `${r.authPrefixUrl}/users/update/baseInfo`,
|
|
177
|
+
method: "post",
|
|
178
|
+
data: e
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
function H(e) {
|
|
182
|
+
return a({
|
|
183
|
+
url: `${r.authPrefixUrl}/users/update/email`,
|
|
184
|
+
method: "post",
|
|
185
|
+
data: e
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
function J(e) {
|
|
189
|
+
return a({
|
|
190
|
+
url: `${r.authPrefixUrl}/users/update/password`,
|
|
191
|
+
method: "post",
|
|
192
|
+
data: e
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
function K() {
|
|
196
|
+
return a({
|
|
197
|
+
url: `${r.authPrefixUrl}/users/unbind/email`,
|
|
198
|
+
method: "post"
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
function Q() {
|
|
202
|
+
return a({
|
|
203
|
+
url: `${r.authPrefixUrl}/users/myDependencies`,
|
|
204
|
+
method: "post"
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
function W(e) {
|
|
208
|
+
return a({
|
|
209
|
+
url: `${r.authPrefixUrl}/users/deleteAccount`,
|
|
210
|
+
method: "post",
|
|
211
|
+
data: e
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
const d = s(null), m = s(!1), p = s(!1), D = T(() => !!d.value);
|
|
215
|
+
async function O() {
|
|
216
|
+
const {
|
|
217
|
+
getToken: e,
|
|
218
|
+
clearAuth: n
|
|
219
|
+
} = R();
|
|
220
|
+
if (!e()) {
|
|
221
|
+
console.warn("No authentication token found"), d.value = null;
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
m.value = !0, p.value = !1;
|
|
225
|
+
const {
|
|
226
|
+
data: c,
|
|
227
|
+
error: o
|
|
228
|
+
} = await z();
|
|
229
|
+
m.value = !1, c ? (d.value = c, p.value = !0) : (d.value = null, p.value = !1, ((o == null ? void 0 : o.code) === 401 || (o == null ? void 0 : o.code) === 40101) && (console.warn("认证已过期,清除认证状态"), n()));
|
|
230
|
+
}
|
|
231
|
+
function B() {
|
|
232
|
+
d.value = null;
|
|
233
|
+
}
|
|
234
|
+
function X() {
|
|
235
|
+
return {
|
|
236
|
+
userProfile: d,
|
|
237
|
+
loading: m,
|
|
238
|
+
usersProfileSuccess: p,
|
|
239
|
+
isLoggedIn: D,
|
|
240
|
+
// 新增:基于userProfile的登录状态
|
|
241
|
+
fetchUserProfile: O,
|
|
242
|
+
clearUserProfile: B
|
|
243
|
+
// 新增:清除用户信息的方法
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
export {
|
|
247
|
+
X as a,
|
|
248
|
+
z as b,
|
|
249
|
+
G as c,
|
|
250
|
+
J as d,
|
|
251
|
+
H as e,
|
|
252
|
+
K as f,
|
|
253
|
+
Q as g,
|
|
254
|
+
W as h,
|
|
255
|
+
q as o,
|
|
256
|
+
R as u
|
|
257
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { ref as a, computed as w } from "vue";
|
|
2
|
+
import { m as L, a as z, b as R } from "./MessageNotifications-DmgFNjH7.js";
|
|
3
|
+
function D(r = "system") {
|
|
4
|
+
const n = a(!0), f = a(""), i = a(!1), d = a(!1), o = a([]), t = a({
|
|
5
|
+
total: 0,
|
|
6
|
+
current: 1,
|
|
7
|
+
pageSize: 10
|
|
8
|
+
}), l = a(!1), u = a(!1), c = a("unread"), p = [{
|
|
9
|
+
label: "未读消息",
|
|
10
|
+
key: "unread"
|
|
11
|
+
}, {
|
|
12
|
+
label: "已读消息",
|
|
13
|
+
key: "read"
|
|
14
|
+
}], v = w(() => c.value === "read");
|
|
15
|
+
function b() {
|
|
16
|
+
n.value = !0;
|
|
17
|
+
}
|
|
18
|
+
function y(e) {
|
|
19
|
+
c.value = e, t.value.current = 1, s();
|
|
20
|
+
}
|
|
21
|
+
async function g(e) {
|
|
22
|
+
l.value = !0, await R({
|
|
23
|
+
messageId: e
|
|
24
|
+
}), l.value = !1;
|
|
25
|
+
}
|
|
26
|
+
async function m(e) {
|
|
27
|
+
u.value = !0;
|
|
28
|
+
const {
|
|
29
|
+
error: h
|
|
30
|
+
} = await z({
|
|
31
|
+
type: e
|
|
32
|
+
});
|
|
33
|
+
u.value = !1, h || s();
|
|
34
|
+
}
|
|
35
|
+
function A() {
|
|
36
|
+
o.value.length !== 0 && m(r);
|
|
37
|
+
}
|
|
38
|
+
async function s() {
|
|
39
|
+
i.value = !0;
|
|
40
|
+
const {
|
|
41
|
+
data: e
|
|
42
|
+
} = await L({
|
|
43
|
+
current: t.value.current,
|
|
44
|
+
pageSize: t.value.pageSize,
|
|
45
|
+
where: {
|
|
46
|
+
read: v.value,
|
|
47
|
+
type: r
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
i.value = !1, e && (o.value = e.items, t.value.total = e.count, d.value = e.items.length < t.value.pageSize);
|
|
51
|
+
}
|
|
52
|
+
function N(e) {
|
|
53
|
+
f.value = e.id, n.value = !1, g(e.id);
|
|
54
|
+
}
|
|
55
|
+
return s(), {
|
|
56
|
+
isList: n,
|
|
57
|
+
id: f,
|
|
58
|
+
loading: i,
|
|
59
|
+
finished: d,
|
|
60
|
+
messageList: o,
|
|
61
|
+
pagination: t,
|
|
62
|
+
readLoading: l,
|
|
63
|
+
readAllLoading: u,
|
|
64
|
+
activeTab: c,
|
|
65
|
+
tabs: p,
|
|
66
|
+
read: v,
|
|
67
|
+
toList: b,
|
|
68
|
+
onTabChange: y,
|
|
69
|
+
messageNotificationsReadApi: g,
|
|
70
|
+
messageNotificationsReadAllApi: m,
|
|
71
|
+
readAll: A,
|
|
72
|
+
getData: s,
|
|
73
|
+
openDetails: N
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
export {
|
|
77
|
+
D as u
|
|
78
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ref as I, computed as d, watch as V, toValue as G, isRef as B, hasInjectionContext as F, inject as J, watchEffect as Q, getCurrentInstance as Z, onBeforeUnmount as X, onDeactivated as Y, onActivated as ee } from "vue";
|
|
2
2
|
import { useRouter as x, useRoute as R } from "vue-router";
|
|
3
|
-
import { u as U } from "./useAuthkitAppsAuthPageInfo-
|
|
4
|
-
import { a as D } from "./useAuthkitUsersProfile-
|
|
3
|
+
import { u as U } from "./useAuthkitAppsAuthPageInfo-CtsTqri7.js";
|
|
4
|
+
import { a as D } from "./useAuthkitUsersProfile-B7wHZwe-.js";
|
|
5
5
|
const v = I({
|
|
6
6
|
key: "",
|
|
7
7
|
name: ""
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as Ut, g as jt } from "./_commonjsHelpers-DaMA6jEr.js";
|
|
2
|
-
import { c as mt, g as Tt } from "./
|
|
2
|
+
import { c as mt, g as Tt } from "./request-B4CMspsP.js";
|
|
3
3
|
var Ot = { exports: {} };
|
|
4
4
|
(function(Ue, at) {
|
|
5
5
|
(function(se, E) {
|
|
@@ -7427,18 +7427,21 @@ function qt() {
|
|
|
7427
7427
|
onTaskReady: (y) => {
|
|
7428
7428
|
}
|
|
7429
7429
|
}, (y) => {
|
|
7430
|
-
y && (console.error("文件上传失败:", y),
|
|
7431
|
-
|
|
7432
|
-
|
|
7433
|
-
|
|
7434
|
-
|
|
7430
|
+
y && (console.error("文件上传失败:", y), (async () => {
|
|
7431
|
+
const {
|
|
7432
|
+
error: m
|
|
7433
|
+
} = await Pt({
|
|
7434
|
+
id: f,
|
|
7435
|
+
status: "fail"
|
|
7436
|
+
});
|
|
7437
|
+
m && U && U({
|
|
7435
7438
|
code: "501",
|
|
7436
7439
|
message: "更新进度失败",
|
|
7437
7440
|
error: "",
|
|
7438
7441
|
url: "/files/update",
|
|
7439
7442
|
method: "post"
|
|
7440
7443
|
});
|
|
7441
|
-
}), U && U(y));
|
|
7444
|
+
})(), U && U(y));
|
|
7442
7445
|
});
|
|
7443
7446
|
}
|
|
7444
7447
|
return {
|
package/dist/user.js
CHANGED
package/dist/utils/request.d.ts
CHANGED
|
@@ -1,3 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { AxiosRequestConfig } from 'axios';
|
|
2
|
+
/** API 响应类型 - Go 风格错误处理 */
|
|
3
|
+
export interface ApiResponse<T = unknown> {
|
|
4
|
+
/** 响应数据,成功时包含数据,失败时为 null */
|
|
5
|
+
data: T | null;
|
|
6
|
+
/** 错误信息,成功时为 null,失败时包含错误码和消息 */
|
|
7
|
+
error: {
|
|
8
|
+
code: number;
|
|
9
|
+
message: string;
|
|
10
|
+
} | null;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* 类型化的 API 实例
|
|
14
|
+
* 所有方法返回 Go 风格的 { data, error } 格式
|
|
15
|
+
*/
|
|
16
|
+
export type TypedApiInstance = {
|
|
17
|
+
<T = unknown>(config: AxiosRequestConfig): Promise<ApiResponse<T>>;
|
|
18
|
+
<T = unknown>(url: string, config?: AxiosRequestConfig): Promise<ApiResponse<T>>;
|
|
19
|
+
get: <T = unknown>(url: string, config?: AxiosRequestConfig) => Promise<ApiResponse<T>>;
|
|
20
|
+
post: <T = unknown>(url: string, data?: unknown, config?: AxiosRequestConfig) => Promise<ApiResponse<T>>;
|
|
21
|
+
put: <T = unknown>(url: string, data?: unknown, config?: AxiosRequestConfig) => Promise<ApiResponse<T>>;
|
|
22
|
+
delete: <T = unknown>(url: string, config?: AxiosRequestConfig) => Promise<ApiResponse<T>>;
|
|
23
|
+
patch: <T = unknown>(url: string, data?: unknown, config?: AxiosRequestConfig) => Promise<ApiResponse<T>>;
|
|
24
|
+
};
|
|
25
|
+
declare const api: TypedApiInstance;
|
|
3
26
|
export default api;
|