@huyooo/ui 0.5.56 → 0.5.59
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-Bt_oatde.js → AuthkitAuthModal-BSvtvlyj.js} +718 -661
- package/dist/AuthkitOAuthCallback-DQ1RAKyR.js +330 -0
- package/dist/{Clipboard-CXQgZeZq.js → Clipboard-BAn3vQlX.js} +1 -1
- package/dist/{Contact-ZkK_OxmG.js → Contact-CDelrtDR.js} +2 -2
- package/dist/{FeedbackItem-BZ3zskgs.js → FeedbackItem-B9lo9J0G.js} +3 -3
- package/dist/{FeedbackModal-CLRw0hmp.js → FeedbackModal-DWJmFtvY.js} +3 -3
- package/dist/{MessageHandle-cK3Z3tfe.js → MessageHandle-BlsLRmdj.js} +3 -3
- package/dist/{PaySubscriptions-DlV3SHOV.js → PaySubscriptions-Vj0KnZGv.js} +3 -3
- package/dist/{ReferrerReferees-DBOVVD_R.js → ReferrerReferees-D8hYkkAy.js} +4 -4
- package/dist/{Upload.vue_vue_type_script_setup_true_lang-bvoyktaa.js → Upload.vue_vue_type_script_setup_true_lang-BYlxlhfb.js} +2 -2
- package/dist/{UserAccountMenu-ByEEFdDV.js → UserAccountMenu-BWx4hX66.js} +7 -7
- package/dist/{WidthContainer-C5bq-fmp.js → WidthContainer-DiEkVFtH.js} +6 -6
- package/dist/api/Authkit/OAuth.d.ts +12 -3
- package/dist/{auth-CDARHcht.js → auth-bwwc2iT8.js} +60 -59
- package/dist/authkit.d.ts +2 -0
- package/dist/authkit.js +23 -21
- package/dist/common/globalConfig.d.ts +4 -0
- package/dist/common.js +1 -1
- package/dist/components/Authkit/Auth/AuthkitOAuthCallback.vue.d.ts +22 -0
- package/dist/components/Authkit/Auth/AuthkitOAuthList.vue.d.ts +1 -1
- package/dist/components/InfiniteLoading.vue.d.ts +1 -1
- package/dist/composables/Authkit/useAuthkitAuth.d.ts +2 -0
- package/dist/composables/Authkit/useAuthkitOAuth.d.ts +14 -3
- package/dist/composables.js +9 -9
- package/dist/feedback.js +3 -3
- package/dist/index.js +179 -177
- package/dist/message.js +2 -2
- 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-h9CL-MmH.js → useAuthkitAppsAuthPageInfo-CzZmhPMm.js} +1 -1
- package/dist/{useAuthkitCreateAndUpdate-Bsl_uyGQ.js → useAuthkitCreateAndUpdate-Co5wMbv7.js} +1 -1
- package/dist/{useAuthkitUsersProfile-B_uMdnat.js → useAuthkitUsersProfile-hZ9L3rYe.js} +93 -71
- package/dist/{useDownloads-05u8toS3.js → useDownloads-C0V_Sjr9.js} +1 -1
- package/dist/{useMessageNotifications-CAiVf4PX.js → useMessageNotifications-BT84SOgI.js} +1 -1
- package/dist/{useSEO-D5sci2ek.js → useSEO-DT8VkGVt.js} +2 -2
- package/dist/{useTableHandle-aJOWPWFL.js → useTableHandle-DaKaAKAH.js} +1 -1
- package/dist/{useUploadCos-DKh-eczm.js → useUploadCos-_xwV40NS.js} +1 -1
- package/dist/user.js +1 -1
- package/package.json +1 -1
- package/dist/AuthkitAuthorize-Cu6_4HoY.js +0 -248
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-BYlxlhfb.js";
|
|
2
|
+
import { u as s } from "./useUploadCos-_xwV40NS.js";
|
|
3
3
|
export {
|
|
4
4
|
p as Upload,
|
|
5
5
|
s as useUploadCos
|
|
@@ -1,119 +1,141 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { d as T, e as
|
|
3
|
-
const
|
|
4
|
-
function
|
|
1
|
+
import { ref as s, readonly as A, computed as y } from "vue";
|
|
2
|
+
import { d as T, e as x, f as C, g as l, c as i } from "./auth-bwwc2iT8.js";
|
|
3
|
+
const d = s("signIn"), m = [], v = [], k = [], c = s(null);
|
|
4
|
+
function I() {
|
|
5
|
+
try {
|
|
6
|
+
const e = new URLSearchParams(window.location.search), a = e.get("token");
|
|
7
|
+
if (a) {
|
|
8
|
+
w(a);
|
|
9
|
+
const u = window.location.pathname;
|
|
10
|
+
window.history.replaceState({}, "", u);
|
|
11
|
+
const f = e.get("userId"), t = e.get("appId");
|
|
12
|
+
return m.forEach((g) => g({
|
|
13
|
+
jwtToken: a,
|
|
14
|
+
userId: f,
|
|
15
|
+
appId: t
|
|
16
|
+
})), !0;
|
|
17
|
+
}
|
|
18
|
+
} catch (e) {
|
|
19
|
+
console.warn("Failed to handle OAuth callback:", e);
|
|
20
|
+
}
|
|
21
|
+
return !1;
|
|
22
|
+
}
|
|
23
|
+
function j() {
|
|
24
|
+
if (I())
|
|
25
|
+
return !0;
|
|
5
26
|
try {
|
|
6
27
|
const e = localStorage.getItem("jwtToken");
|
|
7
28
|
if (e)
|
|
8
|
-
return
|
|
29
|
+
return c.value = e, !0;
|
|
9
30
|
} catch (e) {
|
|
10
31
|
console.warn("Failed to access localStorage:", e);
|
|
11
32
|
}
|
|
12
33
|
return !1;
|
|
13
34
|
}
|
|
14
|
-
function
|
|
15
|
-
if (
|
|
16
|
-
return
|
|
35
|
+
function $() {
|
|
36
|
+
if (c.value)
|
|
37
|
+
return c.value;
|
|
17
38
|
try {
|
|
18
39
|
const e = localStorage.getItem("jwtToken");
|
|
19
|
-
return e && (
|
|
40
|
+
return e && (c.value = e), e;
|
|
20
41
|
} catch (e) {
|
|
21
42
|
return console.warn("Failed to access localStorage:", e), null;
|
|
22
43
|
}
|
|
23
44
|
}
|
|
24
|
-
function
|
|
25
|
-
|
|
45
|
+
function w(e) {
|
|
46
|
+
c.value = e;
|
|
26
47
|
try {
|
|
27
48
|
localStorage.setItem("jwtToken", e);
|
|
28
|
-
} catch (
|
|
29
|
-
console.warn("Failed to save token to localStorage:",
|
|
49
|
+
} catch (a) {
|
|
50
|
+
console.warn("Failed to save token to localStorage:", a);
|
|
30
51
|
}
|
|
31
52
|
}
|
|
32
|
-
function
|
|
33
|
-
|
|
53
|
+
function E() {
|
|
54
|
+
c.value = null;
|
|
34
55
|
try {
|
|
35
56
|
localStorage.removeItem("jwtToken");
|
|
36
57
|
} catch (e) {
|
|
37
58
|
console.warn("Failed to clear localStorage:", e);
|
|
38
59
|
}
|
|
39
60
|
}
|
|
40
|
-
function
|
|
61
|
+
function F(e) {
|
|
62
|
+
m.push(e);
|
|
63
|
+
}
|
|
64
|
+
function L(e) {
|
|
41
65
|
v.push(e);
|
|
42
66
|
}
|
|
43
67
|
function V(e) {
|
|
44
|
-
|
|
68
|
+
k.push(e);
|
|
45
69
|
}
|
|
46
|
-
function
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
const e = t(!1), s = t(!1), f = t(!1);
|
|
51
|
-
function h(r) {
|
|
52
|
-
e.value = !0, x({
|
|
70
|
+
function R() {
|
|
71
|
+
const e = s(!1), a = s(!1), u = s(!1);
|
|
72
|
+
function f(r) {
|
|
73
|
+
e.value = !0, C({
|
|
53
74
|
email: r.email,
|
|
54
75
|
password: r.password
|
|
55
76
|
}).then(({
|
|
56
77
|
data: n
|
|
57
78
|
}) => {
|
|
58
|
-
e.value = !1,
|
|
79
|
+
e.value = !1, w(n.jwtToken), m.forEach((b) => b(n));
|
|
59
80
|
}).catch((n) => {
|
|
60
81
|
e.value = !1, console.error("登录失败:", n);
|
|
61
82
|
});
|
|
62
83
|
}
|
|
63
|
-
function
|
|
64
|
-
|
|
84
|
+
function t(r) {
|
|
85
|
+
a.value = !0, x({
|
|
65
86
|
email: r.email,
|
|
66
87
|
userToken: r.userToken,
|
|
67
88
|
emailVerifyId: r.emailVerifyId,
|
|
68
89
|
password: r.password,
|
|
69
90
|
referrerId: r.referrerId
|
|
70
91
|
}).then(() => {
|
|
71
|
-
|
|
92
|
+
a.value = !1, d.value = "signIn", v.forEach((n) => n());
|
|
72
93
|
}).catch((n) => {
|
|
73
|
-
|
|
94
|
+
a.value = !1, console.error("注册失败:", n);
|
|
74
95
|
});
|
|
75
96
|
}
|
|
76
|
-
function
|
|
77
|
-
|
|
97
|
+
function g(r) {
|
|
98
|
+
u.value = !0, T({
|
|
78
99
|
email: r.email,
|
|
79
100
|
userToken: r.userToken,
|
|
80
101
|
emailVerifyId: r.emailVerifyId,
|
|
81
102
|
password: r.password
|
|
82
103
|
}).then(() => {
|
|
83
|
-
|
|
104
|
+
u.value = !1, d.value = "signIn", k.forEach((n) => n());
|
|
84
105
|
}).catch((n) => {
|
|
85
|
-
|
|
106
|
+
u.value = !1, console.error("重置密码失败:", n);
|
|
86
107
|
});
|
|
87
108
|
}
|
|
88
|
-
function I() {
|
|
89
|
-
c.value = "signUp";
|
|
90
|
-
}
|
|
91
109
|
function U() {
|
|
92
|
-
|
|
110
|
+
d.value = "signUp";
|
|
93
111
|
}
|
|
94
112
|
function P() {
|
|
95
|
-
|
|
113
|
+
d.value = "resetPassword";
|
|
114
|
+
}
|
|
115
|
+
function S() {
|
|
116
|
+
d.value = "signIn";
|
|
96
117
|
}
|
|
97
118
|
return {
|
|
98
|
-
signInSubmit:
|
|
99
|
-
signUpSubmit:
|
|
100
|
-
resetPasswordSubmit:
|
|
101
|
-
currentView:
|
|
119
|
+
signInSubmit: f,
|
|
120
|
+
signUpSubmit: t,
|
|
121
|
+
resetPasswordSubmit: g,
|
|
122
|
+
currentView: d,
|
|
102
123
|
authSignInLoading: e,
|
|
103
|
-
authSignUpLoading:
|
|
104
|
-
resetPasswordLoading:
|
|
105
|
-
switchSignUp:
|
|
106
|
-
switchResetPassword:
|
|
107
|
-
switchSignIn:
|
|
108
|
-
addSignInCallback:
|
|
109
|
-
addSignUpCallback:
|
|
110
|
-
addResetPasswordCallback:
|
|
124
|
+
authSignUpLoading: a,
|
|
125
|
+
resetPasswordLoading: u,
|
|
126
|
+
switchSignUp: U,
|
|
127
|
+
switchResetPassword: P,
|
|
128
|
+
switchSignIn: S,
|
|
129
|
+
addSignInCallback: F,
|
|
130
|
+
addSignUpCallback: L,
|
|
131
|
+
addResetPasswordCallback: V,
|
|
111
132
|
// 简化的token管理
|
|
112
|
-
jwtToken:
|
|
113
|
-
getToken:
|
|
114
|
-
setToken:
|
|
115
|
-
initializeAuth:
|
|
116
|
-
clearAuth:
|
|
133
|
+
jwtToken: A(c),
|
|
134
|
+
getToken: $,
|
|
135
|
+
setToken: w,
|
|
136
|
+
initializeAuth: j,
|
|
137
|
+
clearAuth: E,
|
|
138
|
+
handleOAuthCallback: I
|
|
117
139
|
};
|
|
118
140
|
}
|
|
119
141
|
function D(e) {
|
|
@@ -156,43 +178,43 @@ function K() {
|
|
|
156
178
|
method: "post"
|
|
157
179
|
});
|
|
158
180
|
}
|
|
159
|
-
function
|
|
181
|
+
function Q(e) {
|
|
160
182
|
return i({
|
|
161
183
|
url: `${l.authPrefixUrl}/restfulApi/users/deleteAccount`,
|
|
162
184
|
method: "post",
|
|
163
185
|
data: e
|
|
164
186
|
});
|
|
165
187
|
}
|
|
166
|
-
const o =
|
|
188
|
+
const o = s(null), p = s(!1), h = s(!1), O = y(() => !!o.value);
|
|
167
189
|
async function z() {
|
|
168
|
-
var
|
|
190
|
+
var f;
|
|
169
191
|
const {
|
|
170
192
|
getToken: e,
|
|
171
|
-
clearAuth:
|
|
172
|
-
} =
|
|
193
|
+
clearAuth: a
|
|
194
|
+
} = R();
|
|
173
195
|
if (!e()) {
|
|
174
196
|
console.warn("No authentication token found"), o.value = null;
|
|
175
197
|
return;
|
|
176
198
|
}
|
|
177
|
-
p.value = !0,
|
|
199
|
+
p.value = !0, h.value = !1;
|
|
178
200
|
try {
|
|
179
201
|
const {
|
|
180
|
-
data:
|
|
202
|
+
data: t
|
|
181
203
|
} = await D();
|
|
182
|
-
p.value = !1,
|
|
183
|
-
} catch (
|
|
184
|
-
p.value = !1,
|
|
204
|
+
p.value = !1, t ? (o.value = t, h.value = !0) : (console.warn("获取用户资料返回空数据"), o.value = null, h.value = !1);
|
|
205
|
+
} catch (t) {
|
|
206
|
+
p.value = !1, h.value = !1, console.error("获取用户资料失败:", t), ((f = t == null ? void 0 : t.response) == null ? void 0 : f.status) === 401 && (console.warn("认证已过期,清除认证状态"), a()), o.value = null;
|
|
185
207
|
}
|
|
186
208
|
}
|
|
187
209
|
function B() {
|
|
188
210
|
o.value = null;
|
|
189
211
|
}
|
|
190
|
-
function
|
|
212
|
+
function W() {
|
|
191
213
|
return {
|
|
192
214
|
userProfile: o,
|
|
193
215
|
loading: p,
|
|
194
|
-
usersProfileSuccess:
|
|
195
|
-
isLoggedIn:
|
|
216
|
+
usersProfileSuccess: h,
|
|
217
|
+
isLoggedIn: O,
|
|
196
218
|
// 新增:基于userProfile的登录状态
|
|
197
219
|
fetchUserProfile: z,
|
|
198
220
|
clearUserProfile: B
|
|
@@ -200,13 +222,13 @@ function Q() {
|
|
|
200
222
|
};
|
|
201
223
|
}
|
|
202
224
|
export {
|
|
203
|
-
|
|
225
|
+
W as a,
|
|
204
226
|
D as b,
|
|
205
227
|
q as c,
|
|
206
228
|
H as d,
|
|
207
229
|
G as e,
|
|
208
230
|
J as f,
|
|
209
231
|
K as g,
|
|
210
|
-
|
|
211
|
-
|
|
232
|
+
Q as h,
|
|
233
|
+
R as u
|
|
212
234
|
};
|
|
@@ -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-CzZmhPMm.js";
|
|
4
|
+
import { a as D } from "./useAuthkitUsersProfile-hZ9L3rYe.js";
|
|
5
5
|
const v = I({
|
|
6
6
|
key: "",
|
|
7
7
|
name: ""
|
package/dist/user.js
CHANGED
package/package.json
CHANGED
|
@@ -1,248 +0,0 @@
|
|
|
1
|
-
import { defineComponent as k, computed as z, createElementBlock as f, openBlock as m, normalizeStyle as b, createElementVNode as a, createCommentVNode as A, renderSlot as C, ref as h, toDisplayString as v, createVNode as r, unref as o, withCtx as i, createTextVNode as I } from "vue";
|
|
2
|
-
import { _ as S } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
3
|
-
/* empty css */
|
|
4
|
-
/* empty css */
|
|
5
|
-
/* empty css */
|
|
6
|
-
/* empty css */
|
|
7
|
-
/* empty css */
|
|
8
|
-
/* empty css */
|
|
9
|
-
/* empty css */
|
|
10
|
-
import { List as w, ListItem as d, ListItemMeta as p, Avatar as c, Button as x } from "@arco-design/web-vue";
|
|
11
|
-
import { a as $ } from "./useAuthkitAppsAuthPageInfo-h9CL-MmH.js";
|
|
12
|
-
import { o as T } from "./auth-CDARHcht.js";
|
|
13
|
-
const U = {
|
|
14
|
-
class: "header"
|
|
15
|
-
}, B = ["href"], L = {
|
|
16
|
-
class: "container"
|
|
17
|
-
}, N = /* @__PURE__ */ k({
|
|
18
|
-
__name: "AuthkitAuthContainer",
|
|
19
|
-
props: {
|
|
20
|
-
applicationLogoUrl: {
|
|
21
|
-
type: String,
|
|
22
|
-
required: !0,
|
|
23
|
-
default: () => ""
|
|
24
|
-
},
|
|
25
|
-
name: {
|
|
26
|
-
type: String,
|
|
27
|
-
required: !0,
|
|
28
|
-
default: () => ""
|
|
29
|
-
},
|
|
30
|
-
description: {
|
|
31
|
-
type: String,
|
|
32
|
-
required: !0,
|
|
33
|
-
default: () => ""
|
|
34
|
-
},
|
|
35
|
-
appHomePage: {
|
|
36
|
-
type: String,
|
|
37
|
-
required: !0,
|
|
38
|
-
default: () => ""
|
|
39
|
-
},
|
|
40
|
-
backgroundImage: {
|
|
41
|
-
type: String,
|
|
42
|
-
required: !0,
|
|
43
|
-
default: () => ""
|
|
44
|
-
},
|
|
45
|
-
backgroundColor: {
|
|
46
|
-
type: String,
|
|
47
|
-
required: !0,
|
|
48
|
-
default: () => ""
|
|
49
|
-
},
|
|
50
|
-
linkColor: {
|
|
51
|
-
type: String,
|
|
52
|
-
default: "rgb(22, 93, 255)"
|
|
53
|
-
},
|
|
54
|
-
backgroundType: {
|
|
55
|
-
type: String,
|
|
56
|
-
default: "color"
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
setup(s) {
|
|
60
|
-
const e = s, t = z(() => e.backgroundType === "color" ? {
|
|
61
|
-
backgroundColor: e.backgroundColor
|
|
62
|
-
} : {
|
|
63
|
-
backgroundImage: `url(${e.backgroundImage})`
|
|
64
|
-
});
|
|
65
|
-
return (l, g) => (m(), f("div", {
|
|
66
|
-
class: "auth",
|
|
67
|
-
style: b(t.value)
|
|
68
|
-
}, [a("div", U, [e.name ? (m(), f("a", {
|
|
69
|
-
key: 0,
|
|
70
|
-
href: e.appHomePage,
|
|
71
|
-
target: "_self",
|
|
72
|
-
class: "link",
|
|
73
|
-
style: b({
|
|
74
|
-
color: e.linkColor
|
|
75
|
-
})
|
|
76
|
-
}, " 返回主页 ", 12, B)) : A("", !0)]), a("div", L, [C(l.$slots, "default", {}, void 0, !0)])], 4));
|
|
77
|
-
}
|
|
78
|
-
}), ee = /* @__PURE__ */ S(N, [["__scopeId", "data-v-203946ff"]]), V = {
|
|
79
|
-
class: "box"
|
|
80
|
-
}, O = {
|
|
81
|
-
class: "title"
|
|
82
|
-
}, P = {
|
|
83
|
-
class: "content"
|
|
84
|
-
}, D = {
|
|
85
|
-
class: "redirect"
|
|
86
|
-
}, E = {
|
|
87
|
-
style: {
|
|
88
|
-
"font-weight": "bold",
|
|
89
|
-
"font-size": "12px"
|
|
90
|
-
}
|
|
91
|
-
}, F = /* @__PURE__ */ k({
|
|
92
|
-
__name: "AuthkitAuthorize",
|
|
93
|
-
props: {
|
|
94
|
-
size: {
|
|
95
|
-
type: String,
|
|
96
|
-
required: !0
|
|
97
|
-
},
|
|
98
|
-
title: {
|
|
99
|
-
type: String,
|
|
100
|
-
required: !0,
|
|
101
|
-
default: () => "授权登录"
|
|
102
|
-
},
|
|
103
|
-
logo: {
|
|
104
|
-
type: String,
|
|
105
|
-
required: !0,
|
|
106
|
-
default: () => ""
|
|
107
|
-
},
|
|
108
|
-
clientId: {
|
|
109
|
-
type: String,
|
|
110
|
-
required: !0,
|
|
111
|
-
default: () => ""
|
|
112
|
-
},
|
|
113
|
-
responseType: {
|
|
114
|
-
type: String,
|
|
115
|
-
required: !0,
|
|
116
|
-
default: () => ""
|
|
117
|
-
},
|
|
118
|
-
scope: {
|
|
119
|
-
type: String,
|
|
120
|
-
required: !0,
|
|
121
|
-
default: () => ""
|
|
122
|
-
},
|
|
123
|
-
state: {
|
|
124
|
-
type: String,
|
|
125
|
-
required: !0,
|
|
126
|
-
default: () => ""
|
|
127
|
-
},
|
|
128
|
-
redirectUri: {
|
|
129
|
-
type: String,
|
|
130
|
-
required: !0,
|
|
131
|
-
default: () => ""
|
|
132
|
-
},
|
|
133
|
-
userInfo: {
|
|
134
|
-
type: Object,
|
|
135
|
-
required: !0,
|
|
136
|
-
default: () => ""
|
|
137
|
-
}
|
|
138
|
-
},
|
|
139
|
-
setup(s) {
|
|
140
|
-
const e = h(!1), t = s, l = h({
|
|
141
|
-
appKey: "",
|
|
142
|
-
name: "",
|
|
143
|
-
homePageUrl: "",
|
|
144
|
-
createAt: "",
|
|
145
|
-
authorizationCallback: ""
|
|
146
|
-
});
|
|
147
|
-
function g() {
|
|
148
|
-
$({
|
|
149
|
-
id: t.clientId
|
|
150
|
-
}).then(({
|
|
151
|
-
data: n
|
|
152
|
-
}) => {
|
|
153
|
-
l.value = n;
|
|
154
|
-
}).catch((n) => {
|
|
155
|
-
console.error("获取应用信息失败:", n);
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
g();
|
|
159
|
-
function q() {
|
|
160
|
-
e.value = !0, T({
|
|
161
|
-
client_id: t.clientId,
|
|
162
|
-
response_type: t.responseType,
|
|
163
|
-
scope: t.scope,
|
|
164
|
-
state: t.state,
|
|
165
|
-
redirect_uri: t.redirectUri
|
|
166
|
-
}).then(({
|
|
167
|
-
data: n
|
|
168
|
-
}) => {
|
|
169
|
-
e.value = !1, window.location = n.authorizeUrl;
|
|
170
|
-
}).catch((n) => {
|
|
171
|
-
e.value = !1, console.error("授权失败:", n);
|
|
172
|
-
});
|
|
173
|
-
}
|
|
174
|
-
return (n, u) => (m(), f("div", V, [a("div", O, v(`授权 ${l.value.name}`), 1), a("div", P, [r(o(w), null, {
|
|
175
|
-
default: i(() => [r(o(d), null, {
|
|
176
|
-
default: i(() => {
|
|
177
|
-
var _;
|
|
178
|
-
return [r(o(p), {
|
|
179
|
-
title: l.value.name,
|
|
180
|
-
description: `想要使用您的${(_ = t.userInfo) == null ? void 0 : _.nickname}账户`
|
|
181
|
-
}, {
|
|
182
|
-
avatar: i(() => {
|
|
183
|
-
var y;
|
|
184
|
-
return [r(o(c), {
|
|
185
|
-
shape: "square",
|
|
186
|
-
"image-url": (y = t.userInfo) == null ? void 0 : y.avatar
|
|
187
|
-
}, null, 8, ["image-url"])];
|
|
188
|
-
}),
|
|
189
|
-
_: 1
|
|
190
|
-
}, 8, ["title", "description"])];
|
|
191
|
-
}),
|
|
192
|
-
_: 1
|
|
193
|
-
}), r(o(d), null, {
|
|
194
|
-
default: i(() => [r(o(p), {
|
|
195
|
-
title: "公开信息",
|
|
196
|
-
description: "头像、昵称"
|
|
197
|
-
}, {
|
|
198
|
-
avatar: i(() => [r(o(c), {
|
|
199
|
-
shape: "square"
|
|
200
|
-
}, {
|
|
201
|
-
default: i(() => [...u[0] || (u[0] = [a("img", {
|
|
202
|
-
alt: "avatar",
|
|
203
|
-
src: "https://p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/3ee5f13fb09879ecb5185e440cef6eb9.png~tplv-uwbnlip3yd-webp.webp"
|
|
204
|
-
}, null, -1)])]),
|
|
205
|
-
_: 1
|
|
206
|
-
})]),
|
|
207
|
-
_: 1
|
|
208
|
-
})]),
|
|
209
|
-
_: 1
|
|
210
|
-
}), r(o(d), null, {
|
|
211
|
-
default: i(() => [r(o(p), {
|
|
212
|
-
title: "个人用户数据",
|
|
213
|
-
description: "电子邮件地址"
|
|
214
|
-
}, {
|
|
215
|
-
avatar: i(() => [r(o(c), {
|
|
216
|
-
shape: "square"
|
|
217
|
-
}, {
|
|
218
|
-
default: i(() => [...u[1] || (u[1] = [a("img", {
|
|
219
|
-
alt: "avatar",
|
|
220
|
-
src: "https://p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/3ee5f13fb09879ecb5185e440cef6eb9.png~tplv-uwbnlip3yd-webp.webp"
|
|
221
|
-
}, null, -1)])]),
|
|
222
|
-
_: 1
|
|
223
|
-
})]),
|
|
224
|
-
_: 1
|
|
225
|
-
})]),
|
|
226
|
-
_: 1
|
|
227
|
-
})]),
|
|
228
|
-
_: 1
|
|
229
|
-
}), r(o(x), {
|
|
230
|
-
type: "primary",
|
|
231
|
-
size: t.size,
|
|
232
|
-
loading: e.value,
|
|
233
|
-
onClick: q
|
|
234
|
-
}, {
|
|
235
|
-
default: i(() => [...u[2] || (u[2] = [I(" 授权 ", -1)])]),
|
|
236
|
-
_: 1
|
|
237
|
-
}, 8, ["size", "loading"]), a("div", D, [u[3] || (u[3] = a("div", {
|
|
238
|
-
style: {
|
|
239
|
-
color: "#888",
|
|
240
|
-
"font-size": "12px"
|
|
241
|
-
}
|
|
242
|
-
}, "授权后将跳转至", -1)), a("div", E, v(l.value.authorizationCallback), 1)])])]));
|
|
243
|
-
}
|
|
244
|
-
}), te = /* @__PURE__ */ S(F, [["__scopeId", "data-v-cc821ddc"]]);
|
|
245
|
-
export {
|
|
246
|
-
ee as A,
|
|
247
|
-
te as a
|
|
248
|
-
};
|