@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
|
@@ -1,2112 +0,0 @@
|
|
|
1
|
-
/* empty css */
|
|
2
|
-
/* empty css */
|
|
3
|
-
/* empty css */
|
|
4
|
-
import { defineComponent as V, computed as N, openBlock as g, createElementBlock as U, normalizeStyle as se, normalizeClass as _e, createElementVNode as z, ref as h, createBlock as k, unref as e, withCtx as a, createVNode as i, createTextVNode as _, onMounted as K, onUnmounted as re, withDirectives as be, toDisplayString as B, vShow as ke, Fragment as M, createCommentVNode as S, renderList as ze, isRef as ue, useSlots as Se, renderSlot as de } from "vue";
|
|
5
|
-
import { Form as H, FormItem as I, Avatar as me, Input as x, Textarea as Ie, Button as A, Message as F, Alert as D, Space as ee, InputPassword as Ve, Result as Ae, Modal as ce, Divider as Pe, Link as G } from "@arco-design/web-vue";
|
|
6
|
-
/* empty css */
|
|
7
|
-
import { e as R, g as j, i as fe, u as Ue } from "./apiClients-DJchWBAG.js";
|
|
8
|
-
/* empty css */
|
|
9
|
-
import { u as $e } from "./useUploadCos-BO3W_uqs.js";
|
|
10
|
-
import { _ as Ce, g as xe, i as qe } from "./plugin-vue_export-helper-LjDO2Zua.js";
|
|
11
|
-
import { _ as $ } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
12
|
-
import { a as Z, u as J } from "./useAuthkitUsersProfile-BqW74gfs.js";
|
|
13
|
-
import { M as Te } from "./Menu-Cy2ZPeaz.js";
|
|
14
|
-
import { u as Re } from "./useAuthkitCreateAndUpdate-CPkogY7K.js";
|
|
15
|
-
import { u as ae } from "./useAuthkitAppsAuthPageInfo-C3EHOtlk.js";
|
|
16
|
-
import { Icon as Le } from "@iconify/vue";
|
|
17
|
-
const Be = V({
|
|
18
|
-
name: "IconCamera",
|
|
19
|
-
props: {
|
|
20
|
-
size: {
|
|
21
|
-
type: [Number, String]
|
|
22
|
-
},
|
|
23
|
-
strokeWidth: {
|
|
24
|
-
type: Number,
|
|
25
|
-
default: 4
|
|
26
|
-
},
|
|
27
|
-
strokeLinecap: {
|
|
28
|
-
type: String,
|
|
29
|
-
default: "butt",
|
|
30
|
-
validator: (o) => ["butt", "round", "square"].includes(o)
|
|
31
|
-
},
|
|
32
|
-
strokeLinejoin: {
|
|
33
|
-
type: String,
|
|
34
|
-
default: "miter",
|
|
35
|
-
validator: (o) => ["arcs", "bevel", "miter", "miter-clip", "round"].includes(o)
|
|
36
|
-
},
|
|
37
|
-
rotate: Number,
|
|
38
|
-
spin: Boolean
|
|
39
|
-
},
|
|
40
|
-
emits: {
|
|
41
|
-
click: (o) => !0
|
|
42
|
-
},
|
|
43
|
-
setup(o, {
|
|
44
|
-
emit: r
|
|
45
|
-
}) {
|
|
46
|
-
const u = xe("icon"), l = N(() => [u, `${u}-camera`, {
|
|
47
|
-
[`${u}-spin`]: o.spin
|
|
48
|
-
}]), n = N(() => {
|
|
49
|
-
const t = {};
|
|
50
|
-
return o.size && (t.fontSize = qe(o.size) ? `${o.size}px` : o.size), o.rotate && (t.transform = `rotate(${o.rotate}deg)`), t;
|
|
51
|
-
});
|
|
52
|
-
return {
|
|
53
|
-
cls: l,
|
|
54
|
-
innerStyle: n,
|
|
55
|
-
onClick: (t) => {
|
|
56
|
-
r("click", t);
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
}), Oe = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
|
|
61
|
-
function Ee(o, r, u, l, n, d) {
|
|
62
|
-
return g(), U("svg", {
|
|
63
|
-
viewBox: "0 0 48 48",
|
|
64
|
-
fill: "none",
|
|
65
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
66
|
-
stroke: "currentColor",
|
|
67
|
-
class: _e(o.cls),
|
|
68
|
-
style: se(o.innerStyle),
|
|
69
|
-
"stroke-width": o.strokeWidth,
|
|
70
|
-
"stroke-linecap": o.strokeLinecap,
|
|
71
|
-
"stroke-linejoin": o.strokeLinejoin,
|
|
72
|
-
onClick: r[0] || (r[0] = (...t) => o.onClick && o.onClick(...t))
|
|
73
|
-
}, r[1] || (r[1] = [z("path", {
|
|
74
|
-
d: "m33 12-1.862-3.724A.5.5 0 0 0 30.691 8H17.309a.5.5 0 0 0-.447.276L15 12m16 14a7 7 0 1 1-14 0 7 7 0 0 1 14 0ZM7 40h34a1 1 0 0 0 1-1V13a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1v26a1 1 0 0 0 1 1Z"
|
|
75
|
-
}, null, -1)]), 14, Oe);
|
|
76
|
-
}
|
|
77
|
-
var te = /* @__PURE__ */ Ce(Be, [["render", Ee]]);
|
|
78
|
-
const De = Object.assign(te, {
|
|
79
|
-
install: (o, r) => {
|
|
80
|
-
var u;
|
|
81
|
-
const l = (u = r == null ? void 0 : r.iconPrefix) != null ? u : "";
|
|
82
|
-
o.component(l + te.name, te);
|
|
83
|
-
}
|
|
84
|
-
}), Ne = {
|
|
85
|
-
class: "handle"
|
|
86
|
-
}, Fe = /* @__PURE__ */ V({
|
|
87
|
-
__name: "AuthkitPersonalInformation",
|
|
88
|
-
props: {
|
|
89
|
-
size: {
|
|
90
|
-
type: String,
|
|
91
|
-
required: !0
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
emits: ["submit"],
|
|
95
|
-
setup(o, {
|
|
96
|
-
emit: r
|
|
97
|
-
}) {
|
|
98
|
-
const u = r, l = o, n = h({
|
|
99
|
-
id: void 0,
|
|
100
|
-
nickname: "",
|
|
101
|
-
description: "",
|
|
102
|
-
avatar: "",
|
|
103
|
-
avatarUrl: ""
|
|
104
|
-
}), d = h(!1), t = h(), s = h(!1), y = {
|
|
105
|
-
color: "var(--huyooo-accent-primary)"
|
|
106
|
-
};
|
|
107
|
-
async function m() {
|
|
108
|
-
s.value = !0;
|
|
109
|
-
const {
|
|
110
|
-
data: p
|
|
111
|
-
} = await R.users.profile.post({});
|
|
112
|
-
s.value = !1, p && (n.value.id = p.id, n.value.nickname = p.nickname, n.value.description = p.description, n.value.avatar = p.avatar, n.value.avatarUrl = p.avatarUrl);
|
|
113
|
-
}
|
|
114
|
-
async function v() {
|
|
115
|
-
if (!await t.value.validate()) {
|
|
116
|
-
s.value = !0;
|
|
117
|
-
const f = {
|
|
118
|
-
id: n.value.id,
|
|
119
|
-
nickname: n.value.nickname,
|
|
120
|
-
description: n.value.description,
|
|
121
|
-
avatar: n.value.avatar
|
|
122
|
-
}, {
|
|
123
|
-
data: w,
|
|
124
|
-
error: C
|
|
125
|
-
} = await R.users.update.baseInfo.post(f);
|
|
126
|
-
s.value = !1, !C && w && (F.success("更新成功"), n.value.avatarUrl = w.avatarUrl, u("submit"));
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
m();
|
|
130
|
-
const c = () => {
|
|
131
|
-
const {
|
|
132
|
-
uploadFile: p
|
|
133
|
-
} = $e(), f = document.createElement("input");
|
|
134
|
-
f.type = "file", f.accept = "image/*", f.style.display = "none", document.body.append(f), f.addEventListener("change", async (w) => {
|
|
135
|
-
var L;
|
|
136
|
-
const P = (L = w.target.files) == null ? void 0 : L[0];
|
|
137
|
-
if (P) {
|
|
138
|
-
d.value = !0;
|
|
139
|
-
try {
|
|
140
|
-
p({
|
|
141
|
-
bucketId: j.avatarBucketId,
|
|
142
|
-
file: P,
|
|
143
|
-
onFileFinish(q, E, W) {
|
|
144
|
-
d.value = !0;
|
|
145
|
-
const X = {
|
|
146
|
-
id: n.value.id,
|
|
147
|
-
nickname: n.value.nickname,
|
|
148
|
-
description: n.value.description,
|
|
149
|
-
avatar: W.Key
|
|
150
|
-
};
|
|
151
|
-
(async () => {
|
|
152
|
-
const {
|
|
153
|
-
error: Y
|
|
154
|
-
} = await R.users.update.baseInfo.post(X);
|
|
155
|
-
d.value = !1, Y || (F.success("更新成功"), m(), u("submit"));
|
|
156
|
-
})();
|
|
157
|
-
},
|
|
158
|
-
onError(q) {
|
|
159
|
-
console.error("上传图片失败"), d.value = !1;
|
|
160
|
-
}
|
|
161
|
-
});
|
|
162
|
-
} catch (q) {
|
|
163
|
-
console.error("上传图片失败", q), d.value = !1;
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
f.remove();
|
|
167
|
-
}), f.click();
|
|
168
|
-
};
|
|
169
|
-
return (p, f) => (g(), k(e(H), {
|
|
170
|
-
ref_key: "formRef",
|
|
171
|
-
ref: t,
|
|
172
|
-
model: n.value,
|
|
173
|
-
"auto-label-width": "",
|
|
174
|
-
size: l.size
|
|
175
|
-
}, {
|
|
176
|
-
default: a(() => [i(e(I), {
|
|
177
|
-
field: "avatar",
|
|
178
|
-
label: "头像",
|
|
179
|
-
rules: [{
|
|
180
|
-
required: !1,
|
|
181
|
-
message: "请上传头像"
|
|
182
|
-
}]
|
|
183
|
-
}, {
|
|
184
|
-
default: a(() => [i(e(me), {
|
|
185
|
-
"image-url": n.value.avatarUrl,
|
|
186
|
-
size: 42,
|
|
187
|
-
"object-fit": "cover",
|
|
188
|
-
"trigger-icon-style": y,
|
|
189
|
-
onClick: c
|
|
190
|
-
}, {
|
|
191
|
-
"trigger-icon": a(() => [i(e(De))]),
|
|
192
|
-
_: 1
|
|
193
|
-
}, 8, ["image-url"])]),
|
|
194
|
-
_: 1
|
|
195
|
-
}), i(e(I), {
|
|
196
|
-
field: "nickname",
|
|
197
|
-
label: "昵称",
|
|
198
|
-
rules: [{
|
|
199
|
-
required: !1,
|
|
200
|
-
message: "请输入昵称"
|
|
201
|
-
}]
|
|
202
|
-
}, {
|
|
203
|
-
default: a(() => [i(e(x), {
|
|
204
|
-
modelValue: n.value.nickname,
|
|
205
|
-
"onUpdate:modelValue": f[0] || (f[0] = (w) => n.value.nickname = w),
|
|
206
|
-
placeholder: "请输入昵称"
|
|
207
|
-
}, null, 8, ["modelValue"])]),
|
|
208
|
-
_: 1
|
|
209
|
-
}), i(e(I), {
|
|
210
|
-
field: "description",
|
|
211
|
-
label: "简介",
|
|
212
|
-
rules: [{
|
|
213
|
-
required: !1,
|
|
214
|
-
message: "请输入描述"
|
|
215
|
-
}]
|
|
216
|
-
}, {
|
|
217
|
-
default: a(() => [i(e(Ie), {
|
|
218
|
-
modelValue: n.value.description,
|
|
219
|
-
"onUpdate:modelValue": f[1] || (f[1] = (w) => n.value.description = w),
|
|
220
|
-
placeholder: "请输入描述",
|
|
221
|
-
"allow-clear": "",
|
|
222
|
-
"auto-size": {
|
|
223
|
-
minRows: 5
|
|
224
|
-
}
|
|
225
|
-
}, null, 8, ["modelValue"])]),
|
|
226
|
-
_: 1
|
|
227
|
-
}), i(e(I), {
|
|
228
|
-
field: "",
|
|
229
|
-
label: "",
|
|
230
|
-
rules: []
|
|
231
|
-
}, {
|
|
232
|
-
default: a(() => [z("div", Ne, [i(e(A), {
|
|
233
|
-
type: "primary",
|
|
234
|
-
loading: s.value,
|
|
235
|
-
onClick: v
|
|
236
|
-
}, {
|
|
237
|
-
default: a(() => [...f[2] || (f[2] = [_(" 提交 ", -1)])]),
|
|
238
|
-
_: 1
|
|
239
|
-
}, 8, ["loading"])])]),
|
|
240
|
-
_: 1
|
|
241
|
-
})]),
|
|
242
|
-
_: 1
|
|
243
|
-
}, 8, ["model", "size"]));
|
|
244
|
-
}
|
|
245
|
-
}), He = /* @__PURE__ */ $(Fe, [["__scopeId", "data-v-1d138326"]]), Me = /* @__PURE__ */ V({
|
|
246
|
-
__name: "AuthkitSendVerifyCode",
|
|
247
|
-
props: {
|
|
248
|
-
size: {
|
|
249
|
-
type: String,
|
|
250
|
-
required: !0
|
|
251
|
-
},
|
|
252
|
-
loading: {
|
|
253
|
-
type: Boolean,
|
|
254
|
-
required: !0,
|
|
255
|
-
default: () => !1
|
|
256
|
-
}
|
|
257
|
-
},
|
|
258
|
-
emits: ["send"],
|
|
259
|
-
setup(o, {
|
|
260
|
-
expose: r,
|
|
261
|
-
emit: u
|
|
262
|
-
}) {
|
|
263
|
-
const l = u, n = o, d = h(!1);
|
|
264
|
-
let t;
|
|
265
|
-
const s = h(0), y = N(() => s.value.toString().padStart(2, "0")), m = N(() => s.value > 0), v = () => {
|
|
266
|
-
d.value && (s.value <= 0 ? (clearInterval(t), d.value = !1) : s.value--);
|
|
267
|
-
};
|
|
268
|
-
function c() {
|
|
269
|
-
l("send");
|
|
270
|
-
}
|
|
271
|
-
function p() {
|
|
272
|
-
s.value = 60, d.value = !0, t && clearInterval(t), t = setInterval(v, 1e3);
|
|
273
|
-
}
|
|
274
|
-
return K(() => {
|
|
275
|
-
}), r({
|
|
276
|
-
startCountFn: p
|
|
277
|
-
}), re(() => {
|
|
278
|
-
t && clearInterval(t);
|
|
279
|
-
}), (f, w) => (g(), k(e(A), {
|
|
280
|
-
class: "OAuthItem",
|
|
281
|
-
type: "primary",
|
|
282
|
-
size: n.size,
|
|
283
|
-
disabled: m.value,
|
|
284
|
-
loading: n.loading,
|
|
285
|
-
onClick: c
|
|
286
|
-
}, {
|
|
287
|
-
default: a(() => [w[0] || (w[0] = z("span", null, " 发送验证码", -1)), be(z("span", {
|
|
288
|
-
class: "verify-code-timer"
|
|
289
|
-
}, B(`(${y.value})`), 513), [[ke, m.value]])]),
|
|
290
|
-
_: 1
|
|
291
|
-
}, 8, ["size", "disabled", "loading"]));
|
|
292
|
-
}
|
|
293
|
-
}), le = /* @__PURE__ */ $(Me, [["__scopeId", "data-v-2883dc6d"]]), Ge = {
|
|
294
|
-
class: "sendVerifyCodeItem"
|
|
295
|
-
}, je = {
|
|
296
|
-
class: "handle"
|
|
297
|
-
}, We = /* @__PURE__ */ V({
|
|
298
|
-
__name: "AuthkitEmailVerify",
|
|
299
|
-
props: {
|
|
300
|
-
email: {
|
|
301
|
-
type: String,
|
|
302
|
-
required: !0,
|
|
303
|
-
default: () => ""
|
|
304
|
-
},
|
|
305
|
-
size: {
|
|
306
|
-
type: String,
|
|
307
|
-
required: !0
|
|
308
|
-
}
|
|
309
|
-
},
|
|
310
|
-
emits: ["next"],
|
|
311
|
-
setup(o, {
|
|
312
|
-
emit: r
|
|
313
|
-
}) {
|
|
314
|
-
const u = r, l = o, n = N(() => fe(l.email)), d = h(), t = h(!1), s = h(!1), y = h(), m = h({
|
|
315
|
-
userToken: void 0,
|
|
316
|
-
emailVerifyId: void 0
|
|
317
|
-
});
|
|
318
|
-
async function v() {
|
|
319
|
-
t.value = !0;
|
|
320
|
-
const {
|
|
321
|
-
data: p
|
|
322
|
-
} = await R.verify.email.retry.post({
|
|
323
|
-
email: l.email
|
|
324
|
-
});
|
|
325
|
-
t.value = !1, p && (m.value.emailVerifyId = p.emailVerifyId, d.value.startCountFn());
|
|
326
|
-
}
|
|
327
|
-
async function c() {
|
|
328
|
-
if (!await y.value.validate(["userToken"])) {
|
|
329
|
-
s.value = !0;
|
|
330
|
-
const f = {
|
|
331
|
-
email: l.email,
|
|
332
|
-
userToken: m.value.userToken,
|
|
333
|
-
emailVerifyId: m.value.emailVerifyId
|
|
334
|
-
}, {
|
|
335
|
-
error: w
|
|
336
|
-
} = await R.verify.email.post(f);
|
|
337
|
-
s.value = !1, w || u("next");
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
return (p, f) => (g(), k(e(H), {
|
|
341
|
-
ref_key: "formRef",
|
|
342
|
-
ref: y,
|
|
343
|
-
model: m.value,
|
|
344
|
-
"auto-label-width": "",
|
|
345
|
-
size: l.size
|
|
346
|
-
}, {
|
|
347
|
-
default: a(() => [i(e(I), {
|
|
348
|
-
field: "email",
|
|
349
|
-
label: "邮箱",
|
|
350
|
-
rules: [{
|
|
351
|
-
required: !1,
|
|
352
|
-
message: "请输入邮箱"
|
|
353
|
-
}, {
|
|
354
|
-
type: "email",
|
|
355
|
-
message: "请输入有效的邮箱"
|
|
356
|
-
}]
|
|
357
|
-
}, {
|
|
358
|
-
default: a(() => [_(B(n.value), 1)]),
|
|
359
|
-
_: 1
|
|
360
|
-
}), i(e(I), {
|
|
361
|
-
field: "userToken",
|
|
362
|
-
label: "验证码",
|
|
363
|
-
"hide-label": "",
|
|
364
|
-
rules: [{
|
|
365
|
-
required: !0,
|
|
366
|
-
message: "请输入验证码"
|
|
367
|
-
}]
|
|
368
|
-
}, {
|
|
369
|
-
default: a(() => [z("div", Ge, [i(e(x), {
|
|
370
|
-
modelValue: m.value.userToken,
|
|
371
|
-
"onUpdate:modelValue": f[0] || (f[0] = (w) => m.value.userToken = w),
|
|
372
|
-
placeholder: "请输入验证码"
|
|
373
|
-
}, null, 8, ["modelValue"]), i(le, {
|
|
374
|
-
ref_key: "SendVerifyCodeRef",
|
|
375
|
-
ref: d,
|
|
376
|
-
size: l.size,
|
|
377
|
-
loading: t.value,
|
|
378
|
-
style: {
|
|
379
|
-
"margin-left": "10px"
|
|
380
|
-
},
|
|
381
|
-
onSend: v
|
|
382
|
-
}, null, 8, ["size", "loading"])])]),
|
|
383
|
-
_: 1
|
|
384
|
-
}), i(e(I), {
|
|
385
|
-
field: "",
|
|
386
|
-
label: "",
|
|
387
|
-
rules: []
|
|
388
|
-
}, {
|
|
389
|
-
default: a(() => [z("div", je, [i(e(A), {
|
|
390
|
-
loading: s.value,
|
|
391
|
-
type: "primary",
|
|
392
|
-
onClick: c
|
|
393
|
-
}, {
|
|
394
|
-
default: a(() => [...f[1] || (f[1] = [_(" 提交 ", -1)])]),
|
|
395
|
-
_: 1
|
|
396
|
-
}, 8, ["loading"])])]),
|
|
397
|
-
_: 1
|
|
398
|
-
})]),
|
|
399
|
-
_: 1
|
|
400
|
-
}, 8, ["model", "size"]));
|
|
401
|
-
}
|
|
402
|
-
}), ne = /* @__PURE__ */ $(We, [["__scopeId", "data-v-73ed2006"]]), Ke = {
|
|
403
|
-
class: "handle"
|
|
404
|
-
}, Ze = /* @__PURE__ */ V({
|
|
405
|
-
__name: "AuthkitPasswordUpdate",
|
|
406
|
-
props: {
|
|
407
|
-
size: {
|
|
408
|
-
type: String,
|
|
409
|
-
required: !0
|
|
410
|
-
}
|
|
411
|
-
},
|
|
412
|
-
emits: ["submit"],
|
|
413
|
-
setup(o, {
|
|
414
|
-
emit: r
|
|
415
|
-
}) {
|
|
416
|
-
const u = r, l = h(!1), n = h(), d = o, t = h({
|
|
417
|
-
oldPassword: "",
|
|
418
|
-
password: "",
|
|
419
|
-
confirmPassword: ""
|
|
420
|
-
});
|
|
421
|
-
async function s() {
|
|
422
|
-
if (!await n.value.validate()) {
|
|
423
|
-
l.value = !0;
|
|
424
|
-
const m = {
|
|
425
|
-
password: t.value.password
|
|
426
|
-
}, {
|
|
427
|
-
error: v
|
|
428
|
-
} = await R.users.update.password.post(m);
|
|
429
|
-
l.value = !1, v || u("submit", m);
|
|
430
|
-
}
|
|
431
|
-
}
|
|
432
|
-
return (y, m) => (g(), k(e(H), {
|
|
433
|
-
ref_key: "formRef",
|
|
434
|
-
ref: n,
|
|
435
|
-
model: t.value,
|
|
436
|
-
"auto-label-width": "",
|
|
437
|
-
size: d.size
|
|
438
|
-
}, {
|
|
439
|
-
default: a(() => [i(e(I), {
|
|
440
|
-
field: "oldPassword",
|
|
441
|
-
label: "当前密码",
|
|
442
|
-
"hide-label": "",
|
|
443
|
-
rules: [{
|
|
444
|
-
required: !0,
|
|
445
|
-
message: "请输入当前密码"
|
|
446
|
-
}]
|
|
447
|
-
}, {
|
|
448
|
-
default: a(() => [i(e(x), {
|
|
449
|
-
modelValue: t.value.oldPassword,
|
|
450
|
-
"onUpdate:modelValue": m[0] || (m[0] = (v) => t.value.oldPassword = v),
|
|
451
|
-
placeholder: "请输入当前密码",
|
|
452
|
-
type: "password"
|
|
453
|
-
}, null, 8, ["modelValue"])]),
|
|
454
|
-
_: 1
|
|
455
|
-
}), i(e(I), {
|
|
456
|
-
field: "password",
|
|
457
|
-
label: "新密码",
|
|
458
|
-
"hide-label": "",
|
|
459
|
-
rules: [{
|
|
460
|
-
required: !0,
|
|
461
|
-
message: "新密码请输入"
|
|
462
|
-
}, {
|
|
463
|
-
minLength: 10,
|
|
464
|
-
message: "新密码不能少于10字符"
|
|
465
|
-
}]
|
|
466
|
-
}, {
|
|
467
|
-
default: a(() => [i(e(x), {
|
|
468
|
-
modelValue: t.value.password,
|
|
469
|
-
"onUpdate:modelValue": m[1] || (m[1] = (v) => t.value.password = v),
|
|
470
|
-
placeholder: "请输入新密码",
|
|
471
|
-
type: "password"
|
|
472
|
-
}, null, 8, ["modelValue"])]),
|
|
473
|
-
_: 1
|
|
474
|
-
}), i(e(I), {
|
|
475
|
-
field: "confirmPassword",
|
|
476
|
-
label: "确认密码",
|
|
477
|
-
"hide-label": "",
|
|
478
|
-
rules: [{
|
|
479
|
-
required: !0,
|
|
480
|
-
message: "请输入确认密码"
|
|
481
|
-
}, {
|
|
482
|
-
minLength: 10,
|
|
483
|
-
message: "确认密码不能少于10字符"
|
|
484
|
-
}, {
|
|
485
|
-
validator: (v, c) => {
|
|
486
|
-
v !== t.value.password ? c("两次密码输入不一致,请重新输入") : c();
|
|
487
|
-
}
|
|
488
|
-
}]
|
|
489
|
-
}, {
|
|
490
|
-
default: a(() => [i(e(x), {
|
|
491
|
-
modelValue: t.value.confirmPassword,
|
|
492
|
-
"onUpdate:modelValue": m[2] || (m[2] = (v) => t.value.confirmPassword = v),
|
|
493
|
-
placeholder: "请输入确认密码密码",
|
|
494
|
-
type: "password"
|
|
495
|
-
}, null, 8, ["modelValue"])]),
|
|
496
|
-
_: 1
|
|
497
|
-
}, 8, ["rules"]), i(e(I), {
|
|
498
|
-
field: "",
|
|
499
|
-
label: "",
|
|
500
|
-
rules: []
|
|
501
|
-
}, {
|
|
502
|
-
default: a(() => [z("div", Ke, [i(e(A), {
|
|
503
|
-
type: "primary",
|
|
504
|
-
loading: l.value,
|
|
505
|
-
onClick: s
|
|
506
|
-
}, {
|
|
507
|
-
default: a(() => [...m[3] || (m[3] = [_(" 提交 ", -1)])]),
|
|
508
|
-
_: 1
|
|
509
|
-
}, 8, ["loading"])])]),
|
|
510
|
-
_: 1
|
|
511
|
-
})]),
|
|
512
|
-
_: 1
|
|
513
|
-
}, 8, ["model", "size"]));
|
|
514
|
-
}
|
|
515
|
-
}), Je = /* @__PURE__ */ $(Ze, [["__scopeId", "data-v-f8bd086f"]]), Qe = /* @__PURE__ */ V({
|
|
516
|
-
__name: "AuthkitSetPassword",
|
|
517
|
-
props: {
|
|
518
|
-
size: {
|
|
519
|
-
type: String,
|
|
520
|
-
required: !0
|
|
521
|
-
}
|
|
522
|
-
},
|
|
523
|
-
setup(o) {
|
|
524
|
-
const {
|
|
525
|
-
userProfile: r,
|
|
526
|
-
loading: u,
|
|
527
|
-
fetchUserProfile: l,
|
|
528
|
-
isLoggedIn: n
|
|
529
|
-
} = Z(), d = h("hidden"), t = o;
|
|
530
|
-
function s(v) {
|
|
531
|
-
d.value = v;
|
|
532
|
-
}
|
|
533
|
-
function y(v) {
|
|
534
|
-
F.success("密码修改成功"), d.value = "hidden", l();
|
|
535
|
-
}
|
|
536
|
-
function m() {
|
|
537
|
-
d.value = "update";
|
|
538
|
-
}
|
|
539
|
-
return K(() => {
|
|
540
|
-
n.value && !r.value && l();
|
|
541
|
-
}), (v, c) => {
|
|
542
|
-
var p, f, w, C;
|
|
543
|
-
return g(), U(M, null, [!((p = e(r)) != null && p.email) && !((f = e(r)) != null && f.phone) ? (g(), k(e(D), {
|
|
544
|
-
key: 0,
|
|
545
|
-
title: "去绑定邮箱"
|
|
546
|
-
}, {
|
|
547
|
-
action: a(() => [i(e(A), {
|
|
548
|
-
size: t.size,
|
|
549
|
-
type: "primary",
|
|
550
|
-
onClick: c[0] || (c[0] = (P) => s("update"))
|
|
551
|
-
}, {
|
|
552
|
-
default: a(() => [...c[2] || (c[2] = [_(" 去绑定邮箱 ", -1)])]),
|
|
553
|
-
_: 1
|
|
554
|
-
}, 8, ["size"])]),
|
|
555
|
-
default: a(() => [c[3] || (c[3] = _(" 请先去绑定邮箱或者手机号码,才能设置密码 ", -1))]),
|
|
556
|
-
_: 1
|
|
557
|
-
})) : S("", !0), (w = e(r)) != null && w.email && d.value === "hidden" ? (g(), k(e(D), {
|
|
558
|
-
key: 1,
|
|
559
|
-
title: "更改密码"
|
|
560
|
-
}, {
|
|
561
|
-
action: a(() => [i(e(A), {
|
|
562
|
-
size: t.size,
|
|
563
|
-
type: "primary",
|
|
564
|
-
onClick: c[1] || (c[1] = (P) => s("verify"))
|
|
565
|
-
}, {
|
|
566
|
-
default: a(() => [...c[4] || (c[4] = [_("更改密码", -1)])]),
|
|
567
|
-
_: 1
|
|
568
|
-
}, 8, ["size"])]),
|
|
569
|
-
default: a(() => [c[5] || (c[5] = _(" 为了账户安全修改密码前会先验证身份 ", -1))]),
|
|
570
|
-
_: 1
|
|
571
|
-
})) : S("", !0), d.value === "update" ? (g(), k(Je, {
|
|
572
|
-
key: 2,
|
|
573
|
-
size: t.size,
|
|
574
|
-
loading: e(u),
|
|
575
|
-
onSubmit: y
|
|
576
|
-
}, null, 8, ["size", "loading"])) : S("", !0), d.value === "verify" ? (g(), k(ne, {
|
|
577
|
-
key: 3,
|
|
578
|
-
size: t.size,
|
|
579
|
-
email: (C = e(r)) == null ? void 0 : C.email,
|
|
580
|
-
onNext: m
|
|
581
|
-
}, null, 8, ["size", "email"])) : S("", !0)], 64);
|
|
582
|
-
};
|
|
583
|
-
}
|
|
584
|
-
}), Xe = {
|
|
585
|
-
class: "content"
|
|
586
|
-
}, Ye = {
|
|
587
|
-
class: "sendVerifyCodeItem"
|
|
588
|
-
}, et = {
|
|
589
|
-
class: "handle"
|
|
590
|
-
}, tt = /* @__PURE__ */ V({
|
|
591
|
-
__name: "AuthkitEmailUpdate",
|
|
592
|
-
props: {
|
|
593
|
-
size: {
|
|
594
|
-
type: String,
|
|
595
|
-
required: !0
|
|
596
|
-
},
|
|
597
|
-
loading: {
|
|
598
|
-
type: Boolean,
|
|
599
|
-
required: !0,
|
|
600
|
-
default: () => !0
|
|
601
|
-
}
|
|
602
|
-
},
|
|
603
|
-
emits: ["submit"],
|
|
604
|
-
setup(o, {
|
|
605
|
-
emit: r
|
|
606
|
-
}) {
|
|
607
|
-
const u = r, l = o, n = h(), d = h(!1), t = h(), s = h({
|
|
608
|
-
email: void 0,
|
|
609
|
-
userToken: void 0,
|
|
610
|
-
emailVerifyId: void 0,
|
|
611
|
-
password: void 0,
|
|
612
|
-
confirmPassword: void 0,
|
|
613
|
-
referrerId: void 0
|
|
614
|
-
});
|
|
615
|
-
async function y() {
|
|
616
|
-
if (!await t.value.validateField(["email"])) {
|
|
617
|
-
d.value = !0;
|
|
618
|
-
const {
|
|
619
|
-
data: c
|
|
620
|
-
} = await R.verify.email.retry.post({
|
|
621
|
-
email: s.value.email
|
|
622
|
-
});
|
|
623
|
-
d.value = !1, c && (s.value.emailVerifyId = c.emailVerifyId, n.value.startCountFn());
|
|
624
|
-
}
|
|
625
|
-
}
|
|
626
|
-
async function m() {
|
|
627
|
-
t.value.validate().then((v) => {
|
|
628
|
-
v || u("submit", s.value);
|
|
629
|
-
});
|
|
630
|
-
}
|
|
631
|
-
return (v, c) => (g(), U("div", Xe, [i(e(H), {
|
|
632
|
-
ref_key: "formRef",
|
|
633
|
-
ref: t,
|
|
634
|
-
model: s.value,
|
|
635
|
-
size: l.size,
|
|
636
|
-
"auto-label-width": ""
|
|
637
|
-
}, {
|
|
638
|
-
default: a(() => [i(e(I), {
|
|
639
|
-
field: "email",
|
|
640
|
-
label: "邮箱",
|
|
641
|
-
"hide-label": "",
|
|
642
|
-
rules: [{
|
|
643
|
-
required: !0,
|
|
644
|
-
message: "请输入邮箱"
|
|
645
|
-
}, {
|
|
646
|
-
type: "email",
|
|
647
|
-
message: "请输入有效的邮箱"
|
|
648
|
-
}]
|
|
649
|
-
}, {
|
|
650
|
-
default: a(() => [i(e(x), {
|
|
651
|
-
modelValue: s.value.email,
|
|
652
|
-
"onUpdate:modelValue": c[0] || (c[0] = (p) => s.value.email = p),
|
|
653
|
-
placeholder: "请输入邮箱",
|
|
654
|
-
autocomplete: "email username",
|
|
655
|
-
type: "email"
|
|
656
|
-
}, null, 8, ["modelValue"])]),
|
|
657
|
-
_: 1
|
|
658
|
-
}), i(e(I), {
|
|
659
|
-
field: "userToken",
|
|
660
|
-
label: "验证码",
|
|
661
|
-
"hide-label": "",
|
|
662
|
-
rules: [{
|
|
663
|
-
required: !0,
|
|
664
|
-
message: "请输入验证码"
|
|
665
|
-
}]
|
|
666
|
-
}, {
|
|
667
|
-
default: a(() => [z("div", Ye, [i(e(x), {
|
|
668
|
-
modelValue: s.value.userToken,
|
|
669
|
-
"onUpdate:modelValue": c[1] || (c[1] = (p) => s.value.userToken = p),
|
|
670
|
-
placeholder: "请输入验证码",
|
|
671
|
-
autocomplete: "one-time-code"
|
|
672
|
-
}, null, 8, ["modelValue"]), i(le, {
|
|
673
|
-
ref_key: "SendVerifyCodeRef",
|
|
674
|
-
ref: n,
|
|
675
|
-
size: l.size,
|
|
676
|
-
loading: d.value,
|
|
677
|
-
style: {
|
|
678
|
-
"margin-left": "10px"
|
|
679
|
-
},
|
|
680
|
-
onSend: y
|
|
681
|
-
}, null, 8, ["size", "loading"])])]),
|
|
682
|
-
_: 1
|
|
683
|
-
}), i(e(I), {
|
|
684
|
-
field: "password",
|
|
685
|
-
label: "密码",
|
|
686
|
-
"hide-label": "",
|
|
687
|
-
rules: [{
|
|
688
|
-
required: !0,
|
|
689
|
-
message: "密码请输入"
|
|
690
|
-
}, {
|
|
691
|
-
minLength: 10,
|
|
692
|
-
message: "密码不能少于10字符"
|
|
693
|
-
}]
|
|
694
|
-
}, {
|
|
695
|
-
default: a(() => [i(e(x), {
|
|
696
|
-
modelValue: s.value.password,
|
|
697
|
-
"onUpdate:modelValue": c[2] || (c[2] = (p) => s.value.password = p),
|
|
698
|
-
placeholder: "请输入密码",
|
|
699
|
-
type: "password",
|
|
700
|
-
autocomplete: "new-password"
|
|
701
|
-
}, null, 8, ["modelValue"])]),
|
|
702
|
-
_: 1
|
|
703
|
-
}), i(e(I), {
|
|
704
|
-
field: "confirmPassword",
|
|
705
|
-
label: "确认密码",
|
|
706
|
-
"hide-label": "",
|
|
707
|
-
rules: [{
|
|
708
|
-
required: !0,
|
|
709
|
-
message: "请输入确认密码"
|
|
710
|
-
}, {
|
|
711
|
-
minLength: 10,
|
|
712
|
-
message: "确认密码不能少于10字符"
|
|
713
|
-
}, {
|
|
714
|
-
validator: (p, f) => {
|
|
715
|
-
p !== s.value.password ? f("两次密码输入不一致,请重新输入") : f();
|
|
716
|
-
}
|
|
717
|
-
}]
|
|
718
|
-
}, {
|
|
719
|
-
default: a(() => [i(e(x), {
|
|
720
|
-
modelValue: s.value.confirmPassword,
|
|
721
|
-
"onUpdate:modelValue": c[3] || (c[3] = (p) => s.value.confirmPassword = p),
|
|
722
|
-
placeholder: "请输入确认密码密码",
|
|
723
|
-
type: "password",
|
|
724
|
-
autocomplete: "new-password"
|
|
725
|
-
}, null, 8, ["modelValue"])]),
|
|
726
|
-
_: 1
|
|
727
|
-
}, 8, ["rules"]), i(e(I), {
|
|
728
|
-
field: "referrerId",
|
|
729
|
-
label: "邀请人",
|
|
730
|
-
"hide-label": "",
|
|
731
|
-
rules: [{
|
|
732
|
-
required: !1,
|
|
733
|
-
message: "请输入邀请人ID"
|
|
734
|
-
}]
|
|
735
|
-
}, {
|
|
736
|
-
default: a(() => [i(e(x), {
|
|
737
|
-
modelValue: s.value.referrerId,
|
|
738
|
-
"onUpdate:modelValue": c[4] || (c[4] = (p) => s.value.referrerId = p),
|
|
739
|
-
placeholder: "邀请人ID(可选)",
|
|
740
|
-
autocomplete: "off"
|
|
741
|
-
}, null, 8, ["modelValue"])]),
|
|
742
|
-
_: 1
|
|
743
|
-
}), z("div", et, [i(e(A), {
|
|
744
|
-
type: "primary",
|
|
745
|
-
loading: l.loading,
|
|
746
|
-
long: "",
|
|
747
|
-
size: l.size,
|
|
748
|
-
onClick: m
|
|
749
|
-
}, {
|
|
750
|
-
default: a(() => [...c[5] || (c[5] = [_(" 提交 ", -1)])]),
|
|
751
|
-
_: 1
|
|
752
|
-
}, 8, ["loading", "size"])])]),
|
|
753
|
-
_: 1
|
|
754
|
-
}, 8, ["model", "size"])]));
|
|
755
|
-
}
|
|
756
|
-
}), pe = /* @__PURE__ */ $(tt, [["__scopeId", "data-v-51a26095"]]), it = /* @__PURE__ */ V({
|
|
757
|
-
__name: "AuthkitEmailBinding",
|
|
758
|
-
props: {
|
|
759
|
-
size: {
|
|
760
|
-
type: String,
|
|
761
|
-
required: !0
|
|
762
|
-
}
|
|
763
|
-
},
|
|
764
|
-
setup(o) {
|
|
765
|
-
const {
|
|
766
|
-
userProfile: r,
|
|
767
|
-
loading: u,
|
|
768
|
-
fetchUserProfile: l
|
|
769
|
-
} = Z(), n = h("hidden"), d = o;
|
|
770
|
-
function t(m) {
|
|
771
|
-
n.value = m;
|
|
772
|
-
}
|
|
773
|
-
async function s(m) {
|
|
774
|
-
u.value = !0;
|
|
775
|
-
const v = {
|
|
776
|
-
email: m.email,
|
|
777
|
-
userToken: m.userToken,
|
|
778
|
-
emailVerifyId: m.emailVerifyId,
|
|
779
|
-
password: m.password || ""
|
|
780
|
-
// API 要求 password,但绑定邮箱时可能不需要,传空字符串
|
|
781
|
-
}, {
|
|
782
|
-
error: c
|
|
783
|
-
} = await R.users.update.email.post(v);
|
|
784
|
-
u.value = !1, c || (F.success("绑定成功"), n.value = "hidden", l());
|
|
785
|
-
}
|
|
786
|
-
function y() {
|
|
787
|
-
n.value = "update";
|
|
788
|
-
}
|
|
789
|
-
return K(() => {
|
|
790
|
-
r.value || l();
|
|
791
|
-
}), (m, v) => {
|
|
792
|
-
var c, p, f;
|
|
793
|
-
return g(), U(M, null, [!((c = e(r)) != null && c.email) && n.value === "hidden" ? (g(), k(e(D), {
|
|
794
|
-
key: 0,
|
|
795
|
-
title: "绑定邮箱"
|
|
796
|
-
}, {
|
|
797
|
-
action: a(() => [i(e(A), {
|
|
798
|
-
size: d.size,
|
|
799
|
-
type: "primary",
|
|
800
|
-
onClick: v[0] || (v[0] = (w) => t("update"))
|
|
801
|
-
}, {
|
|
802
|
-
default: a(() => [...v[2] || (v[2] = [_(" 绑定邮箱 ", -1)])]),
|
|
803
|
-
_: 1
|
|
804
|
-
}, 8, ["size"])]),
|
|
805
|
-
default: a(() => [v[3] || (v[3] = _(" 您还未绑定邮箱,请点击绑定邮箱 ", -1))]),
|
|
806
|
-
_: 1
|
|
807
|
-
})) : S("", !0), (p = e(r)) != null && p.email && n.value === "hidden" ? (g(), k(e(D), {
|
|
808
|
-
key: 1,
|
|
809
|
-
title: "更改邮箱"
|
|
810
|
-
}, {
|
|
811
|
-
action: a(() => [i(e(A), {
|
|
812
|
-
size: d.size,
|
|
813
|
-
type: "primary",
|
|
814
|
-
onClick: v[1] || (v[1] = (w) => t("verify"))
|
|
815
|
-
}, {
|
|
816
|
-
default: a(() => [...v[4] || (v[4] = [_(" 更改邮箱 ", -1)])]),
|
|
817
|
-
_: 1
|
|
818
|
-
}, 8, ["size"])]),
|
|
819
|
-
default: a(() => {
|
|
820
|
-
var w;
|
|
821
|
-
return [_(B(`您绑定的邮箱为${e(fe)((w = e(r)) == null ? void 0 : w.email)}`) + " ", 1)];
|
|
822
|
-
}),
|
|
823
|
-
_: 1
|
|
824
|
-
})) : S("", !0), n.value === "update" ? (g(), k(pe, {
|
|
825
|
-
key: 2,
|
|
826
|
-
loading: e(u),
|
|
827
|
-
size: d.size,
|
|
828
|
-
onSubmit: s
|
|
829
|
-
}, null, 8, ["loading", "size"])) : S("", !0), n.value === "verify" ? (g(), k(ne, {
|
|
830
|
-
key: 3,
|
|
831
|
-
size: d.size,
|
|
832
|
-
email: (f = e(r)) == null ? void 0 : f.email,
|
|
833
|
-
onNext: y
|
|
834
|
-
}, null, 8, ["size", "email"])) : S("", !0)], 64);
|
|
835
|
-
};
|
|
836
|
-
}
|
|
837
|
-
}), st = /* @__PURE__ */ $(it, [["__scopeId", "data-v-4cf783a6"]]), at = /* @__PURE__ */ V({
|
|
838
|
-
__name: "AuthkitGithubBinding",
|
|
839
|
-
props: {
|
|
840
|
-
size: {
|
|
841
|
-
type: String,
|
|
842
|
-
required: !0
|
|
843
|
-
}
|
|
844
|
-
},
|
|
845
|
-
setup(o) {
|
|
846
|
-
const {
|
|
847
|
-
userProfile: r,
|
|
848
|
-
fetchUserProfile: u
|
|
849
|
-
} = Z(), l = h("hidden"), n = h(!1);
|
|
850
|
-
let d;
|
|
851
|
-
const t = o;
|
|
852
|
-
function s(p) {
|
|
853
|
-
l.value = p;
|
|
854
|
-
}
|
|
855
|
-
async function y() {
|
|
856
|
-
const p = j.appId;
|
|
857
|
-
if (!p) {
|
|
858
|
-
console.error("GitHub OAuth 失败: appId 未配置");
|
|
859
|
-
return;
|
|
860
|
-
}
|
|
861
|
-
const {
|
|
862
|
-
data: f
|
|
863
|
-
} = await R.oauth.github.login.get({
|
|
864
|
-
appId: p
|
|
865
|
-
});
|
|
866
|
-
if (f) {
|
|
867
|
-
const {
|
|
868
|
-
redirectUri: w
|
|
869
|
-
} = f;
|
|
870
|
-
n.value = !0, window.open(w, "_blank");
|
|
871
|
-
}
|
|
872
|
-
}
|
|
873
|
-
async function m() {
|
|
874
|
-
const {
|
|
875
|
-
error: p
|
|
876
|
-
} = await R.users.unbind.email.post({});
|
|
877
|
-
p || (F.success("解绑成功"), l.value = "hidden", u());
|
|
878
|
-
}
|
|
879
|
-
function v() {
|
|
880
|
-
l.value === "bind" && (l.value = "hidden", y()), l.value === "unbind" && m();
|
|
881
|
-
}
|
|
882
|
-
function c() {
|
|
883
|
-
n.value && u();
|
|
884
|
-
}
|
|
885
|
-
return K(() => {
|
|
886
|
-
r.value || u(), d = setInterval(c, 1e3);
|
|
887
|
-
}), re(() => {
|
|
888
|
-
d && clearInterval(d);
|
|
889
|
-
}), (p, f) => {
|
|
890
|
-
var w, C, P;
|
|
891
|
-
return g(), U(M, null, [!((w = e(r)) != null && w.github) && l.value === "hidden" ? (g(), k(e(D), {
|
|
892
|
-
key: 0,
|
|
893
|
-
title: "绑定GitHUb"
|
|
894
|
-
}, {
|
|
895
|
-
action: a(() => [i(e(A), {
|
|
896
|
-
size: t.size,
|
|
897
|
-
type: "primary",
|
|
898
|
-
onClick: f[0] || (f[0] = (L) => s("bind"))
|
|
899
|
-
}, {
|
|
900
|
-
default: a(() => [...f[2] || (f[2] = [_(" 绑定GitHUb ", -1)])]),
|
|
901
|
-
_: 1
|
|
902
|
-
}, 8, ["size"])]),
|
|
903
|
-
default: a(() => [f[3] || (f[3] = _(" 请尚未绑定GitHub,请点击绑定GitHUb ", -1))]),
|
|
904
|
-
_: 1
|
|
905
|
-
})) : S("", !0), (C = e(r)) != null && C.github && l.value === "hidden" ? (g(), k(e(D), {
|
|
906
|
-
key: 1,
|
|
907
|
-
title: "解绑GitHub"
|
|
908
|
-
}, {
|
|
909
|
-
action: a(() => [i(e(A), {
|
|
910
|
-
size: t.size,
|
|
911
|
-
type: "primary",
|
|
912
|
-
onClick: f[1] || (f[1] = (L) => s("unbind"))
|
|
913
|
-
}, {
|
|
914
|
-
default: a(() => [...f[4] || (f[4] = [_(" 解绑GitHUb ", -1)])]),
|
|
915
|
-
_: 1
|
|
916
|
-
}, 8, ["size"])]),
|
|
917
|
-
default: a(() => {
|
|
918
|
-
var L, q, E;
|
|
919
|
-
return [z("span", null, B(`您绑定的账号为 ${(q = (L = e(r)) == null ? void 0 : L.github) == null ? void 0 : q.login}`), 1), i(e(me), {
|
|
920
|
-
"image-url": (E = e(r)) == null ? void 0 : E.avatar,
|
|
921
|
-
size: 42
|
|
922
|
-
}, null, 8, ["image-url"])];
|
|
923
|
-
}),
|
|
924
|
-
_: 1
|
|
925
|
-
})) : S("", !0), l.value === "bind" || l.value === "unbind" ? (g(), k(ne, {
|
|
926
|
-
key: 2,
|
|
927
|
-
size: t.size,
|
|
928
|
-
email: (P = e(r)) == null ? void 0 : P.email,
|
|
929
|
-
onNext: v
|
|
930
|
-
}, null, 8, ["size", "email"])) : S("", !0)], 64);
|
|
931
|
-
};
|
|
932
|
-
}
|
|
933
|
-
}), lt = {
|
|
934
|
-
class: "dependency-list"
|
|
935
|
-
}, nt = {
|
|
936
|
-
class: "label"
|
|
937
|
-
}, ot = {
|
|
938
|
-
class: "count"
|
|
939
|
-
}, rt = {
|
|
940
|
-
class: "action-bar"
|
|
941
|
-
}, ut = /* @__PURE__ */ V({
|
|
942
|
-
__name: "AuthkitAccountDelete",
|
|
943
|
-
props: {
|
|
944
|
-
size: {
|
|
945
|
-
type: String,
|
|
946
|
-
required: !0
|
|
947
|
-
}
|
|
948
|
-
},
|
|
949
|
-
emits: ["deleted"],
|
|
950
|
-
setup(o, {
|
|
951
|
-
emit: r
|
|
952
|
-
}) {
|
|
953
|
-
const u = o, l = r, {
|
|
954
|
-
userProfile: n,
|
|
955
|
-
clearUserProfile: d
|
|
956
|
-
} = Z(), {
|
|
957
|
-
clearAuth: t
|
|
958
|
-
} = J(), s = h("check"), y = h(!1), m = h([]), v = h(!1), c = h(""), p = h(0);
|
|
959
|
-
let f = null;
|
|
960
|
-
const w = N(() => {
|
|
961
|
-
var oe;
|
|
962
|
-
const O = ((oe = n.value) == null ? void 0 : oe.email) || "";
|
|
963
|
-
if (!O) return "";
|
|
964
|
-
const [b, T] = O.split("@");
|
|
965
|
-
return b.length <= 2 ? O : `${b.slice(0, 2)}***@${T}`;
|
|
966
|
-
}), C = h(), P = h({
|
|
967
|
-
userToken: "",
|
|
968
|
-
password: "",
|
|
969
|
-
confirmText: ""
|
|
970
|
-
}), L = h(!1);
|
|
971
|
-
function q(O, b) {
|
|
972
|
-
O !== "注销" ? b('请输入"注销"以确认操作') : b();
|
|
973
|
-
}
|
|
974
|
-
async function E() {
|
|
975
|
-
var O;
|
|
976
|
-
if (y.value = !0, y.value = !1, !((O = n.value) != null && O.email)) {
|
|
977
|
-
F.error("账号未绑定邮箱,无法进行注销验证。请先绑定邮箱");
|
|
978
|
-
return;
|
|
979
|
-
}
|
|
980
|
-
s.value = "sendCode";
|
|
981
|
-
}
|
|
982
|
-
async function W() {
|
|
983
|
-
var b;
|
|
984
|
-
if (!((b = n.value) != null && b.email)) {
|
|
985
|
-
F.error("请先绑定邮箱");
|
|
986
|
-
return;
|
|
987
|
-
}
|
|
988
|
-
v.value = !0;
|
|
989
|
-
const {
|
|
990
|
-
data: O
|
|
991
|
-
} = await R.verify.email.retry.post({
|
|
992
|
-
email: n.value.email
|
|
993
|
-
});
|
|
994
|
-
v.value = !1, O && (c.value = O.emailVerifyId, F.success("验证码已发送"), s.value = "confirm", X());
|
|
995
|
-
}
|
|
996
|
-
function X() {
|
|
997
|
-
p.value = 60, f && clearInterval(f), f = setInterval(() => {
|
|
998
|
-
p.value--, p.value <= 0 && f && (clearInterval(f), f = null);
|
|
999
|
-
}, 1e3);
|
|
1000
|
-
}
|
|
1001
|
-
async function Y() {
|
|
1002
|
-
var T;
|
|
1003
|
-
if (await ((T = C.value) == null ? void 0 : T.validate())) return;
|
|
1004
|
-
L.value = !0;
|
|
1005
|
-
const {
|
|
1006
|
-
error: b
|
|
1007
|
-
} = await R.users.deleteAccount.post({
|
|
1008
|
-
password: P.value.password,
|
|
1009
|
-
userToken: P.value.userToken,
|
|
1010
|
-
emailVerifyId: c.value,
|
|
1011
|
-
confirmText: P.value.confirmText
|
|
1012
|
-
});
|
|
1013
|
-
L.value = !1, b || (s.value = "success", d(), t(), l("deleted"));
|
|
1014
|
-
}
|
|
1015
|
-
function he() {
|
|
1016
|
-
window.location.href = "/";
|
|
1017
|
-
}
|
|
1018
|
-
return (O, b) => s.value === "check" ? (g(), k(e(D), {
|
|
1019
|
-
key: 0,
|
|
1020
|
-
type: "warning",
|
|
1021
|
-
title: "注销账号"
|
|
1022
|
-
}, {
|
|
1023
|
-
action: a(() => [i(e(A), {
|
|
1024
|
-
size: u.size,
|
|
1025
|
-
type: "primary",
|
|
1026
|
-
status: "danger",
|
|
1027
|
-
loading: y.value,
|
|
1028
|
-
onClick: E
|
|
1029
|
-
}, {
|
|
1030
|
-
default: a(() => [_(B(y.value ? "检查中..." : "开始注销"), 1)]),
|
|
1031
|
-
_: 1
|
|
1032
|
-
}, 8, ["size", "loading"])]),
|
|
1033
|
-
default: a(() => [b[6] || (b[6] = _(" 注销账号后,您的所有数据将被永久删除,无法恢复。请确认您已备份重要数据。 ", -1))]),
|
|
1034
|
-
_: 1
|
|
1035
|
-
})) : s.value === "dependencies" ? (g(), U(M, {
|
|
1036
|
-
key: 1
|
|
1037
|
-
}, [i(e(D), {
|
|
1038
|
-
type: "error",
|
|
1039
|
-
title: "无法注销账号"
|
|
1040
|
-
}, {
|
|
1041
|
-
default: a(() => [...b[7] || (b[7] = [_(" 您的账号下还有以下资源,请先处理后再注销: ", -1)])]),
|
|
1042
|
-
_: 1
|
|
1043
|
-
}), z("div", lt, [(g(!0), U(M, null, ze(m.value, (T) => (g(), U("div", {
|
|
1044
|
-
key: T.type,
|
|
1045
|
-
class: "dependency-item"
|
|
1046
|
-
}, [z("span", nt, B(T.label), 1), z("span", ot, B(T.count) + " 个", 1)]))), 128))]), z("div", rt, [i(e(A), {
|
|
1047
|
-
size: u.size,
|
|
1048
|
-
onClick: b[0] || (b[0] = (T) => s.value = "check")
|
|
1049
|
-
}, {
|
|
1050
|
-
default: a(() => [...b[8] || (b[8] = [_("返回", -1)])]),
|
|
1051
|
-
_: 1
|
|
1052
|
-
}, 8, ["size"])])], 64)) : s.value === "sendCode" ? (g(), k(e(D), {
|
|
1053
|
-
key: 2,
|
|
1054
|
-
type: "normal",
|
|
1055
|
-
title: "身份验证"
|
|
1056
|
-
}, {
|
|
1057
|
-
action: a(() => [i(e(ee), null, {
|
|
1058
|
-
default: a(() => [i(e(A), {
|
|
1059
|
-
size: u.size,
|
|
1060
|
-
onClick: b[1] || (b[1] = (T) => s.value = "check")
|
|
1061
|
-
}, {
|
|
1062
|
-
default: a(() => [...b[9] || (b[9] = [_("取消", -1)])]),
|
|
1063
|
-
_: 1
|
|
1064
|
-
}, 8, ["size"]), i(e(A), {
|
|
1065
|
-
size: u.size,
|
|
1066
|
-
type: "primary",
|
|
1067
|
-
loading: v.value,
|
|
1068
|
-
onClick: W
|
|
1069
|
-
}, {
|
|
1070
|
-
default: a(() => [_(B(v.value ? "发送中..." : "发送验证码"), 1)]),
|
|
1071
|
-
_: 1
|
|
1072
|
-
}, 8, ["size", "loading"])]),
|
|
1073
|
-
_: 1
|
|
1074
|
-
})]),
|
|
1075
|
-
default: a(() => [_(" 为确保账号安全,我们将向您的邮箱 " + B(w.value) + " 发送验证码 ", 1)]),
|
|
1076
|
-
_: 1
|
|
1077
|
-
})) : s.value === "confirm" ? (g(), U(M, {
|
|
1078
|
-
key: 3
|
|
1079
|
-
}, [i(e(D), {
|
|
1080
|
-
type: "warning",
|
|
1081
|
-
title: "确认注销"
|
|
1082
|
-
}, {
|
|
1083
|
-
default: a(() => [_(" 验证码已发送至 " + B(w.value) + ",此操作不可逆,请谨慎操作 ", 1)]),
|
|
1084
|
-
_: 1
|
|
1085
|
-
}), i(e(H), {
|
|
1086
|
-
ref_key: "formRef",
|
|
1087
|
-
ref: C,
|
|
1088
|
-
model: P.value,
|
|
1089
|
-
size: u.size,
|
|
1090
|
-
class: "confirm-form",
|
|
1091
|
-
layout: "vertical"
|
|
1092
|
-
}, {
|
|
1093
|
-
default: a(() => [i(e(I), {
|
|
1094
|
-
field: "userToken",
|
|
1095
|
-
label: "邮箱验证码",
|
|
1096
|
-
rules: [{
|
|
1097
|
-
required: !0,
|
|
1098
|
-
message: "请输入验证码"
|
|
1099
|
-
}]
|
|
1100
|
-
}, {
|
|
1101
|
-
default: a(() => [i(e(ee), null, {
|
|
1102
|
-
default: a(() => [i(e(x), {
|
|
1103
|
-
modelValue: P.value.userToken,
|
|
1104
|
-
"onUpdate:modelValue": b[2] || (b[2] = (T) => P.value.userToken = T),
|
|
1105
|
-
placeholder: "请输入6位验证码",
|
|
1106
|
-
"max-length": 6,
|
|
1107
|
-
"allow-clear": "",
|
|
1108
|
-
style: {
|
|
1109
|
-
width: "180px"
|
|
1110
|
-
}
|
|
1111
|
-
}, null, 8, ["modelValue"]), i(e(A), {
|
|
1112
|
-
disabled: p.value > 0,
|
|
1113
|
-
loading: v.value,
|
|
1114
|
-
onClick: W
|
|
1115
|
-
}, {
|
|
1116
|
-
default: a(() => [_(B(p.value > 0 ? `${p.value}s 后重发` : "重新发送"), 1)]),
|
|
1117
|
-
_: 1
|
|
1118
|
-
}, 8, ["disabled", "loading"])]),
|
|
1119
|
-
_: 1
|
|
1120
|
-
})]),
|
|
1121
|
-
_: 1
|
|
1122
|
-
}), i(e(I), {
|
|
1123
|
-
field: "password",
|
|
1124
|
-
label: "登录密码",
|
|
1125
|
-
rules: [{
|
|
1126
|
-
required: !0,
|
|
1127
|
-
message: "请输入密码"
|
|
1128
|
-
}]
|
|
1129
|
-
}, {
|
|
1130
|
-
default: a(() => [i(e(Ve), {
|
|
1131
|
-
modelValue: P.value.password,
|
|
1132
|
-
"onUpdate:modelValue": b[3] || (b[3] = (T) => P.value.password = T),
|
|
1133
|
-
placeholder: "请输入您的登录密码",
|
|
1134
|
-
"allow-clear": ""
|
|
1135
|
-
}, null, 8, ["modelValue"])]),
|
|
1136
|
-
_: 1
|
|
1137
|
-
}), i(e(I), {
|
|
1138
|
-
field: "confirmText",
|
|
1139
|
-
label: "请输入「注销」以确认",
|
|
1140
|
-
rules: [{
|
|
1141
|
-
required: !0,
|
|
1142
|
-
message: "请输入确认文字"
|
|
1143
|
-
}, {
|
|
1144
|
-
validator: q
|
|
1145
|
-
}]
|
|
1146
|
-
}, {
|
|
1147
|
-
default: a(() => [i(e(x), {
|
|
1148
|
-
modelValue: P.value.confirmText,
|
|
1149
|
-
"onUpdate:modelValue": b[4] || (b[4] = (T) => P.value.confirmText = T),
|
|
1150
|
-
placeholder: "注销",
|
|
1151
|
-
"allow-clear": ""
|
|
1152
|
-
}, null, 8, ["modelValue"])]),
|
|
1153
|
-
_: 1
|
|
1154
|
-
}, 8, ["rules"]), i(e(I), null, {
|
|
1155
|
-
default: a(() => [i(e(ee), null, {
|
|
1156
|
-
default: a(() => [i(e(A), {
|
|
1157
|
-
onClick: b[5] || (b[5] = (T) => s.value = "check")
|
|
1158
|
-
}, {
|
|
1159
|
-
default: a(() => [...b[10] || (b[10] = [_("取消", -1)])]),
|
|
1160
|
-
_: 1
|
|
1161
|
-
}), i(e(A), {
|
|
1162
|
-
type: "primary",
|
|
1163
|
-
status: "danger",
|
|
1164
|
-
loading: L.value,
|
|
1165
|
-
onClick: Y
|
|
1166
|
-
}, {
|
|
1167
|
-
default: a(() => [_(B(L.value ? "注销中..." : "确认注销"), 1)]),
|
|
1168
|
-
_: 1
|
|
1169
|
-
}, 8, ["loading"])]),
|
|
1170
|
-
_: 1
|
|
1171
|
-
})]),
|
|
1172
|
-
_: 1
|
|
1173
|
-
})]),
|
|
1174
|
-
_: 1
|
|
1175
|
-
}, 8, ["model", "size"])], 64)) : s.value === "success" ? (g(), k(e(Ae), {
|
|
1176
|
-
key: 4,
|
|
1177
|
-
status: "success",
|
|
1178
|
-
title: "账号已注销"
|
|
1179
|
-
}, {
|
|
1180
|
-
subtitle: a(() => [...b[11] || (b[11] = [_(" 您的账号已成功注销,感谢您的使用 ", -1)])]),
|
|
1181
|
-
extra: a(() => [i(e(A), {
|
|
1182
|
-
type: "primary",
|
|
1183
|
-
onClick: he
|
|
1184
|
-
}, {
|
|
1185
|
-
default: a(() => [...b[12] || (b[12] = [_("返回首页", -1)])]),
|
|
1186
|
-
_: 1
|
|
1187
|
-
})]),
|
|
1188
|
-
_: 1
|
|
1189
|
-
})) : S("", !0);
|
|
1190
|
-
}
|
|
1191
|
-
}), dt = /* @__PURE__ */ $(ut, [["__scopeId", "data-v-f68a27be"]]), mt = {
|
|
1192
|
-
class: "content"
|
|
1193
|
-
}, ct = {
|
|
1194
|
-
class: "left"
|
|
1195
|
-
}, ft = {
|
|
1196
|
-
class: "right"
|
|
1197
|
-
}, pt = /* @__PURE__ */ V({
|
|
1198
|
-
__name: "AuthkitAppSetting",
|
|
1199
|
-
emits: ["confirm", "cancel"],
|
|
1200
|
-
setup(o, {
|
|
1201
|
-
expose: r,
|
|
1202
|
-
emit: u
|
|
1203
|
-
}) {
|
|
1204
|
-
const l = u;
|
|
1205
|
-
function n() {
|
|
1206
|
-
l("cancel");
|
|
1207
|
-
}
|
|
1208
|
-
function d() {
|
|
1209
|
-
c.value = !1, l("cancel");
|
|
1210
|
-
}
|
|
1211
|
-
const t = h("large"), s = h(["PersonalInformation"]), y = h([{
|
|
1212
|
-
name: "个人信息",
|
|
1213
|
-
path: "PersonalInformation",
|
|
1214
|
-
meta: {
|
|
1215
|
-
icon: "mingcute:user-edit-fill"
|
|
1216
|
-
},
|
|
1217
|
-
children: []
|
|
1218
|
-
}, {
|
|
1219
|
-
name: "账户管理",
|
|
1220
|
-
path: "AccountManage",
|
|
1221
|
-
meta: {
|
|
1222
|
-
icon: "mingcute:badge-fill"
|
|
1223
|
-
},
|
|
1224
|
-
children: [{
|
|
1225
|
-
name: "邮箱",
|
|
1226
|
-
path: "EmailBinding",
|
|
1227
|
-
meta: {
|
|
1228
|
-
icon: "ic:baseline-email"
|
|
1229
|
-
}
|
|
1230
|
-
}, {
|
|
1231
|
-
name: "密码",
|
|
1232
|
-
path: "SetPassword",
|
|
1233
|
-
meta: {
|
|
1234
|
-
icon: "mdi:password"
|
|
1235
|
-
}
|
|
1236
|
-
}, {
|
|
1237
|
-
name: "注销账号",
|
|
1238
|
-
path: "AccountDelete",
|
|
1239
|
-
meta: {
|
|
1240
|
-
icon: "mdi:account-remove"
|
|
1241
|
-
}
|
|
1242
|
-
}]
|
|
1243
|
-
}, {
|
|
1244
|
-
name: "第三方账户",
|
|
1245
|
-
path: "AccountBinding",
|
|
1246
|
-
meta: {
|
|
1247
|
-
icon: "mingcute:link-fill"
|
|
1248
|
-
},
|
|
1249
|
-
children: [
|
|
1250
|
-
{
|
|
1251
|
-
name: "GitHub",
|
|
1252
|
-
path: "GithubBinding",
|
|
1253
|
-
meta: {
|
|
1254
|
-
icon: "bi:github"
|
|
1255
|
-
}
|
|
1256
|
-
}
|
|
1257
|
-
// {
|
|
1258
|
-
// name: '微信',
|
|
1259
|
-
// icon: 'Menus/Space/Message/NoticeNotifications',
|
|
1260
|
-
// path: 'NoticeNotifications',
|
|
1261
|
-
// },
|
|
1262
|
-
]
|
|
1263
|
-
}]);
|
|
1264
|
-
function m(f) {
|
|
1265
|
-
const w = f.path;
|
|
1266
|
-
s.value = [w];
|
|
1267
|
-
}
|
|
1268
|
-
const {
|
|
1269
|
-
changeType: v,
|
|
1270
|
-
show: c
|
|
1271
|
-
} = Re(l);
|
|
1272
|
-
function p(f, w) {
|
|
1273
|
-
c.value = w, v.value = "编辑";
|
|
1274
|
-
}
|
|
1275
|
-
return r({
|
|
1276
|
-
setData: p
|
|
1277
|
-
}), (f, w) => (g(), k(e(ce), {
|
|
1278
|
-
visible: e(c),
|
|
1279
|
-
"onUpdate:visible": w[1] || (w[1] = (C) => ue(c) ? c.value = C : null),
|
|
1280
|
-
"unmount-on-close": "",
|
|
1281
|
-
"body-class": "AppSettingbodyClass",
|
|
1282
|
-
"mask-closable": !1,
|
|
1283
|
-
footer: !1,
|
|
1284
|
-
width: "700px",
|
|
1285
|
-
onCancel: n
|
|
1286
|
-
}, {
|
|
1287
|
-
title: a(() => [...w[2] || (w[2] = [_(" 系统设置 ", -1)])]),
|
|
1288
|
-
default: a(() => [z("div", mt, [z("div", ct, [i(Te, {
|
|
1289
|
-
"selected-keys": s.value,
|
|
1290
|
-
"onUpdate:selectedKeys": w[0] || (w[0] = (C) => s.value = C),
|
|
1291
|
-
menus: y.value,
|
|
1292
|
-
onChange: m
|
|
1293
|
-
}, null, 8, ["selected-keys", "menus"])]), z("div", ft, [s.value[0] === "PersonalInformation" ? (g(), k(He, {
|
|
1294
|
-
key: 0,
|
|
1295
|
-
size: t.value
|
|
1296
|
-
}, null, 8, ["size"])) : S("", !0), s.value[0] === "EmailBinding" ? (g(), k(st, {
|
|
1297
|
-
key: 1,
|
|
1298
|
-
size: t.value
|
|
1299
|
-
}, null, 8, ["size"])) : S("", !0), s.value[0] === "SetPassword" ? (g(), k(Qe, {
|
|
1300
|
-
key: 2,
|
|
1301
|
-
size: t.value
|
|
1302
|
-
}, null, 8, ["size"])) : S("", !0), s.value[0] === "GithubBinding" ? (g(), k(at, {
|
|
1303
|
-
key: 3,
|
|
1304
|
-
size: t.value
|
|
1305
|
-
}, null, 8, ["size"])) : S("", !0), s.value[0] === "AccountDelete" ? (g(), k(dt, {
|
|
1306
|
-
key: 4,
|
|
1307
|
-
size: t.value,
|
|
1308
|
-
onDeleted: d
|
|
1309
|
-
}, null, 8, ["size"])) : S("", !0)])])]),
|
|
1310
|
-
_: 1
|
|
1311
|
-
}, 8, ["visible"]));
|
|
1312
|
-
}
|
|
1313
|
-
}), wi = /* @__PURE__ */ $(pt, [["__scopeId", "data-v-1ff986a5"]]);
|
|
1314
|
-
function ve() {
|
|
1315
|
-
return j.oauthCallbackUrl ? j.oauthCallbackUrl : `${window.location.origin}/auth/callback`;
|
|
1316
|
-
}
|
|
1317
|
-
function vt() {
|
|
1318
|
-
const o = window.location.pathname + window.location.search;
|
|
1319
|
-
o.includes("/auth/callback") || sessionStorage.setItem("auth_redirect", o);
|
|
1320
|
-
}
|
|
1321
|
-
async function Q(o, r) {
|
|
1322
|
-
const u = j.appId;
|
|
1323
|
-
if (!u) {
|
|
1324
|
-
console.error(`${o} OAuth 失败: appId 未配置`);
|
|
1325
|
-
return;
|
|
1326
|
-
}
|
|
1327
|
-
const l = ve(), n = {
|
|
1328
|
-
appId: u,
|
|
1329
|
-
referrerId: r == null ? void 0 : r.referrerId,
|
|
1330
|
-
redirectUri: l
|
|
1331
|
-
};
|
|
1332
|
-
vt();
|
|
1333
|
-
const d = {
|
|
1334
|
-
github: () => R.oauth.github.login.get(n),
|
|
1335
|
-
google: () => R.oauth.google.login.get(n),
|
|
1336
|
-
microsoft: () => R.oauth.microsoft.login.get(n)
|
|
1337
|
-
};
|
|
1338
|
-
try {
|
|
1339
|
-
const {
|
|
1340
|
-
data: t
|
|
1341
|
-
} = await d[o]();
|
|
1342
|
-
t != null && t.redirectUri ? window.location.href = t.redirectUri : console.error(`${o} OAuth 重定向URL为空`);
|
|
1343
|
-
} catch (t) {
|
|
1344
|
-
console.error(`${o} OAuth 授权失败:`, t);
|
|
1345
|
-
}
|
|
1346
|
-
}
|
|
1347
|
-
function gt(o) {
|
|
1348
|
-
Q("github", {
|
|
1349
|
-
referrerId: o
|
|
1350
|
-
});
|
|
1351
|
-
}
|
|
1352
|
-
function yt(o) {
|
|
1353
|
-
Q("google", {
|
|
1354
|
-
referrerId: o
|
|
1355
|
-
});
|
|
1356
|
-
}
|
|
1357
|
-
function wt(o) {
|
|
1358
|
-
Q("microsoft", {
|
|
1359
|
-
referrerId: o
|
|
1360
|
-
});
|
|
1361
|
-
}
|
|
1362
|
-
function ge() {
|
|
1363
|
-
return {
|
|
1364
|
-
githubAuth: gt,
|
|
1365
|
-
googleAuth: yt,
|
|
1366
|
-
microsoftAuth: wt,
|
|
1367
|
-
startOauth: Q,
|
|
1368
|
-
getOauthCallbackUrl: ve
|
|
1369
|
-
};
|
|
1370
|
-
}
|
|
1371
|
-
const hi = ge, ie = /* @__PURE__ */ V({
|
|
1372
|
-
__name: "AuthkitOauthItem",
|
|
1373
|
-
props: {
|
|
1374
|
-
size: {
|
|
1375
|
-
type: String,
|
|
1376
|
-
required: !0
|
|
1377
|
-
},
|
|
1378
|
-
icon: {
|
|
1379
|
-
type: String,
|
|
1380
|
-
required: !0,
|
|
1381
|
-
default: () => ""
|
|
1382
|
-
},
|
|
1383
|
-
label: {
|
|
1384
|
-
type: String,
|
|
1385
|
-
required: !0,
|
|
1386
|
-
default: () => ""
|
|
1387
|
-
}
|
|
1388
|
-
},
|
|
1389
|
-
emits: [],
|
|
1390
|
-
setup(o, {
|
|
1391
|
-
emit: r
|
|
1392
|
-
}) {
|
|
1393
|
-
const u = o;
|
|
1394
|
-
return (l, n) => (g(), k(e(A), {
|
|
1395
|
-
class: "OAuthItem",
|
|
1396
|
-
type: "primary",
|
|
1397
|
-
size: u.size
|
|
1398
|
-
}, {
|
|
1399
|
-
icon: a(() => [i(e(Le), {
|
|
1400
|
-
icon: u.icon
|
|
1401
|
-
}, null, 8, ["icon"])]),
|
|
1402
|
-
default: a(() => [z("span", null, B(u.label), 1)]),
|
|
1403
|
-
_: 1
|
|
1404
|
-
}, 8, ["size"]));
|
|
1405
|
-
}
|
|
1406
|
-
}), ht = {
|
|
1407
|
-
class: "OAuthList"
|
|
1408
|
-
}, _t = {
|
|
1409
|
-
class: "OAuthList"
|
|
1410
|
-
}, bt = /* @__PURE__ */ V({
|
|
1411
|
-
__name: "AuthkitOauthList",
|
|
1412
|
-
props: {
|
|
1413
|
-
size: {
|
|
1414
|
-
type: String,
|
|
1415
|
-
default: () => "large"
|
|
1416
|
-
},
|
|
1417
|
-
appId: {
|
|
1418
|
-
type: String,
|
|
1419
|
-
default: () => ""
|
|
1420
|
-
}
|
|
1421
|
-
},
|
|
1422
|
-
setup(o) {
|
|
1423
|
-
const {
|
|
1424
|
-
appsData: r
|
|
1425
|
-
} = ae(), u = o, {
|
|
1426
|
-
githubAuth: l,
|
|
1427
|
-
googleAuth: n,
|
|
1428
|
-
microsoftAuth: d
|
|
1429
|
-
} = ge(), t = N(() => !(!r.value.oauth.google.enabled && !r.value.oauth.microsoft.enabled && !r.value.oauth.github.enabled && !r.value.oauth.wechat.enabled));
|
|
1430
|
-
return (s, y) => (g(), U("div", ht, [t.value ? (g(), k(e(Pe), {
|
|
1431
|
-
key: 0,
|
|
1432
|
-
orientation: "center"
|
|
1433
|
-
}, {
|
|
1434
|
-
default: a(() => [...y[3] || (y[3] = [_("OAuth登陆", -1)])]),
|
|
1435
|
-
_: 1
|
|
1436
|
-
})) : S("", !0), z("div", _t, [e(r).oauth.github.enabled ? (g(), k(ie, {
|
|
1437
|
-
key: 0,
|
|
1438
|
-
icon: "mdi:github",
|
|
1439
|
-
label: "Github",
|
|
1440
|
-
size: u.size,
|
|
1441
|
-
onClick: y[0] || (y[0] = (m) => e(l)())
|
|
1442
|
-
}, null, 8, ["size"])) : S("", !0), e(r).oauth.google.enabled ? (g(), k(ie, {
|
|
1443
|
-
key: 1,
|
|
1444
|
-
icon: "mdi:google",
|
|
1445
|
-
label: "Google",
|
|
1446
|
-
size: u.size,
|
|
1447
|
-
onClick: y[1] || (y[1] = (m) => e(n)())
|
|
1448
|
-
}, null, 8, ["size"])) : S("", !0), e(r).oauth.microsoft.enabled ? (g(), k(ie, {
|
|
1449
|
-
key: 2,
|
|
1450
|
-
icon: "mdi:microsoft",
|
|
1451
|
-
label: "Microsoft",
|
|
1452
|
-
size: u.size,
|
|
1453
|
-
onClick: y[2] || (y[2] = (m) => e(d)())
|
|
1454
|
-
}, null, 8, ["size"])) : S("", !0)])]));
|
|
1455
|
-
}
|
|
1456
|
-
}), kt = /* @__PURE__ */ $(bt, [["__scopeId", "data-v-886fd902"]]), zt = {
|
|
1457
|
-
class: "content"
|
|
1458
|
-
}, St = {
|
|
1459
|
-
class: "sendVerifyCodeItem"
|
|
1460
|
-
}, It = {
|
|
1461
|
-
class: "handle"
|
|
1462
|
-
}, Vt = /* @__PURE__ */ V({
|
|
1463
|
-
__name: "AuthkitPasswordUpdateAndVerify",
|
|
1464
|
-
props: {
|
|
1465
|
-
size: {
|
|
1466
|
-
type: String,
|
|
1467
|
-
required: !0
|
|
1468
|
-
},
|
|
1469
|
-
loading: {
|
|
1470
|
-
type: Boolean,
|
|
1471
|
-
required: !0,
|
|
1472
|
-
default: () => !0
|
|
1473
|
-
}
|
|
1474
|
-
},
|
|
1475
|
-
emits: ["signIn", "submit"],
|
|
1476
|
-
setup(o, {
|
|
1477
|
-
emit: r
|
|
1478
|
-
}) {
|
|
1479
|
-
const u = r, l = o, n = h(), d = h(!1), t = h(), s = h({
|
|
1480
|
-
email: void 0,
|
|
1481
|
-
userToken: void 0,
|
|
1482
|
-
emailVerifyId: void 0,
|
|
1483
|
-
password: void 0,
|
|
1484
|
-
confirmPassword: void 0
|
|
1485
|
-
});
|
|
1486
|
-
async function y() {
|
|
1487
|
-
if (!await t.value.validateField(["email"])) {
|
|
1488
|
-
d.value = !0;
|
|
1489
|
-
const {
|
|
1490
|
-
data: c
|
|
1491
|
-
} = await R.verify.email.retry.post({
|
|
1492
|
-
email: s.value.email
|
|
1493
|
-
});
|
|
1494
|
-
d.value = !1, c && (s.value.emailVerifyId = c.emailVerifyId, n.value.startCountFn());
|
|
1495
|
-
}
|
|
1496
|
-
}
|
|
1497
|
-
async function m() {
|
|
1498
|
-
t.value.validate().then((v) => {
|
|
1499
|
-
v || u("submit", s.value);
|
|
1500
|
-
});
|
|
1501
|
-
}
|
|
1502
|
-
return (v, c) => (g(), U("div", zt, [i(e(H), {
|
|
1503
|
-
ref_key: "formRef",
|
|
1504
|
-
ref: t,
|
|
1505
|
-
model: s.value,
|
|
1506
|
-
size: l.size,
|
|
1507
|
-
"auto-label-width": ""
|
|
1508
|
-
}, {
|
|
1509
|
-
default: a(() => [i(e(I), {
|
|
1510
|
-
field: "email",
|
|
1511
|
-
label: "邮箱",
|
|
1512
|
-
"hide-label": "",
|
|
1513
|
-
rules: [{
|
|
1514
|
-
required: !0,
|
|
1515
|
-
message: "请输入邮箱"
|
|
1516
|
-
}, {
|
|
1517
|
-
type: "email",
|
|
1518
|
-
message: "请输入有效的邮箱"
|
|
1519
|
-
}]
|
|
1520
|
-
}, {
|
|
1521
|
-
default: a(() => [i(e(x), {
|
|
1522
|
-
modelValue: s.value.email,
|
|
1523
|
-
"onUpdate:modelValue": c[0] || (c[0] = (p) => s.value.email = p),
|
|
1524
|
-
placeholder: "请输入邮箱"
|
|
1525
|
-
}, null, 8, ["modelValue"])]),
|
|
1526
|
-
_: 1
|
|
1527
|
-
}), i(e(I), {
|
|
1528
|
-
field: "userToken",
|
|
1529
|
-
label: "验证码",
|
|
1530
|
-
"hide-label": "",
|
|
1531
|
-
rules: [{
|
|
1532
|
-
required: !0,
|
|
1533
|
-
message: "请输入验证码"
|
|
1534
|
-
}]
|
|
1535
|
-
}, {
|
|
1536
|
-
default: a(() => [z("div", St, [i(e(x), {
|
|
1537
|
-
modelValue: s.value.userToken,
|
|
1538
|
-
"onUpdate:modelValue": c[1] || (c[1] = (p) => s.value.userToken = p),
|
|
1539
|
-
placeholder: "请输入验证码"
|
|
1540
|
-
}, null, 8, ["modelValue"]), i(le, {
|
|
1541
|
-
ref_key: "SendVerifyCodeRef",
|
|
1542
|
-
ref: n,
|
|
1543
|
-
size: l.size,
|
|
1544
|
-
loading: d.value,
|
|
1545
|
-
style: {
|
|
1546
|
-
"margin-left": "10px"
|
|
1547
|
-
},
|
|
1548
|
-
onSend: y
|
|
1549
|
-
}, null, 8, ["size", "loading"])])]),
|
|
1550
|
-
_: 1
|
|
1551
|
-
}), i(e(I), {
|
|
1552
|
-
field: "password",
|
|
1553
|
-
label: "密码",
|
|
1554
|
-
"hide-label": "",
|
|
1555
|
-
rules: [{
|
|
1556
|
-
required: !0,
|
|
1557
|
-
message: "密码请输入"
|
|
1558
|
-
}, {
|
|
1559
|
-
minLength: 10,
|
|
1560
|
-
message: "密码不能少于10字符"
|
|
1561
|
-
}]
|
|
1562
|
-
}, {
|
|
1563
|
-
default: a(() => [i(e(x), {
|
|
1564
|
-
modelValue: s.value.password,
|
|
1565
|
-
"onUpdate:modelValue": c[2] || (c[2] = (p) => s.value.password = p),
|
|
1566
|
-
placeholder: "请输入密码",
|
|
1567
|
-
type: "password",
|
|
1568
|
-
autocomplete: ""
|
|
1569
|
-
}, null, 8, ["modelValue"])]),
|
|
1570
|
-
_: 1
|
|
1571
|
-
}), i(e(I), {
|
|
1572
|
-
field: "confirmPassword",
|
|
1573
|
-
label: "确认密码",
|
|
1574
|
-
"hide-label": "",
|
|
1575
|
-
rules: [{
|
|
1576
|
-
required: !0,
|
|
1577
|
-
message: "请输入确认密码"
|
|
1578
|
-
}, {
|
|
1579
|
-
minLength: 10,
|
|
1580
|
-
message: "确认密码不能少于10字符"
|
|
1581
|
-
}, {
|
|
1582
|
-
validator: (p, f) => {
|
|
1583
|
-
p !== s.value.password ? f("两次密码输入不一致,请重新输入") : f();
|
|
1584
|
-
}
|
|
1585
|
-
}]
|
|
1586
|
-
}, {
|
|
1587
|
-
default: a(() => [i(e(x), {
|
|
1588
|
-
modelValue: s.value.confirmPassword,
|
|
1589
|
-
"onUpdate:modelValue": c[3] || (c[3] = (p) => s.value.confirmPassword = p),
|
|
1590
|
-
placeholder: "请输入确认密码密码",
|
|
1591
|
-
type: "password",
|
|
1592
|
-
autocomplete: ""
|
|
1593
|
-
}, null, 8, ["modelValue"])]),
|
|
1594
|
-
_: 1
|
|
1595
|
-
}, 8, ["rules"]), z("div", It, [i(e(A), {
|
|
1596
|
-
type: "primary",
|
|
1597
|
-
loading: l.loading,
|
|
1598
|
-
long: "",
|
|
1599
|
-
size: l.size,
|
|
1600
|
-
onClick: m
|
|
1601
|
-
}, {
|
|
1602
|
-
default: a(() => [...c[4] || (c[4] = [_(" 提交 ", -1)])]),
|
|
1603
|
-
_: 1
|
|
1604
|
-
}, 8, ["loading", "size"])])]),
|
|
1605
|
-
_: 1
|
|
1606
|
-
}, 8, ["model", "size"])]));
|
|
1607
|
-
}
|
|
1608
|
-
}), At = /* @__PURE__ */ $(Vt, [["__scopeId", "data-v-50b04889"]]), Pt = {
|
|
1609
|
-
class: "SwitchSignIn"
|
|
1610
|
-
}, Ut = /* @__PURE__ */ V({
|
|
1611
|
-
__name: "AuthkitSwitchSignIn",
|
|
1612
|
-
emits: ["switchSignIn"],
|
|
1613
|
-
setup(o, {
|
|
1614
|
-
emit: r
|
|
1615
|
-
}) {
|
|
1616
|
-
const u = r;
|
|
1617
|
-
function l() {
|
|
1618
|
-
u("switchSignIn");
|
|
1619
|
-
}
|
|
1620
|
-
return (n, d) => (g(), U("div", Pt, [z("span", null, [d[1] || (d[1] = z("span", null, "已经有账号?", -1)), i(e(G), {
|
|
1621
|
-
style: {
|
|
1622
|
-
padding: "0px"
|
|
1623
|
-
},
|
|
1624
|
-
onClick: l
|
|
1625
|
-
}, {
|
|
1626
|
-
default: a(() => [...d[0] || (d[0] = [_("去登陆", -1)])]),
|
|
1627
|
-
_: 1
|
|
1628
|
-
})])]));
|
|
1629
|
-
}
|
|
1630
|
-
}), ye = /* @__PURE__ */ $(Ut, [["__scopeId", "data-v-fc1d3903"]]), $t = {
|
|
1631
|
-
class: "ResetPassword"
|
|
1632
|
-
}, Ct = /* @__PURE__ */ V({
|
|
1633
|
-
__name: "AuthkitResetPassword",
|
|
1634
|
-
props: {
|
|
1635
|
-
size: {
|
|
1636
|
-
type: String,
|
|
1637
|
-
required: !0,
|
|
1638
|
-
default: () => "large"
|
|
1639
|
-
},
|
|
1640
|
-
loading: {
|
|
1641
|
-
type: Boolean,
|
|
1642
|
-
required: !0,
|
|
1643
|
-
default: () => !0
|
|
1644
|
-
}
|
|
1645
|
-
},
|
|
1646
|
-
emits: ["switchSignIn", "submit"],
|
|
1647
|
-
setup(o, {
|
|
1648
|
-
emit: r
|
|
1649
|
-
}) {
|
|
1650
|
-
const u = r, l = o;
|
|
1651
|
-
function n() {
|
|
1652
|
-
u("switchSignIn");
|
|
1653
|
-
}
|
|
1654
|
-
async function d(t) {
|
|
1655
|
-
u("submit", t);
|
|
1656
|
-
}
|
|
1657
|
-
return (t, s) => (g(), U("div", $t, [i(At, {
|
|
1658
|
-
loading: o.loading,
|
|
1659
|
-
size: l.size,
|
|
1660
|
-
onSubmit: d
|
|
1661
|
-
}, null, 8, ["loading", "size"]), i(ye, {
|
|
1662
|
-
onSwitchSignIn: n
|
|
1663
|
-
})]));
|
|
1664
|
-
}
|
|
1665
|
-
}), xt = /* @__PURE__ */ $(Ct, [["__scopeId", "data-v-0622cbe3"]]), qt = {
|
|
1666
|
-
class: "ServiceAgreementAndPrivacyProtection"
|
|
1667
|
-
}, Tt = /* @__PURE__ */ V({
|
|
1668
|
-
__name: "AuthkitServiceAgreementAndPrivacyProtection",
|
|
1669
|
-
emits: ["toUserServiceAgreement", "toPrivacyPolicy"],
|
|
1670
|
-
setup(o, {
|
|
1671
|
-
emit: r
|
|
1672
|
-
}) {
|
|
1673
|
-
const u = r;
|
|
1674
|
-
function l() {
|
|
1675
|
-
u("toUserServiceAgreement");
|
|
1676
|
-
}
|
|
1677
|
-
function n() {
|
|
1678
|
-
u("toPrivacyPolicy");
|
|
1679
|
-
}
|
|
1680
|
-
return (d, t) => (g(), U("div", qt, [t[2] || (t[2] = z("span", null, " 注册登陆即表示同意", -1)), i(e(G), {
|
|
1681
|
-
onClick: l
|
|
1682
|
-
}, {
|
|
1683
|
-
default: a(() => [...t[0] || (t[0] = [_("用户服务协议", -1)])]),
|
|
1684
|
-
_: 1
|
|
1685
|
-
}), t[3] || (t[3] = z("span", null, " 和 ", -1)), i(e(G), {
|
|
1686
|
-
onClick: n
|
|
1687
|
-
}, {
|
|
1688
|
-
default: a(() => [...t[1] || (t[1] = [_("隐私协议", -1)])]),
|
|
1689
|
-
_: 1
|
|
1690
|
-
})]));
|
|
1691
|
-
}
|
|
1692
|
-
}), Rt = /* @__PURE__ */ $(Tt, [["__scopeId", "data-v-18e831ec"]]), Lt = {
|
|
1693
|
-
class: "content"
|
|
1694
|
-
}, Bt = {
|
|
1695
|
-
class: "handle"
|
|
1696
|
-
}, Ot = /* @__PURE__ */ V({
|
|
1697
|
-
__name: "AuthkitPasswordAuth",
|
|
1698
|
-
props: {
|
|
1699
|
-
size: {
|
|
1700
|
-
type: String,
|
|
1701
|
-
required: !0
|
|
1702
|
-
},
|
|
1703
|
-
loading: {
|
|
1704
|
-
type: Boolean,
|
|
1705
|
-
required: !0,
|
|
1706
|
-
default: () => !0
|
|
1707
|
-
}
|
|
1708
|
-
},
|
|
1709
|
-
emits: ["submit"],
|
|
1710
|
-
setup(o, {
|
|
1711
|
-
emit: r
|
|
1712
|
-
}) {
|
|
1713
|
-
const u = r, l = o;
|
|
1714
|
-
async function n(y, m) {
|
|
1715
|
-
var L;
|
|
1716
|
-
if (!y) {
|
|
1717
|
-
m("请输入密码");
|
|
1718
|
-
return;
|
|
1719
|
-
}
|
|
1720
|
-
const {
|
|
1721
|
-
data: v,
|
|
1722
|
-
error: c
|
|
1723
|
-
} = await R.verify.password.post({
|
|
1724
|
-
password: y
|
|
1725
|
-
});
|
|
1726
|
-
if (c) {
|
|
1727
|
-
m(c.message || "密码验证请求出错!");
|
|
1728
|
-
return;
|
|
1729
|
-
}
|
|
1730
|
-
if (!v) {
|
|
1731
|
-
m("密码验证请求出错!");
|
|
1732
|
-
return;
|
|
1733
|
-
}
|
|
1734
|
-
const {
|
|
1735
|
-
isPass: p,
|
|
1736
|
-
feedback: f,
|
|
1737
|
-
score: w,
|
|
1738
|
-
minPasswordComplexity: C
|
|
1739
|
-
} = v;
|
|
1740
|
-
if (!(p === !0 || p === "true" || typeof p == "boolean" && p)) {
|
|
1741
|
-
const q = (f == null ? void 0 : f.warning) || ((L = f == null ? void 0 : f.suggestions) != null && L.length ? f.suggestions.join(", ") : "") || "密码强度不足";
|
|
1742
|
-
m(q);
|
|
1743
|
-
return;
|
|
1744
|
-
}
|
|
1745
|
-
m();
|
|
1746
|
-
}
|
|
1747
|
-
const d = h(), t = h({
|
|
1748
|
-
email: void 0,
|
|
1749
|
-
password: void 0
|
|
1750
|
-
});
|
|
1751
|
-
async function s() {
|
|
1752
|
-
d.value.validate().then((y) => {
|
|
1753
|
-
y || u("submit", t.value);
|
|
1754
|
-
});
|
|
1755
|
-
}
|
|
1756
|
-
return (y, m) => (g(), U("div", Lt, [i(e(H), {
|
|
1757
|
-
ref_key: "formRef",
|
|
1758
|
-
ref: d,
|
|
1759
|
-
model: t.value,
|
|
1760
|
-
size: l.size,
|
|
1761
|
-
"auto-label-width": ""
|
|
1762
|
-
}, {
|
|
1763
|
-
default: a(() => [i(e(I), {
|
|
1764
|
-
field: "email",
|
|
1765
|
-
label: "邮箱",
|
|
1766
|
-
"hide-label": "",
|
|
1767
|
-
rules: [{
|
|
1768
|
-
required: !0,
|
|
1769
|
-
message: "请输入邮箱"
|
|
1770
|
-
}, {
|
|
1771
|
-
type: "email",
|
|
1772
|
-
message: "请输入有效的邮箱"
|
|
1773
|
-
}]
|
|
1774
|
-
}, {
|
|
1775
|
-
default: a(() => [i(e(x), {
|
|
1776
|
-
modelValue: t.value.email,
|
|
1777
|
-
"onUpdate:modelValue": m[0] || (m[0] = (v) => t.value.email = v),
|
|
1778
|
-
placeholder: "请输入邮箱",
|
|
1779
|
-
autocomplete: "email username",
|
|
1780
|
-
type: "email"
|
|
1781
|
-
}, null, 8, ["modelValue"])]),
|
|
1782
|
-
_: 1
|
|
1783
|
-
}), i(e(I), {
|
|
1784
|
-
field: "password",
|
|
1785
|
-
label: "密码",
|
|
1786
|
-
"hide-label": "",
|
|
1787
|
-
rules: [{
|
|
1788
|
-
required: !0,
|
|
1789
|
-
message: "请输入密码"
|
|
1790
|
-
}, {
|
|
1791
|
-
validator: n
|
|
1792
|
-
}]
|
|
1793
|
-
}, {
|
|
1794
|
-
default: a(() => [i(e(x), {
|
|
1795
|
-
modelValue: t.value.password,
|
|
1796
|
-
"onUpdate:modelValue": m[1] || (m[1] = (v) => t.value.password = v),
|
|
1797
|
-
placeholder: "请输入密码",
|
|
1798
|
-
type: "password",
|
|
1799
|
-
autocomplete: "current-password"
|
|
1800
|
-
}, null, 8, ["modelValue"])]),
|
|
1801
|
-
_: 1
|
|
1802
|
-
}, 8, ["rules"]), z("div", Bt, [i(e(A), {
|
|
1803
|
-
type: "primary",
|
|
1804
|
-
loading: l.loading,
|
|
1805
|
-
long: "",
|
|
1806
|
-
size: l.size,
|
|
1807
|
-
onClick: s
|
|
1808
|
-
}, {
|
|
1809
|
-
default: a(() => [...m[2] || (m[2] = [_(" 登陆 ", -1)])]),
|
|
1810
|
-
_: 1
|
|
1811
|
-
}, 8, ["loading", "size"])])]),
|
|
1812
|
-
_: 1
|
|
1813
|
-
}, 8, ["model", "size"])]));
|
|
1814
|
-
}
|
|
1815
|
-
}), Et = /* @__PURE__ */ $(Ot, [["__scopeId", "data-v-a5b44bae"]]), Dt = {
|
|
1816
|
-
class: "SwitchSignUpOrResetPassword"
|
|
1817
|
-
}, Nt = /* @__PURE__ */ V({
|
|
1818
|
-
__name: "AuthkitSwitchSignUpOrResetPassword",
|
|
1819
|
-
emits: ["switchSignUp", "switchResetPassword"],
|
|
1820
|
-
setup(o, {
|
|
1821
|
-
emit: r
|
|
1822
|
-
}) {
|
|
1823
|
-
const u = r;
|
|
1824
|
-
function l() {
|
|
1825
|
-
u("switchSignUp");
|
|
1826
|
-
}
|
|
1827
|
-
function n() {
|
|
1828
|
-
u("switchResetPassword");
|
|
1829
|
-
}
|
|
1830
|
-
return (d, t) => (g(), U("div", Dt, [z("span", null, [t[1] || (t[1] = z("span", null, " 还没有账户?", -1)), i(e(G), {
|
|
1831
|
-
style: {
|
|
1832
|
-
padding: "0px"
|
|
1833
|
-
},
|
|
1834
|
-
onClick: l
|
|
1835
|
-
}, {
|
|
1836
|
-
default: a(() => [...t[0] || (t[0] = [_("去注册?", -1)])]),
|
|
1837
|
-
_: 1
|
|
1838
|
-
})]), i(e(G), {
|
|
1839
|
-
style: {
|
|
1840
|
-
padding: "0px"
|
|
1841
|
-
},
|
|
1842
|
-
onClick: n
|
|
1843
|
-
}, {
|
|
1844
|
-
default: a(() => [...t[2] || (t[2] = [_(" 忘记密码?", -1)])]),
|
|
1845
|
-
_: 1
|
|
1846
|
-
})]));
|
|
1847
|
-
}
|
|
1848
|
-
}), Ft = /* @__PURE__ */ $(Nt, [["__scopeId", "data-v-14e3aab2"]]), Ht = {
|
|
1849
|
-
class: "SignIn"
|
|
1850
|
-
}, Mt = /* @__PURE__ */ V({
|
|
1851
|
-
__name: "AuthkitSignIn",
|
|
1852
|
-
props: {
|
|
1853
|
-
size: {
|
|
1854
|
-
type: String,
|
|
1855
|
-
required: !0
|
|
1856
|
-
},
|
|
1857
|
-
loading: {
|
|
1858
|
-
type: Boolean,
|
|
1859
|
-
required: !0,
|
|
1860
|
-
default: () => !0
|
|
1861
|
-
}
|
|
1862
|
-
},
|
|
1863
|
-
emits: ["submit", "switchSignUp", "switchResetPassword"],
|
|
1864
|
-
setup(o, {
|
|
1865
|
-
emit: r
|
|
1866
|
-
}) {
|
|
1867
|
-
const u = r, l = o, n = Se(), d = N(() => !!n.OAuth);
|
|
1868
|
-
function t() {
|
|
1869
|
-
u("switchSignUp");
|
|
1870
|
-
}
|
|
1871
|
-
function s() {
|
|
1872
|
-
u("switchResetPassword");
|
|
1873
|
-
}
|
|
1874
|
-
async function y(m) {
|
|
1875
|
-
u("submit", m);
|
|
1876
|
-
}
|
|
1877
|
-
return (m, v) => (g(), U("div", Ht, [S("", !0), i(Et, {
|
|
1878
|
-
loading: l.loading,
|
|
1879
|
-
size: l.size,
|
|
1880
|
-
onSubmit: y
|
|
1881
|
-
}, null, 8, ["loading", "size"]), d.value ? de(m.$slots, "OAuth", {
|
|
1882
|
-
key: 1
|
|
1883
|
-
}, void 0, !0) : S("", !0), i(Ft, {
|
|
1884
|
-
onSwitchSignUp: t,
|
|
1885
|
-
onSwitchResetPassword: s
|
|
1886
|
-
})]));
|
|
1887
|
-
}
|
|
1888
|
-
}), Gt = /* @__PURE__ */ $(Mt, [["__scopeId", "data-v-f52ce3b3"]]), jt = {
|
|
1889
|
-
class: "SignUp"
|
|
1890
|
-
}, Wt = /* @__PURE__ */ V({
|
|
1891
|
-
__name: "AuthkitSignUp",
|
|
1892
|
-
props: {
|
|
1893
|
-
size: {
|
|
1894
|
-
type: String,
|
|
1895
|
-
required: !0
|
|
1896
|
-
},
|
|
1897
|
-
loading: {
|
|
1898
|
-
type: Boolean,
|
|
1899
|
-
required: !0,
|
|
1900
|
-
default: () => !0
|
|
1901
|
-
}
|
|
1902
|
-
},
|
|
1903
|
-
emits: ["switchSignIn", "submit"],
|
|
1904
|
-
setup(o, {
|
|
1905
|
-
emit: r
|
|
1906
|
-
}) {
|
|
1907
|
-
const u = r, l = o;
|
|
1908
|
-
function n() {
|
|
1909
|
-
u("switchSignIn");
|
|
1910
|
-
}
|
|
1911
|
-
async function d(t) {
|
|
1912
|
-
u("submit", t);
|
|
1913
|
-
}
|
|
1914
|
-
return (t, s) => (g(), U("div", jt, [i(pe, {
|
|
1915
|
-
size: l.size,
|
|
1916
|
-
loading: o.loading,
|
|
1917
|
-
onSubmit: d
|
|
1918
|
-
}, null, 8, ["size", "loading"]), i(ye, {
|
|
1919
|
-
onSwitchSignIn: n
|
|
1920
|
-
})]));
|
|
1921
|
-
}
|
|
1922
|
-
}), Kt = /* @__PURE__ */ $(Wt, [["__scopeId", "data-v-058bbbef"]]), Zt = ["src"], Jt = /* @__PURE__ */ V({
|
|
1923
|
-
__name: "AuthkitAuthTitle",
|
|
1924
|
-
props: {
|
|
1925
|
-
size: {
|
|
1926
|
-
type: [String, Number],
|
|
1927
|
-
required: !1,
|
|
1928
|
-
default: 30
|
|
1929
|
-
},
|
|
1930
|
-
fontSize: {
|
|
1931
|
-
type: Number,
|
|
1932
|
-
required: !1,
|
|
1933
|
-
default: 18
|
|
1934
|
-
},
|
|
1935
|
-
lineHeight: {
|
|
1936
|
-
type: Number,
|
|
1937
|
-
required: !1,
|
|
1938
|
-
default: 60
|
|
1939
|
-
}
|
|
1940
|
-
},
|
|
1941
|
-
setup(o) {
|
|
1942
|
-
const r = o, u = `${r.size}px`, l = `${r.fontSize}px`, n = `${r.lineHeight}px`, {
|
|
1943
|
-
currentView: d
|
|
1944
|
-
} = J(), {
|
|
1945
|
-
appsData: t
|
|
1946
|
-
} = ae(), s = N(() => d.value === "signIn" ? `${t.value.name}登录` : d.value === "signUp" ? `${t.value.name}账号注册` : d.value === "resetPassword" ? `${t.value.name}密码重置` : "");
|
|
1947
|
-
return (y, m) => (g(), U("div", {
|
|
1948
|
-
class: "Title",
|
|
1949
|
-
style: se({
|
|
1950
|
-
fontSize: l,
|
|
1951
|
-
lineHeight: n
|
|
1952
|
-
})
|
|
1953
|
-
}, [e(t).applicationLogoUrl ? (g(), U("img", {
|
|
1954
|
-
key: 0,
|
|
1955
|
-
src: e(t).applicationLogoUrl,
|
|
1956
|
-
srcset: "",
|
|
1957
|
-
style: se({
|
|
1958
|
-
width: u
|
|
1959
|
-
})
|
|
1960
|
-
}, null, 12, Zt)) : S("", !0), z("span", null, B(s.value), 1), de(y.$slots, "default", {}, void 0, !0)], 4));
|
|
1961
|
-
}
|
|
1962
|
-
}), we = /* @__PURE__ */ $(Jt, [["__scopeId", "data-v-8ebe7939"]]), Qt = {
|
|
1963
|
-
class: "Auth"
|
|
1964
|
-
}, Xt = {
|
|
1965
|
-
class: "body"
|
|
1966
|
-
}, Yt = /* @__PURE__ */ V({
|
|
1967
|
-
__name: "AuthkitAuth",
|
|
1968
|
-
props: {
|
|
1969
|
-
size: {
|
|
1970
|
-
type: String,
|
|
1971
|
-
required: !0
|
|
1972
|
-
},
|
|
1973
|
-
showTitle: {
|
|
1974
|
-
type: Boolean,
|
|
1975
|
-
default: () => !0
|
|
1976
|
-
}
|
|
1977
|
-
},
|
|
1978
|
-
emits: ["toPrivacyPolicy", "toUserServiceAgreement"],
|
|
1979
|
-
setup(o, {
|
|
1980
|
-
emit: r
|
|
1981
|
-
}) {
|
|
1982
|
-
const u = o, l = r, {
|
|
1983
|
-
signInSubmit: n,
|
|
1984
|
-
signUpSubmit: d,
|
|
1985
|
-
resetPasswordSubmit: t,
|
|
1986
|
-
currentView: s,
|
|
1987
|
-
authSignInLoading: y,
|
|
1988
|
-
authSignUpLoading: m,
|
|
1989
|
-
resetPasswordLoading: v,
|
|
1990
|
-
switchSignUp: c,
|
|
1991
|
-
switchResetPassword: p,
|
|
1992
|
-
switchSignIn: f
|
|
1993
|
-
} = J(), {
|
|
1994
|
-
appsAuthPageInfoApi: w
|
|
1995
|
-
} = ae();
|
|
1996
|
-
function C() {
|
|
1997
|
-
l("toPrivacyPolicy");
|
|
1998
|
-
}
|
|
1999
|
-
function P() {
|
|
2000
|
-
l("toUserServiceAgreement");
|
|
2001
|
-
}
|
|
2002
|
-
return w(), (L, q) => (g(), U("div", Qt, [o.showTitle ? (g(), k(we, {
|
|
2003
|
-
key: 0,
|
|
2004
|
-
size: 32,
|
|
2005
|
-
"font-size": 20
|
|
2006
|
-
})) : S("", !0), z("div", Xt, [e(s) === "signIn" ? (g(), k(Gt, {
|
|
2007
|
-
key: 0,
|
|
2008
|
-
size: u.size,
|
|
2009
|
-
loading: e(y),
|
|
2010
|
-
onSwitchSignUp: e(c),
|
|
2011
|
-
onSwitchResetPassword: e(p),
|
|
2012
|
-
onSubmit: q[0] || (q[0] = (E) => e(n)(E))
|
|
2013
|
-
}, {
|
|
2014
|
-
OAuth: a(() => [i(kt, {
|
|
2015
|
-
size: u.size
|
|
2016
|
-
}, null, 8, ["size"])]),
|
|
2017
|
-
_: 1
|
|
2018
|
-
}, 8, ["size", "loading", "onSwitchSignUp", "onSwitchResetPassword"])) : e(s) === "signUp" ? (g(), k(Kt, {
|
|
2019
|
-
key: 1,
|
|
2020
|
-
size: u.size,
|
|
2021
|
-
loading: e(m),
|
|
2022
|
-
onSwitchSignIn: e(f),
|
|
2023
|
-
onSubmit: q[1] || (q[1] = (E) => e(d)(E))
|
|
2024
|
-
}, null, 8, ["size", "loading", "onSwitchSignIn"])) : e(s) === "resetPassword" ? (g(), k(xt, {
|
|
2025
|
-
key: 2,
|
|
2026
|
-
size: u.size,
|
|
2027
|
-
loading: e(v),
|
|
2028
|
-
onSwitchSignIn: e(f),
|
|
2029
|
-
onSubmit: q[2] || (q[2] = (E) => e(t)(E))
|
|
2030
|
-
}, null, 8, ["size", "loading", "onSwitchSignIn"])) : S("", !0), i(Rt, {
|
|
2031
|
-
onToPrivacyPolicy: C,
|
|
2032
|
-
onToUserServiceAgreement: P
|
|
2033
|
-
})])]));
|
|
2034
|
-
}
|
|
2035
|
-
}), ei = /* @__PURE__ */ $(Yt, [["__scopeId", "data-v-de36d1d1"]]), ti = /* @__PURE__ */ V({
|
|
2036
|
-
__name: "AuthkitAuthModal",
|
|
2037
|
-
props: {
|
|
2038
|
-
size: {
|
|
2039
|
-
type: String,
|
|
2040
|
-
required: !0
|
|
2041
|
-
},
|
|
2042
|
-
appId: {
|
|
2043
|
-
type: String,
|
|
2044
|
-
default: () => ""
|
|
2045
|
-
}
|
|
2046
|
-
},
|
|
2047
|
-
emits: ["confirm", "close", "toPrivacyPolicy", "toUserServiceAgreement"],
|
|
2048
|
-
setup(o, {
|
|
2049
|
-
emit: r
|
|
2050
|
-
}) {
|
|
2051
|
-
const {
|
|
2052
|
-
addSignInCallback: u
|
|
2053
|
-
} = J(), {
|
|
2054
|
-
show: l
|
|
2055
|
-
} = Ue(), n = o, d = r;
|
|
2056
|
-
function t(y) {
|
|
2057
|
-
y(!0);
|
|
2058
|
-
}
|
|
2059
|
-
function s() {
|
|
2060
|
-
l.value = !1, d("close");
|
|
2061
|
-
}
|
|
2062
|
-
return u(() => {
|
|
2063
|
-
l.value = !1;
|
|
2064
|
-
}), (y, m) => (g(), k(e(ce), {
|
|
2065
|
-
visible: e(l),
|
|
2066
|
-
"onUpdate:visible": m[2] || (m[2] = (v) => ue(l) ? l.value = v : null),
|
|
2067
|
-
footer: !1,
|
|
2068
|
-
"mask-closable": !1,
|
|
2069
|
-
"title-align": "center",
|
|
2070
|
-
"unmount-on-close": "",
|
|
2071
|
-
width: "auto",
|
|
2072
|
-
"modal-class": "SignInModalClass",
|
|
2073
|
-
onBeforeOk: t,
|
|
2074
|
-
onClose: s
|
|
2075
|
-
}, {
|
|
2076
|
-
title: a(() => [i(we)]),
|
|
2077
|
-
default: a(() => [i(ei, {
|
|
2078
|
-
"show-title": !1,
|
|
2079
|
-
size: n.size,
|
|
2080
|
-
onToPrivacyPolicy: m[0] || (m[0] = (v) => d("toPrivacyPolicy")),
|
|
2081
|
-
onToUserServiceAgreement: m[1] || (m[1] = (v) => d("toUserServiceAgreement"))
|
|
2082
|
-
}, null, 8, ["size"])]),
|
|
2083
|
-
_: 1
|
|
2084
|
-
}, 8, ["visible"]));
|
|
2085
|
-
}
|
|
2086
|
-
}), _i = /* @__PURE__ */ $(ti, [["__scopeId", "data-v-4c7d205e"]]);
|
|
2087
|
-
export {
|
|
2088
|
-
wi as A,
|
|
2089
|
-
st as E,
|
|
2090
|
-
kt as O,
|
|
2091
|
-
Et as P,
|
|
2092
|
-
xt as R,
|
|
2093
|
-
le as S,
|
|
2094
|
-
at as _,
|
|
2095
|
-
ei as a,
|
|
2096
|
-
_i as b,
|
|
2097
|
-
we as c,
|
|
2098
|
-
pe as d,
|
|
2099
|
-
ne as e,
|
|
2100
|
-
ie as f,
|
|
2101
|
-
Je as g,
|
|
2102
|
-
At as h,
|
|
2103
|
-
He as i,
|
|
2104
|
-
Rt as j,
|
|
2105
|
-
Qe as k,
|
|
2106
|
-
Gt as l,
|
|
2107
|
-
Kt as m,
|
|
2108
|
-
ye as n,
|
|
2109
|
-
Ft as o,
|
|
2110
|
-
ge as p,
|
|
2111
|
-
hi as u
|
|
2112
|
-
};
|