@huyooo/ui 0.10.4 → 0.11.0
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/AuthkitSignInPhone-BWPCpUie.js +3034 -0
- package/dist/{Clipboard-CMm8I4Rb.js → Clipboard-CK_nROjb.js} +1 -1
- package/dist/CollapseItem-DUzZA6tx.js +124 -0
- package/dist/{Contact-Dgn8_it4.js → Contact-CpHU1bJ7.js} +2 -2
- package/dist/{CustomTable-CVZ4mFzi.js → CustomTable-1W5byjgJ.js} +3 -2
- package/dist/FeedbackModal-qAJLL3V3.js +1535 -0
- package/dist/{LandingPageSectionTabs-Dv_xOLqR.js → LandingPageSectionTabs-B6ZVxR47.js} +1 -1
- package/dist/MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-D109kT8_.js +1282 -0
- package/dist/{PaySubscriptions-W6GJ28uE.js → PaySubscriptions-C4Een__-.js} +17 -16
- package/dist/{ReferrerReferees-C5Sjn7aD.js → ReferrerReferees-DIassvGO.js} +8 -8
- package/dist/{Upload.vue_vue_type_script_setup_true_lang-C4-In_x4.js → Upload.vue_vue_type_script_setup_true_lang-DA8VZBrl.js} +1 -1
- package/dist/UserAccountMenu-BIRTtjLb.js +266 -0
- package/dist/UserSubscriptionBaseInformation-BUs3qiHd.js +60 -0
- package/dist/WidthContainer-TXsvW1ut.js +673 -0
- package/dist/{apiClients-DJchWBAG.js → apiClients-ANEApCyY.js} +84 -75
- package/dist/authkit.d.ts +5 -6
- package/dist/authkit.js +43 -43
- package/dist/common.js +3 -3
- package/dist/components/Authkit/Auth/AuthkitServiceAgreementAndPrivacyProtection.vue.d.ts +5 -5
- package/dist/components/Authkit/AuthkitAuthModal.vue.d.ts +13 -31
- package/dist/components/Feedback/FeedbackBubbleEnd.vue.d.ts +1 -1
- package/dist/components/Feedback/FeedbackBubbleStart.vue.d.ts +1 -1
- package/dist/components/User/UserButton.vue.d.ts +1 -36
- package/dist/components/User/UserPanel.vue.d.ts +26 -201
- package/dist/components/User/UserPanelItem.vue.d.ts +38 -0
- package/dist/composables/Authkit/useAuthkitAuth.d.ts +34 -10
- package/dist/composables/Authkit/useAuthkitAuthModal.d.ts +22 -3
- package/dist/composables/Authkit/useLegalLinks.d.ts +34 -0
- package/dist/composables/Authkit/useOauth.d.ts +0 -1
- package/dist/composables.d.ts +3 -2
- package/dist/composables.js +27 -25
- package/dist/{useUploadCos-BO3W_uqs.js → cos-js-sdk-v5-BJ5AlBRu.js} +2232 -2469
- package/dist/feedback.js +15 -16
- package/dist/landingPage.js +1 -1
- package/dist/main.js +177 -177
- package/dist/message.js +9 -10
- package/dist/pay.js +1 -1
- package/dist/privateCom.js +1 -1
- package/dist/referrer.js +1 -1
- package/dist/style.css +1 -1
- package/dist/upload.js +2 -2
- package/dist/{useAuthkitAppsAuthPageInfo-C3EHOtlk.js → useAuthkitAppsAuthPageInfo-Da2yJTT-.js} +1 -1
- package/dist/{useAuthkitCreateAndUpdate-CPkogY7K.js → useAuthkitCreateAndUpdate-BLs5vQOu.js} +1 -1
- package/dist/useAuthkitUsersProfile-Cx8NXjlt.js +186 -0
- package/dist/{useDownloads-COXmopbe.js → useDownloads-DT5W2af6.js} +1 -1
- package/dist/useLegalLinks-BIF45kUt.js +60 -0
- package/dist/{useMessageNotifications-SIM85vdb.js → useMessageNotifications-CavBmgO7.js} +1 -1
- package/dist/{useSEO-DeAU9YEc.js → useSEO-MPXQf0dn.js} +2 -2
- package/dist/{useTableHandle-CWu0LbeI.js → useTableHandle--NSbZ-57.js} +1 -1
- package/dist/useUploadCos-D6y0INvP.js +242 -0
- package/dist/user.d.ts +1 -0
- package/dist/user.js +9 -7
- package/dist/utils/legalLinks.d.ts +22 -0
- package/package.json +1 -1
- package/dist/AuthkitAuthModal-De0eEWOC.js +0 -2112
- package/dist/AuthkitSignInPhone-DEUVn3Rq.js +0 -920
- package/dist/CollapseItem-BAuejDBZ.js +0 -57
- package/dist/FeedbackItem-CRiLkWMh.js +0 -495
- package/dist/FeedbackModal-B8WLPCy_.js +0 -1053
- package/dist/MessageHandle-DpIUeQ7U.js +0 -1147
- package/dist/MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-BbtfWRUD.js +0 -142
- package/dist/UserAccountMenu-OdwonGFa.js +0 -633
- package/dist/WidthContainer-Cpdc67hQ.js +0 -652
- package/dist/index-CUfrjRxu.js +0 -73
- package/dist/useAuthkitUsersProfile-BqW74gfs.js +0 -172
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-DA8VZBrl.js";
|
|
2
|
+
import { u as s } from "./useUploadCos-D6y0INvP.js";
|
|
3
3
|
export {
|
|
4
4
|
p as Upload,
|
|
5
5
|
s as useUploadCos
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import { ref as r, readonly as A, computed as E } from "vue";
|
|
2
|
+
import { e as f } from "./apiClients-ANEApCyY.js";
|
|
3
|
+
const l = r("signIn"), m = /* @__PURE__ */ new Set(), p = /* @__PURE__ */ new Set(), S = /* @__PURE__ */ new Set(), I = /* @__PURE__ */ new Set(), s = r(null), h = "jwtToken";
|
|
4
|
+
function k() {
|
|
5
|
+
try {
|
|
6
|
+
const e = localStorage.getItem(h);
|
|
7
|
+
if (e)
|
|
8
|
+
return s.value = e, !0;
|
|
9
|
+
} catch (e) {
|
|
10
|
+
console.warn("Failed to access localStorage:", e);
|
|
11
|
+
}
|
|
12
|
+
return !1;
|
|
13
|
+
}
|
|
14
|
+
function O() {
|
|
15
|
+
try {
|
|
16
|
+
const e = new URLSearchParams(window.location.search), n = e.get("token");
|
|
17
|
+
if (!n) return !1;
|
|
18
|
+
g(n);
|
|
19
|
+
const i = window.location.pathname;
|
|
20
|
+
window.history.replaceState({}, "", i);
|
|
21
|
+
const u = e.get("userId"), o = e.get("appId");
|
|
22
|
+
return P({
|
|
23
|
+
jwtToken: n,
|
|
24
|
+
userId: u,
|
|
25
|
+
appId: o
|
|
26
|
+
}), !0;
|
|
27
|
+
} catch (e) {
|
|
28
|
+
return console.warn("Failed to handle OAuth callback:", e), !1;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
function b() {
|
|
32
|
+
return O() ? !0 : k();
|
|
33
|
+
}
|
|
34
|
+
function j() {
|
|
35
|
+
return s.value || k() ? s.value : null;
|
|
36
|
+
}
|
|
37
|
+
function g(e) {
|
|
38
|
+
s.value = e;
|
|
39
|
+
try {
|
|
40
|
+
localStorage.setItem(h, e);
|
|
41
|
+
} catch (n) {
|
|
42
|
+
console.warn("Failed to save token to localStorage:", n);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
function F() {
|
|
46
|
+
s.value = null;
|
|
47
|
+
try {
|
|
48
|
+
localStorage.removeItem(h);
|
|
49
|
+
} catch (e) {
|
|
50
|
+
console.warn("Failed to clear localStorage:", e);
|
|
51
|
+
}
|
|
52
|
+
K();
|
|
53
|
+
}
|
|
54
|
+
function w(e, n) {
|
|
55
|
+
return e.add(n), () => {
|
|
56
|
+
e.delete(n);
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
function P(e) {
|
|
60
|
+
m.forEach((n) => {
|
|
61
|
+
n(e);
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
function R() {
|
|
65
|
+
p.forEach((e) => void e());
|
|
66
|
+
}
|
|
67
|
+
function V() {
|
|
68
|
+
S.forEach((e) => void e());
|
|
69
|
+
}
|
|
70
|
+
function K() {
|
|
71
|
+
I.forEach((e) => void e());
|
|
72
|
+
}
|
|
73
|
+
function N(e) {
|
|
74
|
+
return w(m, e);
|
|
75
|
+
}
|
|
76
|
+
function _(e) {
|
|
77
|
+
return w(p, e);
|
|
78
|
+
}
|
|
79
|
+
function x(e) {
|
|
80
|
+
return w(S, e);
|
|
81
|
+
}
|
|
82
|
+
function C(e) {
|
|
83
|
+
return w(I, e);
|
|
84
|
+
}
|
|
85
|
+
function G() {
|
|
86
|
+
const e = r(!1), n = r(!1), i = r(!1);
|
|
87
|
+
async function u(t) {
|
|
88
|
+
e.value = !0;
|
|
89
|
+
const {
|
|
90
|
+
data: a
|
|
91
|
+
} = await f.auth.signIn.post({
|
|
92
|
+
email: t.email,
|
|
93
|
+
password: t.password
|
|
94
|
+
});
|
|
95
|
+
e.value = !1, a && (g(a.jwtToken), P(a));
|
|
96
|
+
}
|
|
97
|
+
async function o(t) {
|
|
98
|
+
n.value = !0;
|
|
99
|
+
const {
|
|
100
|
+
error: a
|
|
101
|
+
} = await f.auth.signUp.post({
|
|
102
|
+
email: t.email,
|
|
103
|
+
userToken: t.userToken,
|
|
104
|
+
emailVerifyId: t.emailVerifyId,
|
|
105
|
+
password: t.password,
|
|
106
|
+
referrerId: t.referrerId
|
|
107
|
+
});
|
|
108
|
+
n.value = !1, a || (l.value = "signIn", R());
|
|
109
|
+
}
|
|
110
|
+
async function T(t) {
|
|
111
|
+
i.value = !0;
|
|
112
|
+
const {
|
|
113
|
+
error: a
|
|
114
|
+
} = await f.auth.resetPassword.post({
|
|
115
|
+
email: t.email,
|
|
116
|
+
userToken: t.userToken,
|
|
117
|
+
emailVerifyId: t.emailVerifyId,
|
|
118
|
+
password: t.password
|
|
119
|
+
});
|
|
120
|
+
i.value = !1, a || (l.value = "signIn", V());
|
|
121
|
+
}
|
|
122
|
+
function y() {
|
|
123
|
+
l.value = "signUp";
|
|
124
|
+
}
|
|
125
|
+
function U() {
|
|
126
|
+
l.value = "resetPassword";
|
|
127
|
+
}
|
|
128
|
+
function L() {
|
|
129
|
+
l.value = "signIn";
|
|
130
|
+
}
|
|
131
|
+
return {
|
|
132
|
+
signInSubmit: u,
|
|
133
|
+
signUpSubmit: o,
|
|
134
|
+
resetPasswordSubmit: T,
|
|
135
|
+
currentView: l,
|
|
136
|
+
authSignInLoading: e,
|
|
137
|
+
authSignUpLoading: n,
|
|
138
|
+
resetPasswordLoading: i,
|
|
139
|
+
switchSignUp: y,
|
|
140
|
+
switchResetPassword: U,
|
|
141
|
+
switchSignIn: L,
|
|
142
|
+
onSignIn: N,
|
|
143
|
+
onSignUp: _,
|
|
144
|
+
onResetPassword: x,
|
|
145
|
+
onSignOut: C,
|
|
146
|
+
jwtToken: A(s),
|
|
147
|
+
getToken: j,
|
|
148
|
+
setToken: g,
|
|
149
|
+
restoreSession: b,
|
|
150
|
+
clearAuth: F
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
const c = r(null), v = r(!1), d = r(!1), Y = E(() => !!c.value);
|
|
154
|
+
async function q() {
|
|
155
|
+
const {
|
|
156
|
+
getToken: e,
|
|
157
|
+
clearAuth: n
|
|
158
|
+
} = G();
|
|
159
|
+
if (!e()) {
|
|
160
|
+
console.warn("No authentication token found"), c.value = null;
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
v.value = !0, d.value = !1;
|
|
164
|
+
const {
|
|
165
|
+
data: u,
|
|
166
|
+
error: o
|
|
167
|
+
} = await f.users.profile.post({});
|
|
168
|
+
v.value = !1, u ? (c.value = u, d.value = !0) : (c.value = null, d.value = !1, ((o == null ? void 0 : o.code) === 401 || (o == null ? void 0 : o.code) === 40101) && (console.warn("认证已过期,清除认证状态"), n()));
|
|
169
|
+
}
|
|
170
|
+
function z() {
|
|
171
|
+
c.value = null;
|
|
172
|
+
}
|
|
173
|
+
function H() {
|
|
174
|
+
return {
|
|
175
|
+
userProfile: c,
|
|
176
|
+
loading: v,
|
|
177
|
+
usersProfileSuccess: d,
|
|
178
|
+
isLoggedIn: Y,
|
|
179
|
+
fetchUserProfile: q,
|
|
180
|
+
clearUserProfile: z
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
export {
|
|
184
|
+
H as a,
|
|
185
|
+
G as u
|
|
186
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { computed as c } from "vue";
|
|
2
|
+
import { g as L } from "./apiClients-ANEApCyY.js";
|
|
3
|
+
import { u as m } from "./useAuthkitAppsAuthPageInfo-Da2yJTT-.js";
|
|
4
|
+
const l = {
|
|
5
|
+
userServiceAgreement: "用户服务协议",
|
|
6
|
+
privacyPolicy: "隐私协议",
|
|
7
|
+
personalInformationCollectionList: "个人信息收集清单",
|
|
8
|
+
thirdPartyInformationSharingList: "第三方信息共享清单",
|
|
9
|
+
licenseInformation: "证照信息"
|
|
10
|
+
}, g = Object.keys(l), d = "https://ones.huyooo.com/AboutUsDetails";
|
|
11
|
+
function A(t, e) {
|
|
12
|
+
const r = new URLSearchParams({
|
|
13
|
+
type: t,
|
|
14
|
+
appId: e
|
|
15
|
+
});
|
|
16
|
+
return `${d}?${r.toString()}`;
|
|
17
|
+
}
|
|
18
|
+
function b(t) {
|
|
19
|
+
typeof window > "u" || window.open(t, "_blank", "noopener,noreferrer");
|
|
20
|
+
}
|
|
21
|
+
function w() {
|
|
22
|
+
const {
|
|
23
|
+
appsData: t
|
|
24
|
+
} = m();
|
|
25
|
+
function e(n) {
|
|
26
|
+
var s, u;
|
|
27
|
+
const o = (u = (s = t.value) == null ? void 0 : s.aboutUs) == null ? void 0 : u[n];
|
|
28
|
+
return Array.isArray(o == null ? void 0 : o.content) && o.content.length > 0;
|
|
29
|
+
}
|
|
30
|
+
function r(n) {
|
|
31
|
+
const o = A(n, L.appId);
|
|
32
|
+
return {
|
|
33
|
+
key: n,
|
|
34
|
+
label: l[n],
|
|
35
|
+
url: o,
|
|
36
|
+
configured: e(n),
|
|
37
|
+
open: () => b(o)
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
const i = c(() => g.map(r)), f = c(() => i.value.filter((n) => n.configured));
|
|
41
|
+
function a(n) {
|
|
42
|
+
return i.value.find((o) => o.key === n);
|
|
43
|
+
}
|
|
44
|
+
function p(n) {
|
|
45
|
+
const o = a(n);
|
|
46
|
+
o && o.open();
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
all: i,
|
|
50
|
+
items: f,
|
|
51
|
+
getLink: a,
|
|
52
|
+
openLegalLink: p
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
export {
|
|
56
|
+
l as L,
|
|
57
|
+
g as a,
|
|
58
|
+
A as b,
|
|
59
|
+
w as u
|
|
60
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ref as I, computed as d, watch as _, isRef as G, toValue 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 V, useRoute as K } from "vue-router";
|
|
3
|
-
import { u as R } from "./useAuthkitAppsAuthPageInfo-
|
|
4
|
-
import { a as U } from "./useAuthkitUsersProfile-
|
|
3
|
+
import { u as R } from "./useAuthkitAppsAuthPageInfo-Da2yJTT-.js";
|
|
4
|
+
import { a as U } from "./useAuthkitUsersProfile-Cx8NXjlt.js";
|
|
5
5
|
const v = I({
|
|
6
6
|
key: "",
|
|
7
7
|
name: ""
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
import { C as b } from "./cos-js-sdk-v5-BJ5AlBRu.js";
|
|
2
|
+
import { o as n } from "./apiClients-ANEApCyY.js";
|
|
3
|
+
const w = {
|
|
4
|
+
// 图片
|
|
5
|
+
jpg: "image/jpeg",
|
|
6
|
+
jpeg: "image/jpeg",
|
|
7
|
+
png: "image/png",
|
|
8
|
+
gif: "image/gif",
|
|
9
|
+
bmp: "image/bmp",
|
|
10
|
+
webp: "image/webp",
|
|
11
|
+
svg: "image/svg+xml",
|
|
12
|
+
ico: "image/x-icon",
|
|
13
|
+
tiff: "image/tiff",
|
|
14
|
+
tif: "image/tiff",
|
|
15
|
+
heic: "image/heic",
|
|
16
|
+
heif: "image/heif",
|
|
17
|
+
avif: "image/avif",
|
|
18
|
+
jxl: "image/jxl",
|
|
19
|
+
// 视频
|
|
20
|
+
mp4: "video/mp4",
|
|
21
|
+
avi: "video/x-msvideo",
|
|
22
|
+
mov: "video/quicktime",
|
|
23
|
+
wmv: "video/x-ms-wmv",
|
|
24
|
+
flv: "video/x-flv",
|
|
25
|
+
webm: "video/webm",
|
|
26
|
+
mkv: "video/x-matroska",
|
|
27
|
+
m4v: "video/x-m4v",
|
|
28
|
+
"3gp": "video/3gpp",
|
|
29
|
+
ogv: "video/ogg",
|
|
30
|
+
mts: "video/mp2t",
|
|
31
|
+
m2ts: "video/mp2t",
|
|
32
|
+
// 注意:.ts 扩展名优先用于 TypeScript,如果需要视频格式,可以使用 .mts 或 .m2ts
|
|
33
|
+
// 音频
|
|
34
|
+
mp3: "audio/mpeg",
|
|
35
|
+
wav: "audio/wav",
|
|
36
|
+
ogg: "audio/ogg",
|
|
37
|
+
aac: "audio/aac",
|
|
38
|
+
flac: "audio/flac",
|
|
39
|
+
m4a: "audio/mp4",
|
|
40
|
+
wma: "audio/x-ms-wma",
|
|
41
|
+
aiff: "audio/aiff",
|
|
42
|
+
aif: "audio/aiff",
|
|
43
|
+
opus: "audio/opus",
|
|
44
|
+
amr: "audio/amr",
|
|
45
|
+
// 文档
|
|
46
|
+
pdf: "application/pdf",
|
|
47
|
+
doc: "application/msword",
|
|
48
|
+
docx: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
49
|
+
xls: "application/vnd.ms-excel",
|
|
50
|
+
xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
51
|
+
ppt: "application/vnd.ms-powerpoint",
|
|
52
|
+
pptx: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
53
|
+
rtf: "application/rtf",
|
|
54
|
+
txt: "text/plain",
|
|
55
|
+
odt: "application/vnd.oasis.opendocument.text",
|
|
56
|
+
ods: "application/vnd.oasis.opendocument.spreadsheet",
|
|
57
|
+
odp: "application/vnd.oasis.opendocument.presentation",
|
|
58
|
+
pages: "application/x-iwork-pages-sffpages",
|
|
59
|
+
numbers: "application/x-iwork-numbers-sffnumbers",
|
|
60
|
+
key: "application/x-iwork-keynote-sffkey",
|
|
61
|
+
xlsm: "application/vnd.ms-excel.sheet.macroEnabled.12",
|
|
62
|
+
xlsb: "application/vnd.ms-excel.sheet.binary.macroEnabled.12",
|
|
63
|
+
docm: "application/vnd.ms-word.document.macroEnabled.12",
|
|
64
|
+
pptm: "application/vnd.ms-powerpoint.presentation.macroEnabled.12",
|
|
65
|
+
potx: "application/vnd.openxmlformats-officedocument.presentationml.template",
|
|
66
|
+
ppsx: "application/vnd.openxmlformats-officedocument.presentationml.slideshow",
|
|
67
|
+
xps: "application/vnd.ms-xpsdocument",
|
|
68
|
+
// 代码
|
|
69
|
+
js: "application/javascript",
|
|
70
|
+
ts: "application/typescript",
|
|
71
|
+
html: "text/html",
|
|
72
|
+
css: "text/css",
|
|
73
|
+
json: "application/json",
|
|
74
|
+
xml: "application/xml",
|
|
75
|
+
py: "text/x-python",
|
|
76
|
+
java: "text/x-java-source",
|
|
77
|
+
cpp: "text/x-c++src",
|
|
78
|
+
c: "text/x-csrc",
|
|
79
|
+
php: "text/x-php",
|
|
80
|
+
rb: "text/x-ruby",
|
|
81
|
+
go: "text/x-go",
|
|
82
|
+
rs: "text/x-rust",
|
|
83
|
+
swift: "text/x-swift",
|
|
84
|
+
kt: "text/x-kotlin",
|
|
85
|
+
scala: "text/x-scala",
|
|
86
|
+
dart: "text/x-dart",
|
|
87
|
+
vue: "text/x-vue",
|
|
88
|
+
jsx: "text/x-jsx",
|
|
89
|
+
tsx: "text/x-tsx",
|
|
90
|
+
sass: "text/x-sass",
|
|
91
|
+
scss: "text/x-scss",
|
|
92
|
+
less: "text/x-less",
|
|
93
|
+
styl: "text/x-stylus",
|
|
94
|
+
coffee: "text/x-coffeescript",
|
|
95
|
+
lua: "text/x-lua",
|
|
96
|
+
r: "text/x-r",
|
|
97
|
+
matlab: "text/x-matlab",
|
|
98
|
+
sql: "text/x-sql",
|
|
99
|
+
sh: "text/x-sh",
|
|
100
|
+
bat: "text/x-bat",
|
|
101
|
+
ps1: "text/x-powershell",
|
|
102
|
+
// 压缩文件
|
|
103
|
+
zip: "application/zip",
|
|
104
|
+
rar: "application/vnd.rar",
|
|
105
|
+
tar: "application/x-tar",
|
|
106
|
+
gz: "application/gzip",
|
|
107
|
+
"7z": "application/x-7z-compressed",
|
|
108
|
+
bz2: "application/x-bzip2",
|
|
109
|
+
xz: "application/x-xz",
|
|
110
|
+
lzma: "application/x-lzma",
|
|
111
|
+
cab: "application/vnd.ms-cab-compressed",
|
|
112
|
+
dmg: "application/x-apple-diskimage",
|
|
113
|
+
iso: "application/x-iso9660-image",
|
|
114
|
+
// 电子书
|
|
115
|
+
epub: "application/epub+zip",
|
|
116
|
+
mobi: "application/x-mobipocket-ebook",
|
|
117
|
+
azw: "application/vnd.amazon.ebook",
|
|
118
|
+
fb2: "application/x-fictionbook+xml",
|
|
119
|
+
// 其他
|
|
120
|
+
csv: "text/csv",
|
|
121
|
+
md: "text/markdown",
|
|
122
|
+
yaml: "text/yaml",
|
|
123
|
+
yml: "text/yaml",
|
|
124
|
+
ini: "text/plain",
|
|
125
|
+
conf: "text/plain",
|
|
126
|
+
log: "text/plain",
|
|
127
|
+
plist: "application/x-plist"
|
|
128
|
+
};
|
|
129
|
+
function h(t, c) {
|
|
130
|
+
var p;
|
|
131
|
+
const o = (p = t.split(".").pop()) == null ? void 0 : p.toLowerCase();
|
|
132
|
+
return o && w[o] || "application/octet-stream";
|
|
133
|
+
}
|
|
134
|
+
function k(t) {
|
|
135
|
+
return t.type && t.type !== "application/octet-stream" && t.type !== "" ? t.type : h(t.name);
|
|
136
|
+
}
|
|
137
|
+
function j() {
|
|
138
|
+
let t;
|
|
139
|
+
async function c({
|
|
140
|
+
file: o,
|
|
141
|
+
onProgress: p,
|
|
142
|
+
onFileFinish: m,
|
|
143
|
+
onError: i,
|
|
144
|
+
bucketId: l
|
|
145
|
+
}) {
|
|
146
|
+
const {
|
|
147
|
+
name: x,
|
|
148
|
+
size: d,
|
|
149
|
+
webkitRelativePath: v
|
|
150
|
+
} = o, r = k(o), e = await n.files.getKeyAndCredentials.post({
|
|
151
|
+
filename: x,
|
|
152
|
+
// 传原始文件名,服务端会生成完整路径
|
|
153
|
+
bucketId: l,
|
|
154
|
+
size: d,
|
|
155
|
+
type: r
|
|
156
|
+
});
|
|
157
|
+
if (!e.data) {
|
|
158
|
+
i && i({
|
|
159
|
+
code: "501",
|
|
160
|
+
message: "获取上传凭证失败",
|
|
161
|
+
error: "",
|
|
162
|
+
url: "/files/getKeyAndCredentials",
|
|
163
|
+
method: "post"
|
|
164
|
+
});
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
const f = e.data.Key, u = await n.files.create.post({
|
|
168
|
+
bucketId: l,
|
|
169
|
+
filename: f,
|
|
170
|
+
// 使用服务端返回的 Key
|
|
171
|
+
name: x,
|
|
172
|
+
size: d,
|
|
173
|
+
type: r,
|
|
174
|
+
webkitRelativePath: v
|
|
175
|
+
});
|
|
176
|
+
if (!u.data) {
|
|
177
|
+
i && i({
|
|
178
|
+
code: "501",
|
|
179
|
+
message: "新建记录失败",
|
|
180
|
+
error: "",
|
|
181
|
+
url: "/files/create",
|
|
182
|
+
method: "post"
|
|
183
|
+
});
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
const g = u.data.id;
|
|
187
|
+
t = new b({
|
|
188
|
+
async getAuthorization(a, s) {
|
|
189
|
+
s({
|
|
190
|
+
TmpSecretId: e.data.TmpSecretId,
|
|
191
|
+
TmpSecretKey: e.data.TmpSecretKey,
|
|
192
|
+
SecurityToken: e.data.SessionToken,
|
|
193
|
+
StartTime: e.data.StartTime,
|
|
194
|
+
ExpiredTime: e.data.ExpiredTime,
|
|
195
|
+
ScopeLimit: !0
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
}), t.uploadFile({
|
|
199
|
+
Bucket: e.data.Bucket,
|
|
200
|
+
// 使用服务端返回的 Bucket
|
|
201
|
+
Region: e.data.Region,
|
|
202
|
+
// 使用服务端返回的 Region
|
|
203
|
+
Key: f,
|
|
204
|
+
// 使用服务端返回的 Key
|
|
205
|
+
Body: o,
|
|
206
|
+
SliceSize: 1024 * 1024 * 5,
|
|
207
|
+
onProgress(a) {
|
|
208
|
+
p && p(a);
|
|
209
|
+
},
|
|
210
|
+
onFileFinish(a, s, y) {
|
|
211
|
+
m && m(a, s, y), n.files.update.post({
|
|
212
|
+
id: g,
|
|
213
|
+
status: "success"
|
|
214
|
+
});
|
|
215
|
+
},
|
|
216
|
+
onTaskReady: (a) => {
|
|
217
|
+
}
|
|
218
|
+
}, (a) => {
|
|
219
|
+
a && (console.error("文件上传失败:", a), (async () => {
|
|
220
|
+
const {
|
|
221
|
+
error: s
|
|
222
|
+
} = await n.files.update.post({
|
|
223
|
+
id: g,
|
|
224
|
+
status: "fail"
|
|
225
|
+
});
|
|
226
|
+
s && i && i({
|
|
227
|
+
code: "501",
|
|
228
|
+
message: "更新进度失败",
|
|
229
|
+
error: "",
|
|
230
|
+
url: "/files/update",
|
|
231
|
+
method: "post"
|
|
232
|
+
});
|
|
233
|
+
})(), i && i(a));
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
return {
|
|
237
|
+
uploadFile: c
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
export {
|
|
241
|
+
j as u
|
|
242
|
+
};
|
package/dist/user.d.ts
CHANGED
|
@@ -3,5 +3,6 @@ export { default as UserAvatar } from './components/User/UserAvatar.vue';
|
|
|
3
3
|
export { default as UserBasicInformation } from './components/User/UserBasicInformation.vue';
|
|
4
4
|
export { default as UserButton } from './components/User/UserButton.vue';
|
|
5
5
|
export { default as UserPanel } from './components/User/UserPanel.vue';
|
|
6
|
+
export { default as UserPanelItem } from './components/User/UserPanelItem.vue';
|
|
6
7
|
export { default as UserAccountMenu } from './components/User/UserAccountMenu.vue';
|
|
7
8
|
export type * from './types/user';
|
package/dist/user.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { U as
|
|
1
|
+
import { U as e } from "./UserSubscriptionBaseInformation-BUs3qiHd.js";
|
|
2
|
+
import { U as o, a as n, b as t, c as U, d as c, e as i } from "./UserAccountMenu-BIRTtjLb.js";
|
|
2
3
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
o as UserAccountMenu,
|
|
5
|
+
n as UserAvatar,
|
|
6
|
+
t as UserBasicInformation,
|
|
7
|
+
U as UserButton,
|
|
8
|
+
c as UserPanel,
|
|
9
|
+
i as UserPanelItem,
|
|
10
|
+
e as UserSubscriptionBaseInformation
|
|
9
11
|
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 法律 / 协议类文档字典:将后端 aboutUs 的字段名映射到中文标签。
|
|
3
|
+
* 维护此处即可同步更新所有展示位(登录页底部、用户面板、关于我们等)。
|
|
4
|
+
*
|
|
5
|
+
* key ↔ aboutUs 字段名(保持与后端 schema 一致)
|
|
6
|
+
* label ↔ UI 展示文案
|
|
7
|
+
*/
|
|
8
|
+
export declare const LEGAL_DOCS: {
|
|
9
|
+
readonly userServiceAgreement: "用户服务协议";
|
|
10
|
+
readonly privacyPolicy: "隐私协议";
|
|
11
|
+
readonly personalInformationCollectionList: "个人信息收集清单";
|
|
12
|
+
readonly thirdPartyInformationSharingList: "第三方信息共享清单";
|
|
13
|
+
readonly licenseInformation: "证照信息";
|
|
14
|
+
};
|
|
15
|
+
export type LegalDocKey = keyof typeof LEGAL_DOCS;
|
|
16
|
+
export declare const LEGAL_DOC_KEYS: LegalDocKey[];
|
|
17
|
+
/**
|
|
18
|
+
* 构造法律文档外链。
|
|
19
|
+
* @param type 文档类型(与 aboutUs 字段名一致)
|
|
20
|
+
* @param appId 当前应用 ID(来自 globalConfig.appId)
|
|
21
|
+
*/
|
|
22
|
+
export declare function buildLegalLinkUrl(type: LegalDocKey, appId: string): string;
|