@huyooo/ui 0.15.0 → 0.15.1
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/{AuthkitAppSetting-Xe-QQSQ4.js → AuthkitAppSetting-Ds7mYFV5.js} +6 -6
- package/dist/{AuthkitGithubBinding-Uya3rVdX.js → AuthkitGithubBinding-LVDS1PNQ.js} +231 -228
- package/dist/{Clipboard-C8ncjaAJ.js → Clipboard-R3AURqvU.js} +1 -1
- package/dist/{Contact-mb7deQOs.js → Contact-B3AMSHoN.js} +2 -2
- package/dist/{FeedbackItem-C4MZUC-3.js → FeedbackItem-DkvSQT33.js} +3 -3
- package/dist/{FeedbackModal-yVKcsuaE.js → FeedbackModal-C45pNoiw.js} +3 -3
- package/dist/{MessageHandle-rRAQnE-q.js → MessageHandle-CEQtGyVZ.js} +2 -2
- package/dist/{MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-CsXEBH4f.js → MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-87v_RIQa.js} +2 -2
- package/dist/{PaySubscriptions-B6R71CHm.js → PaySubscriptions-D3g1OhiA.js} +4 -4
- package/dist/{PricingPlans-Ddl98xpp.js → PricingPlans-ClKLdoVv.js} +4 -4
- package/dist/{ReferrerReferees-DFCwvXJ6.js → ReferrerReferees-BxmZ1w_L.js} +4 -4
- package/dist/{Upload.vue_vue_type_script_setup_true_lang-dLSky4Yx.js → Upload.vue_vue_type_script_setup_true_lang-DLKSHzxG.js} +1 -1
- package/dist/{UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-f2mzNg6i.js → UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-C7mV8kGe.js} +9 -9
- package/dist/{WidthContainer-DSxG-FRN.js → WidthContainer-DKasAIgU.js} +9 -9
- package/dist/{apiClients-CkI47p36.js → apiClients-DT7o0IpO.js} +124 -109
- package/dist/authkit.js +9 -9
- package/dist/common.js +1 -1
- package/dist/composables.js +13 -13
- package/dist/feedback.js +3 -3
- package/dist/main.d.ts +1 -0
- package/dist/main.js +248 -243
- package/dist/message.js +3 -3
- package/dist/pay.js +4 -4
- package/dist/privateCom.js +1 -1
- package/dist/referrer.js +1 -1
- package/dist/types/api/billing.generated.d.ts +2 -2
- package/dist/types/api/log.generated.d.ts +4 -2
- package/dist/upload.js +2 -2
- package/dist/{useAuthkitAppsAuthPageInfo-nCjfAjiw.js → useAuthkitAppsAuthPageInfo-DScDQfj5.js} +1 -1
- package/dist/{useAuthkitAuth-C--qS6UE.js → useAuthkitAuth-DpdKRuJm.js} +65 -67
- package/dist/{useAuthkitCreateAndUpdate-u-ceTc-m.js → useAuthkitCreateAndUpdate-MzA4qtTh.js} +1 -1
- package/dist/{useAuthkitUsersProfile-BC5EsA2f.js → useAuthkitUsersProfile-aw_A7IWb.js} +2 -2
- package/dist/{useBillingStatusOptions-D5Ehwtbj.js → useBillingStatusOptions-CAsu1hrf.js} +3 -3
- package/dist/{useEnsureAuthenticated-C4tsSfv6.js → useEnsureAuthenticated-BEKhtQAl.js} +2 -2
- package/dist/{useLegalLinks-DeXLE-yv.js → useLegalLinks-BijRF_ZD.js} +2 -2
- package/dist/{useMessageNotifications-BMUx5xfX.js → useMessageNotifications-CFku0c2R.js} +1 -1
- package/dist/{useRoutePermission-CxRJlooW.js → useRoutePermission-v4_0B-aO.js} +2 -2
- package/dist/{useSEO-DFmbAH-7.js → useSEO-CbHCw4gq.js} +1 -1
- package/dist/{useSubscriptionCheckout-CHAF20s-.js → useSubscriptionCheckout-CfFdAhTR.js} +3 -3
- package/dist/{useTableHandle-9alnSWt0.js → useTableHandle-TDJa_Czn.js} +1 -1
- package/dist/{useUploadCos-DGPnLOC9.js → useUploadCos-CvG6EL5Q.js} +1 -1
- package/dist/user.js +1 -1
- package/dist/utils/apiMiddlewares.d.ts +3 -0
- package/dist/utils/authkit.d.ts +6 -0
- package/package.json +2 -2
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { defineComponent as z, openBlock as
|
|
1
|
+
import { defineComponent as z, openBlock as c, createElementBlock as b, normalizeClass as me, createVNode as s, unref as t, computed as C, createElementVNode as y, createCommentVNode as I, createBlock as k, ref as S, withCtx as f, createTextVNode as $, watchEffect as ee, Fragment as G, renderList as te, toDisplayString as T, useSlots as re, renderSlot as N, normalizeStyle as Q, onMounted as j, onUnmounted as ie } from "vue";
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
4
|
import "./index-D3Kp6R4z.js";
|
|
5
|
-
import { Form as
|
|
6
|
-
import { u as F } from "./useAuthkitAuth-
|
|
7
|
-
import { e as
|
|
8
|
-
import { u as H } from "./useAuthkitAppsAuthPageInfo-
|
|
9
|
-
import { u as ue, S as D, a as we, b as _e } from "./AuthkitAppSetting-
|
|
5
|
+
import { Form as x, FormItem as A, Input as V, Button as B, Link as M, Tabs as oe, TabPane as se, Divider as ae, Modal as fe, Message as Z, List as ve, ListItem as X, ListItemMeta as Y, Avatar as E, Alert as le } from "@arco-design/web-vue";
|
|
6
|
+
import { u as F } from "./useAuthkitAuth-DpdKRuJm.js";
|
|
7
|
+
import { e as O, u as ge, s as he, g as ye } from "./apiClients-DT7o0IpO.js";
|
|
8
|
+
import { u as H } from "./useAuthkitAppsAuthPageInfo-DScDQfj5.js";
|
|
9
|
+
import { u as ue, S as D, a as we, b as _e } from "./AuthkitAppSetting-Ds7mYFV5.js";
|
|
10
10
|
import { Icon as de } from "@iconify/vue";
|
|
11
11
|
import { _ as P } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
12
12
|
/* empty css */
|
|
13
13
|
/* empty css */
|
|
14
14
|
/* empty css */
|
|
15
|
-
import { u as be } from "./useLegalLinks-
|
|
16
|
-
import { u as J } from "./useAuthkitUsersProfile-
|
|
15
|
+
import { u as be } from "./useLegalLinks-BijRF_ZD.js";
|
|
16
|
+
import { u as J } from "./useAuthkitUsersProfile-aw_A7IWb.js";
|
|
17
17
|
/* empty css */
|
|
18
18
|
/* empty css */
|
|
19
19
|
/* empty css */
|
|
@@ -37,7 +37,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
37
37
|
},
|
|
38
38
|
setup(g) {
|
|
39
39
|
const u = g;
|
|
40
|
-
return (n, o) => (
|
|
40
|
+
return (n, o) => (c(), b("button", {
|
|
41
41
|
class: me(["OAuthItem", {
|
|
42
42
|
"OAuthItem--wechat": u.label === "微信"
|
|
43
43
|
}]),
|
|
@@ -76,25 +76,25 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
76
76
|
microsoftAuth: l,
|
|
77
77
|
wechatAuth: r
|
|
78
78
|
} = ue(), e = C(() => !(!u.value.oauth.google.enabled && !u.value.oauth.microsoft.enabled && !u.value.oauth.github.enabled && !u.value.oauth.wechat.enabled));
|
|
79
|
-
return (h, i) => (
|
|
79
|
+
return (h, i) => (c(), b("div", Ie, [e.value ? (c(), b("div", ze, [...i[4] || (i[4] = [y("span", null, "其他登录方式", -1)])])) : I("", !0), y("div", Pe, [t(u).oauth.google.enabled ? (c(), k(W, {
|
|
80
80
|
key: 0,
|
|
81
81
|
icon: "logos:google-icon",
|
|
82
82
|
label: "Google",
|
|
83
83
|
size: n.size,
|
|
84
84
|
onClick: i[0] || (i[0] = (p) => t(v)())
|
|
85
|
-
}, null, 8, ["size"])) : I("", !0), t(u).oauth.github.enabled ? (
|
|
85
|
+
}, null, 8, ["size"])) : I("", !0), t(u).oauth.github.enabled ? (c(), k(W, {
|
|
86
86
|
key: 1,
|
|
87
87
|
icon: "logos:github-icon",
|
|
88
88
|
label: "Github",
|
|
89
89
|
size: n.size,
|
|
90
90
|
onClick: i[1] || (i[1] = (p) => t(o)())
|
|
91
|
-
}, null, 8, ["size"])) : I("", !0), t(u).oauth.microsoft.enabled ? (
|
|
91
|
+
}, null, 8, ["size"])) : I("", !0), t(u).oauth.microsoft.enabled ? (c(), k(W, {
|
|
92
92
|
key: 2,
|
|
93
93
|
icon: "logos:microsoft-icon",
|
|
94
94
|
label: "Microsoft",
|
|
95
95
|
size: n.size,
|
|
96
96
|
onClick: i[2] || (i[2] = (p) => t(l)())
|
|
97
|
-
}, null, 8, ["size"])) : I("", !0), t(u).oauth.wechat.enabled ? (
|
|
97
|
+
}, null, 8, ["size"])) : I("", !0), t(u).oauth.wechat.enabled ? (c(), k(W, {
|
|
98
98
|
key: 3,
|
|
99
99
|
icon: "ri:wechat-fill",
|
|
100
100
|
label: "微信",
|
|
@@ -136,12 +136,12 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
136
136
|
if (!await r.value.validateField(["email"])) {
|
|
137
137
|
l.value = !0;
|
|
138
138
|
const {
|
|
139
|
-
data:
|
|
140
|
-
} = await
|
|
139
|
+
data: m
|
|
140
|
+
} = await O.verify.email.retry.post({
|
|
141
141
|
email: e.value.email,
|
|
142
142
|
purpose: "resetPassword"
|
|
143
143
|
});
|
|
144
|
-
l.value = !1,
|
|
144
|
+
l.value = !1, m && (e.value.emailVerifyId = m.emailVerifyId, v.value.startCountFn());
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
147
|
async function i() {
|
|
@@ -149,7 +149,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
149
149
|
p || n("submit", e.value);
|
|
150
150
|
});
|
|
151
151
|
}
|
|
152
|
-
return (p,
|
|
152
|
+
return (p, m) => (c(), b("div", Ue, [s(t(x), {
|
|
153
153
|
ref_key: "formRef",
|
|
154
154
|
ref: r,
|
|
155
155
|
model: e.value,
|
|
@@ -170,7 +170,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
170
170
|
}, {
|
|
171
171
|
default: f(() => [s(t(V), {
|
|
172
172
|
modelValue: e.value.email,
|
|
173
|
-
"onUpdate:modelValue":
|
|
173
|
+
"onUpdate:modelValue": m[0] || (m[0] = (a) => e.value.email = a),
|
|
174
174
|
placeholder: "请输入邮箱"
|
|
175
175
|
}, null, 8, ["modelValue"])]),
|
|
176
176
|
_: 1
|
|
@@ -185,7 +185,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
185
185
|
}, {
|
|
186
186
|
default: f(() => [y("div", $e, [s(t(V), {
|
|
187
187
|
modelValue: e.value.userToken,
|
|
188
|
-
"onUpdate:modelValue":
|
|
188
|
+
"onUpdate:modelValue": m[1] || (m[1] = (a) => e.value.userToken = a),
|
|
189
189
|
placeholder: "请输入验证码"
|
|
190
190
|
}, null, 8, ["modelValue"]), s(D, {
|
|
191
191
|
ref_key: "SendVerifyCodeRef",
|
|
@@ -212,7 +212,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
212
212
|
}, {
|
|
213
213
|
default: f(() => [s(t(V), {
|
|
214
214
|
modelValue: e.value.password,
|
|
215
|
-
"onUpdate:modelValue":
|
|
215
|
+
"onUpdate:modelValue": m[2] || (m[2] = (a) => e.value.password = a),
|
|
216
216
|
placeholder: "请输入密码",
|
|
217
217
|
type: "password",
|
|
218
218
|
autocomplete: ""
|
|
@@ -229,14 +229,14 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
229
229
|
minLength: 10,
|
|
230
230
|
message: "确认密码不能少于10字符"
|
|
231
231
|
}, {
|
|
232
|
-
validator: (a,
|
|
233
|
-
a !== e.value.password ?
|
|
232
|
+
validator: (a, d) => {
|
|
233
|
+
a !== e.value.password ? d("两次密码输入不一致,请重新输入") : d();
|
|
234
234
|
}
|
|
235
235
|
}]
|
|
236
236
|
}, {
|
|
237
237
|
default: f(() => [s(t(V), {
|
|
238
238
|
modelValue: e.value.confirmPassword,
|
|
239
|
-
"onUpdate:modelValue":
|
|
239
|
+
"onUpdate:modelValue": m[3] || (m[3] = (a) => e.value.confirmPassword = a),
|
|
240
240
|
placeholder: "请输入确认密码密码",
|
|
241
241
|
type: "password",
|
|
242
242
|
autocomplete: ""
|
|
@@ -249,7 +249,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
249
249
|
size: o.size,
|
|
250
250
|
onClick: i
|
|
251
251
|
}, {
|
|
252
|
-
default: f(() => [...
|
|
252
|
+
default: f(() => [...m[4] || (m[4] = [$(" 提交 ", -1)])]),
|
|
253
253
|
_: 1
|
|
254
254
|
}, 8, ["loading", "size"])])]),
|
|
255
255
|
_: 1
|
|
@@ -257,9 +257,9 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
257
257
|
}
|
|
258
258
|
}), qe = /* @__PURE__ */ P(Re, [["__scopeId", "data-v-6748c8cb"]]), Be = {
|
|
259
259
|
class: "content"
|
|
260
|
-
},
|
|
260
|
+
}, Oe = {
|
|
261
261
|
class: "sendVerifyCodeItem"
|
|
262
|
-
},
|
|
262
|
+
}, Te = /* @__PURE__ */ z({
|
|
263
263
|
__name: "AuthkitPhonePasswordUpdateAndVerify",
|
|
264
264
|
props: {
|
|
265
265
|
size: {
|
|
@@ -288,8 +288,8 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
288
288
|
minLength: 10,
|
|
289
289
|
message: "确认密码不能少于10字符"
|
|
290
290
|
}, {
|
|
291
|
-
validator: (
|
|
292
|
-
if (
|
|
291
|
+
validator: (m, a) => {
|
|
292
|
+
if (m !== e.value.password) {
|
|
293
293
|
a("两次密码输入不一致,请重新输入");
|
|
294
294
|
return;
|
|
295
295
|
}
|
|
@@ -301,7 +301,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
301
301
|
l.value = !0;
|
|
302
302
|
const {
|
|
303
303
|
error: a
|
|
304
|
-
} = await
|
|
304
|
+
} = await O.verify.sms.send.post({
|
|
305
305
|
phone: e.value.phone,
|
|
306
306
|
purpose: "resetPassword"
|
|
307
307
|
});
|
|
@@ -309,8 +309,8 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
309
309
|
}
|
|
310
310
|
}
|
|
311
311
|
async function p() {
|
|
312
|
-
r.value.validate().then((
|
|
313
|
-
|
|
312
|
+
r.value.validate().then((m) => {
|
|
313
|
+
m || n("submit", {
|
|
314
314
|
method: "phone",
|
|
315
315
|
phone: e.value.phone,
|
|
316
316
|
code: e.value.code,
|
|
@@ -318,7 +318,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
318
318
|
});
|
|
319
319
|
});
|
|
320
320
|
}
|
|
321
|
-
return (
|
|
321
|
+
return (m, a) => (c(), b("div", Be, [s(t(x), {
|
|
322
322
|
ref_key: "formRef",
|
|
323
323
|
ref: r,
|
|
324
324
|
model: e.value,
|
|
@@ -339,7 +339,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
339
339
|
}, {
|
|
340
340
|
default: f(() => [s(t(V), {
|
|
341
341
|
modelValue: e.value.phone,
|
|
342
|
-
"onUpdate:modelValue": a[0] || (a[0] = (
|
|
342
|
+
"onUpdate:modelValue": a[0] || (a[0] = (d) => e.value.phone = d),
|
|
343
343
|
placeholder: "请输入手机号",
|
|
344
344
|
autocomplete: "tel",
|
|
345
345
|
type: "tel"
|
|
@@ -354,9 +354,9 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
354
354
|
message: "请输入验证码"
|
|
355
355
|
}]
|
|
356
356
|
}, {
|
|
357
|
-
default: f(() => [y("div",
|
|
357
|
+
default: f(() => [y("div", Oe, [s(t(V), {
|
|
358
358
|
modelValue: e.value.code,
|
|
359
|
-
"onUpdate:modelValue": a[1] || (a[1] = (
|
|
359
|
+
"onUpdate:modelValue": a[1] || (a[1] = (d) => e.value.code = d),
|
|
360
360
|
placeholder: "请输入验证码",
|
|
361
361
|
autocomplete: "one-time-code"
|
|
362
362
|
}, null, 8, ["modelValue"]), s(D, {
|
|
@@ -384,7 +384,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
384
384
|
}, {
|
|
385
385
|
default: f(() => [s(t(V), {
|
|
386
386
|
modelValue: e.value.password,
|
|
387
|
-
"onUpdate:modelValue": a[2] || (a[2] = (
|
|
387
|
+
"onUpdate:modelValue": a[2] || (a[2] = (d) => e.value.password = d),
|
|
388
388
|
placeholder: "请输入密码",
|
|
389
389
|
type: "password",
|
|
390
390
|
autocomplete: "new-password"
|
|
@@ -398,7 +398,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
398
398
|
}, {
|
|
399
399
|
default: f(() => [s(t(V), {
|
|
400
400
|
modelValue: e.value.confirmPassword,
|
|
401
|
-
"onUpdate:modelValue": a[3] || (a[3] = (
|
|
401
|
+
"onUpdate:modelValue": a[3] || (a[3] = (d) => e.value.confirmPassword = d),
|
|
402
402
|
placeholder: "请输入确认密码",
|
|
403
403
|
type: "password",
|
|
404
404
|
autocomplete: "new-password"
|
|
@@ -417,7 +417,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
417
417
|
_: 1
|
|
418
418
|
}, 8, ["model", "size"])]));
|
|
419
419
|
}
|
|
420
|
-
}),
|
|
420
|
+
}), xe = /* @__PURE__ */ P(Te, [["__scopeId", "data-v-717c5c0f"]]), Le = {
|
|
421
421
|
class: "SwitchSignIn"
|
|
422
422
|
}, Me = /* @__PURE__ */ z({
|
|
423
423
|
__name: "AuthkitSwitchSignIn",
|
|
@@ -429,7 +429,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
429
429
|
function o() {
|
|
430
430
|
n("switchSignIn");
|
|
431
431
|
}
|
|
432
|
-
return (v, l) => (
|
|
432
|
+
return (v, l) => (c(), b("div", Le, [y("span", null, [l[1] || (l[1] = y("span", null, "已经有账号?", -1)), s(t(M), {
|
|
433
433
|
style: {
|
|
434
434
|
padding: "0px"
|
|
435
435
|
},
|
|
@@ -479,7 +479,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
479
479
|
}), e = S("email");
|
|
480
480
|
ee(() => {
|
|
481
481
|
var p;
|
|
482
|
-
r.value.some((
|
|
482
|
+
r.value.some((m) => m.key === e.value) || (e.value = ((p = r.value[0]) == null ? void 0 : p.key) || "email");
|
|
483
483
|
});
|
|
484
484
|
function h() {
|
|
485
485
|
n("switchSignIn");
|
|
@@ -490,11 +490,11 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
490
490
|
...p
|
|
491
491
|
});
|
|
492
492
|
}
|
|
493
|
-
return (p,
|
|
493
|
+
return (p, m) => (c(), b("div", Fe, [r.value.length > 1 ? (c(), b("div", He, [s(t(oe), {
|
|
494
494
|
"active-key": e.value,
|
|
495
|
-
"onUpdate:activeKey":
|
|
495
|
+
"onUpdate:activeKey": m[0] || (m[0] = (a) => e.value = a)
|
|
496
496
|
}, {
|
|
497
|
-
default: f(() => [(
|
|
497
|
+
default: f(() => [(c(!0), b(G, null, te(r.value, (a) => (c(), k(t(se), {
|
|
498
498
|
key: a.key,
|
|
499
499
|
title: a.title
|
|
500
500
|
}, null, 8, ["title"]))), 128))]),
|
|
@@ -504,17 +504,17 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
504
504
|
style: {
|
|
505
505
|
margin: "0"
|
|
506
506
|
}
|
|
507
|
-
})])) : I("", !0), e.value === "email" && l.value.login.emailPassword ? (
|
|
507
|
+
})])) : I("", !0), e.value === "email" && l.value.login.emailPassword ? (c(), k(qe, {
|
|
508
508
|
key: 1,
|
|
509
509
|
loading: g.loading,
|
|
510
510
|
size: o.size,
|
|
511
511
|
onSubmit: i
|
|
512
|
-
}, null, 8, ["loading", "size"])) : e.value === "phone" && l.value.login.phonePassword ? (
|
|
512
|
+
}, null, 8, ["loading", "size"])) : e.value === "phone" && l.value.login.phonePassword ? (c(), k(xe, {
|
|
513
513
|
key: 2,
|
|
514
514
|
loading: g.loading,
|
|
515
515
|
size: o.size,
|
|
516
516
|
onSubmit: i
|
|
517
|
-
}, null, 8, ["loading", "size"])) : (
|
|
517
|
+
}, null, 8, ["loading", "size"])) : (c(), b("div", De, "当前应用未开放找回密码")), s(ne, {
|
|
518
518
|
onSwitchSignIn: h
|
|
519
519
|
})]));
|
|
520
520
|
}
|
|
@@ -544,17 +544,17 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
544
544
|
function h() {
|
|
545
545
|
n("toPrivacyPolicy");
|
|
546
546
|
}
|
|
547
|
-
return (i, p) => r.value ? (
|
|
547
|
+
return (i, p) => r.value ? (c(), b("div", Ne, [p[0] || (p[0] = y("span", null, "注册登陆即表示同意", -1)), v.value ? (c(), k(t(M), {
|
|
548
548
|
key: 0,
|
|
549
549
|
onClick: e
|
|
550
550
|
}, {
|
|
551
|
-
default: f(() => [$(
|
|
551
|
+
default: f(() => [$(T(v.value.label), 1)]),
|
|
552
552
|
_: 1
|
|
553
|
-
})) : I("", !0), v.value && l.value ? (
|
|
553
|
+
})) : I("", !0), v.value && l.value ? (c(), b("span", je, "和")) : I("", !0), l.value ? (c(), k(t(M), {
|
|
554
554
|
key: 2,
|
|
555
555
|
onClick: h
|
|
556
556
|
}, {
|
|
557
|
-
default: f(() => [$(
|
|
557
|
+
default: f(() => [$(T(l.value.label), 1)]),
|
|
558
558
|
_: 1
|
|
559
559
|
})) : I("", !0)])) : I("", !0);
|
|
560
560
|
}
|
|
@@ -592,7 +592,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
592
592
|
e || n("submit", l.value);
|
|
593
593
|
});
|
|
594
594
|
}
|
|
595
|
-
return (e, h) => (
|
|
595
|
+
return (e, h) => (c(), b("div", Qe, [s(t(x), {
|
|
596
596
|
ref_key: "formRef",
|
|
597
597
|
ref: v,
|
|
598
598
|
model: l.value,
|
|
@@ -668,7 +668,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
668
668
|
function l() {
|
|
669
669
|
o("switchResetPassword");
|
|
670
670
|
}
|
|
671
|
-
return (r, e) => (
|
|
671
|
+
return (r, e) => (c(), b("div", Ze, [n.showSignUp ? (c(), b("span", et, [e[1] || (e[1] = y("span", null, " 还没有账户?", -1)), s(t(M), {
|
|
672
672
|
style: {
|
|
673
673
|
padding: "0px"
|
|
674
674
|
},
|
|
@@ -718,31 +718,31 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
718
718
|
function p() {
|
|
719
719
|
n("switchSignUp");
|
|
720
720
|
}
|
|
721
|
-
function
|
|
721
|
+
function m() {
|
|
722
722
|
n("switchResetPassword");
|
|
723
723
|
}
|
|
724
724
|
async function a() {
|
|
725
725
|
if (!await h.value.validateField(["phone"])) {
|
|
726
726
|
e.value = !0;
|
|
727
727
|
const {
|
|
728
|
-
error:
|
|
729
|
-
} = await
|
|
728
|
+
error: _
|
|
729
|
+
} = await O.verify.sms.send.post({
|
|
730
730
|
phone: i.value.phone,
|
|
731
731
|
purpose: "signIn"
|
|
732
732
|
});
|
|
733
|
-
e.value = !1,
|
|
733
|
+
e.value = !1, _ || r.value.startCountFn();
|
|
734
734
|
}
|
|
735
735
|
}
|
|
736
|
-
async function
|
|
737
|
-
h.value.validate().then((
|
|
738
|
-
|
|
736
|
+
async function d() {
|
|
737
|
+
h.value.validate().then((w) => {
|
|
738
|
+
w || n("submit", {
|
|
739
739
|
identifier: i.value.phone,
|
|
740
740
|
code: i.value.code,
|
|
741
741
|
method: "code"
|
|
742
742
|
});
|
|
743
743
|
});
|
|
744
744
|
}
|
|
745
|
-
return (
|
|
745
|
+
return (w, _) => (c(), b("div", it, [y("div", ot, [s(t(x), {
|
|
746
746
|
ref_key: "formRef",
|
|
747
747
|
ref: h,
|
|
748
748
|
model: i.value,
|
|
@@ -763,7 +763,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
763
763
|
}, {
|
|
764
764
|
default: f(() => [s(t(V), {
|
|
765
765
|
modelValue: i.value.phone,
|
|
766
|
-
"onUpdate:modelValue":
|
|
766
|
+
"onUpdate:modelValue": _[0] || (_[0] = (U) => i.value.phone = U),
|
|
767
767
|
placeholder: "请输入手机号",
|
|
768
768
|
autocomplete: "tel",
|
|
769
769
|
type: "tel"
|
|
@@ -780,7 +780,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
780
780
|
}, {
|
|
781
781
|
default: f(() => [y("div", st, [s(t(V), {
|
|
782
782
|
modelValue: i.value.code,
|
|
783
|
-
"onUpdate:modelValue":
|
|
783
|
+
"onUpdate:modelValue": _[1] || (_[1] = (U) => i.value.code = U),
|
|
784
784
|
placeholder: "请输入验证码",
|
|
785
785
|
autocomplete: "one-time-code"
|
|
786
786
|
}, null, 8, ["modelValue"]), s(D, {
|
|
@@ -799,17 +799,17 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
799
799
|
loading: o.loading,
|
|
800
800
|
long: "",
|
|
801
801
|
size: o.size,
|
|
802
|
-
onClick:
|
|
802
|
+
onClick: d
|
|
803
803
|
}, {
|
|
804
|
-
default: f(() => [...
|
|
804
|
+
default: f(() => [..._[2] || (_[2] = [$(" 登录 ", -1)])]),
|
|
805
805
|
_: 1
|
|
806
806
|
}, 8, ["loading", "size"])])]),
|
|
807
807
|
_: 1
|
|
808
|
-
}, 8, ["model", "size"])]), l.value ? N(
|
|
808
|
+
}, 8, ["model", "size"])]), l.value ? N(w.$slots, "OAuth", {
|
|
809
809
|
key: 0
|
|
810
810
|
}, void 0, !0) : I("", !0), s(ce, {
|
|
811
811
|
onSwitchSignUp: p,
|
|
812
|
-
onSwitchResetPassword:
|
|
812
|
+
onSwitchResetPassword: m
|
|
813
813
|
})]));
|
|
814
814
|
}
|
|
815
815
|
}), lt = /* @__PURE__ */ P(nt, [["__scopeId", "data-v-723d4155"]]), rt = {
|
|
@@ -842,13 +842,13 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
842
842
|
if (!await r.value.validateField(["email"])) {
|
|
843
843
|
l.value = !0;
|
|
844
844
|
const {
|
|
845
|
-
data:
|
|
845
|
+
data: m,
|
|
846
846
|
error: a
|
|
847
|
-
} = await
|
|
847
|
+
} = await O.verify.email.retry.post({
|
|
848
848
|
email: e.value.email,
|
|
849
849
|
purpose: "signIn"
|
|
850
850
|
});
|
|
851
|
-
l.value = !1, !a && (
|
|
851
|
+
l.value = !1, !a && (m != null && m.emailVerifyId) && (e.value.emailVerifyId = m.emailVerifyId, v.value.startCountFn());
|
|
852
852
|
}
|
|
853
853
|
}
|
|
854
854
|
async function i() {
|
|
@@ -861,7 +861,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
861
861
|
});
|
|
862
862
|
});
|
|
863
863
|
}
|
|
864
|
-
return (p,
|
|
864
|
+
return (p, m) => (c(), b("div", rt, [s(t(x), {
|
|
865
865
|
ref_key: "formRef",
|
|
866
866
|
ref: r,
|
|
867
867
|
model: e.value,
|
|
@@ -881,7 +881,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
881
881
|
}, {
|
|
882
882
|
default: f(() => [s(t(V), {
|
|
883
883
|
modelValue: e.value.email,
|
|
884
|
-
"onUpdate:modelValue":
|
|
884
|
+
"onUpdate:modelValue": m[0] || (m[0] = (a) => e.value.email = a),
|
|
885
885
|
placeholder: "请输入邮箱",
|
|
886
886
|
autocomplete: "email"
|
|
887
887
|
}, null, 8, ["modelValue"])]),
|
|
@@ -896,7 +896,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
896
896
|
}, {
|
|
897
897
|
default: f(() => [y("div", ut, [s(t(V), {
|
|
898
898
|
modelValue: e.value.code,
|
|
899
|
-
"onUpdate:modelValue":
|
|
899
|
+
"onUpdate:modelValue": m[1] || (m[1] = (a) => e.value.code = a),
|
|
900
900
|
placeholder: "请输入验证码",
|
|
901
901
|
autocomplete: "one-time-code"
|
|
902
902
|
}, null, 8, ["modelValue"]), s(D, {
|
|
@@ -917,7 +917,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
917
917
|
size: o.size,
|
|
918
918
|
onClick: i
|
|
919
919
|
}, {
|
|
920
|
-
default: f(() => [...
|
|
920
|
+
default: f(() => [...m[2] || (m[2] = [$(" 登录 ", -1)])]),
|
|
921
921
|
_: 1
|
|
922
922
|
}, 8, ["loading", "size"])]),
|
|
923
923
|
_: 1
|
|
@@ -948,41 +948,41 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
948
948
|
const n = u, o = g, v = re(), l = C(() => !!v.OAuth), {
|
|
949
949
|
appsData: r
|
|
950
950
|
} = H(), e = C(() => r.value.authMethods), h = C(() => {
|
|
951
|
-
const
|
|
952
|
-
return (e.value.login.emailPassword || e.value.login.phonePassword) &&
|
|
951
|
+
const d = [];
|
|
952
|
+
return (e.value.login.emailPassword || e.value.login.phonePassword) && d.push({
|
|
953
953
|
key: "password",
|
|
954
954
|
title: e.value.login.phonePassword ? "邮箱/手机号密码登录" : "邮箱密码登录"
|
|
955
|
-
}), e.value.login.phoneCode &&
|
|
955
|
+
}), e.value.login.phoneCode && d.push({
|
|
956
956
|
key: "phoneCode",
|
|
957
957
|
title: "手机验证码登录"
|
|
958
|
-
}), e.value.login.emailCode &&
|
|
958
|
+
}), e.value.login.emailCode && d.push({
|
|
959
959
|
key: "emailCode",
|
|
960
960
|
title: "邮箱验证码登录"
|
|
961
|
-
}),
|
|
961
|
+
}), d;
|
|
962
962
|
}), i = S("password");
|
|
963
963
|
ee(() => {
|
|
964
|
-
var
|
|
965
|
-
h.value.some((
|
|
964
|
+
var d;
|
|
965
|
+
h.value.some((w) => w.key === i.value) || (i.value = ((d = h.value[0]) == null ? void 0 : d.key) || "password");
|
|
966
966
|
});
|
|
967
967
|
function p() {
|
|
968
968
|
n("switchSignUp");
|
|
969
969
|
}
|
|
970
|
-
function
|
|
970
|
+
function m() {
|
|
971
971
|
n("switchResetPassword");
|
|
972
972
|
}
|
|
973
|
-
async function a(
|
|
973
|
+
async function a(d) {
|
|
974
974
|
n("submit", {
|
|
975
975
|
method: i.value === "password" ? "password" : "code",
|
|
976
|
-
...
|
|
976
|
+
...d
|
|
977
977
|
});
|
|
978
978
|
}
|
|
979
|
-
return (
|
|
979
|
+
return (d, w) => (c(), b("div", pt, [h.value.length > 1 ? (c(), b("div", mt, [s(t(oe), {
|
|
980
980
|
"active-key": i.value,
|
|
981
|
-
"onUpdate:activeKey":
|
|
981
|
+
"onUpdate:activeKey": w[0] || (w[0] = (_) => i.value = _)
|
|
982
982
|
}, {
|
|
983
|
-
default: f(() => [(
|
|
984
|
-
key:
|
|
985
|
-
title:
|
|
983
|
+
default: f(() => [(c(!0), b(G, null, te(h.value, (_) => (c(), k(t(se), {
|
|
984
|
+
key: _.key,
|
|
985
|
+
title: _.title
|
|
986
986
|
}, null, 8, ["title"]))), 128))]),
|
|
987
987
|
_: 1
|
|
988
988
|
}, 8, ["active-key"]), s(t(ae), {
|
|
@@ -990,28 +990,28 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
990
990
|
style: {
|
|
991
991
|
margin: "0"
|
|
992
992
|
}
|
|
993
|
-
})])) : I("", !0), i.value === "password" && (e.value.login.emailPassword || e.value.login.phonePassword) ? (
|
|
993
|
+
})])) : I("", !0), i.value === "password" && (e.value.login.emailPassword || e.value.login.phonePassword) ? (c(), k(Ye, {
|
|
994
994
|
key: 1,
|
|
995
995
|
loading: o.loading,
|
|
996
996
|
size: o.size,
|
|
997
997
|
"allow-phone": e.value.login.phonePassword,
|
|
998
998
|
onSubmit: a
|
|
999
|
-
}, null, 8, ["loading", "size", "allow-phone"])) : i.value === "phoneCode" ? (
|
|
999
|
+
}, null, 8, ["loading", "size", "allow-phone"])) : i.value === "phoneCode" ? (c(), k(lt, {
|
|
1000
1000
|
key: 2,
|
|
1001
1001
|
loading: o.loading,
|
|
1002
1002
|
size: o.size,
|
|
1003
1003
|
onSubmit: a
|
|
1004
|
-
}, null, 8, ["loading", "size"])) : i.value === "emailCode" ? (
|
|
1004
|
+
}, null, 8, ["loading", "size"])) : i.value === "emailCode" ? (c(), k(ct, {
|
|
1005
1005
|
key: 3,
|
|
1006
1006
|
loading: o.loading,
|
|
1007
1007
|
size: o.size,
|
|
1008
1008
|
onSubmit: a
|
|
1009
|
-
}, null, 8, ["loading", "size"])) : I("", !0), l.value ? N(
|
|
1009
|
+
}, null, 8, ["loading", "size"])) : I("", !0), l.value ? N(d.$slots, "OAuth", {
|
|
1010
1010
|
key: 4
|
|
1011
1011
|
}, void 0, !0) : I("", !0), s(ce, {
|
|
1012
1012
|
"show-sign-up": e.value.signUp.email || e.value.signUp.phone,
|
|
1013
1013
|
onSwitchSignUp: p,
|
|
1014
|
-
onSwitchResetPassword:
|
|
1014
|
+
onSwitchResetPassword: m
|
|
1015
1015
|
}, null, 8, ["show-sign-up"])]));
|
|
1016
1016
|
}
|
|
1017
1017
|
}), vt = /* @__PURE__ */ P(ft, [["__scopeId", "data-v-08b42828"]]), gt = {
|
|
@@ -1054,8 +1054,8 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1054
1054
|
required: !0,
|
|
1055
1055
|
message: "请输入确认密码"
|
|
1056
1056
|
}, {
|
|
1057
|
-
validator: (a,
|
|
1058
|
-
e.value.password && a !== e.value.password ?
|
|
1057
|
+
validator: (a, d) => {
|
|
1058
|
+
e.value.password && a !== e.value.password ? d("两次密码输入不一致") : d();
|
|
1059
1059
|
}
|
|
1060
1060
|
}];
|
|
1061
1061
|
function i() {
|
|
@@ -1065,15 +1065,15 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1065
1065
|
if (!await r.value.validateField(["phone"])) {
|
|
1066
1066
|
l.value = !0;
|
|
1067
1067
|
const {
|
|
1068
|
-
error:
|
|
1069
|
-
} = await
|
|
1068
|
+
error: d
|
|
1069
|
+
} = await O.verify.sms.send.post({
|
|
1070
1070
|
phone: e.value.phone,
|
|
1071
1071
|
purpose: "signUp"
|
|
1072
1072
|
});
|
|
1073
|
-
l.value = !1,
|
|
1073
|
+
l.value = !1, d || v.value.startCountFn();
|
|
1074
1074
|
}
|
|
1075
1075
|
}
|
|
1076
|
-
async function
|
|
1076
|
+
async function m() {
|
|
1077
1077
|
r.value.validate().then((a) => {
|
|
1078
1078
|
a || n("submit", {
|
|
1079
1079
|
type: "phone",
|
|
@@ -1084,7 +1084,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1084
1084
|
});
|
|
1085
1085
|
});
|
|
1086
1086
|
}
|
|
1087
|
-
return (a,
|
|
1087
|
+
return (a, d) => (c(), b("div", gt, [y("div", ht, [s(t(x), {
|
|
1088
1088
|
ref_key: "formRef",
|
|
1089
1089
|
ref: r,
|
|
1090
1090
|
model: e.value,
|
|
@@ -1105,7 +1105,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1105
1105
|
}, {
|
|
1106
1106
|
default: f(() => [s(t(V), {
|
|
1107
1107
|
modelValue: e.value.phone,
|
|
1108
|
-
"onUpdate:modelValue":
|
|
1108
|
+
"onUpdate:modelValue": d[0] || (d[0] = (w) => e.value.phone = w),
|
|
1109
1109
|
placeholder: "请输入手机号",
|
|
1110
1110
|
autocomplete: "tel",
|
|
1111
1111
|
type: "tel"
|
|
@@ -1122,7 +1122,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1122
1122
|
}, {
|
|
1123
1123
|
default: f(() => [y("div", yt, [s(t(V), {
|
|
1124
1124
|
modelValue: e.value.code,
|
|
1125
|
-
"onUpdate:modelValue":
|
|
1125
|
+
"onUpdate:modelValue": d[1] || (d[1] = (w) => e.value.code = w),
|
|
1126
1126
|
placeholder: "请输入验证码",
|
|
1127
1127
|
autocomplete: "one-time-code"
|
|
1128
1128
|
}, null, 8, ["modelValue"]), s(D, {
|
|
@@ -1136,7 +1136,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1136
1136
|
onSend: p
|
|
1137
1137
|
}, null, 8, ["size", "loading"])])]),
|
|
1138
1138
|
_: 1
|
|
1139
|
-
}), o.requirePassword ? (
|
|
1139
|
+
}), o.requirePassword ? (c(), k(t(A), {
|
|
1140
1140
|
key: 0,
|
|
1141
1141
|
field: "password",
|
|
1142
1142
|
label: "密码",
|
|
@@ -1151,13 +1151,13 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1151
1151
|
}, {
|
|
1152
1152
|
default: f(() => [s(t(V), {
|
|
1153
1153
|
modelValue: e.value.password,
|
|
1154
|
-
"onUpdate:modelValue":
|
|
1154
|
+
"onUpdate:modelValue": d[2] || (d[2] = (w) => e.value.password = w),
|
|
1155
1155
|
placeholder: "请输入密码(可选)",
|
|
1156
1156
|
type: "password",
|
|
1157
1157
|
autocomplete: "new-password"
|
|
1158
1158
|
}, null, 8, ["modelValue"])]),
|
|
1159
1159
|
_: 1
|
|
1160
|
-
}, 8, ["rules"])) : I("", !0), o.requirePassword && e.value.password ? (
|
|
1160
|
+
}, 8, ["rules"])) : I("", !0), o.requirePassword && e.value.password ? (c(), k(t(A), {
|
|
1161
1161
|
key: 1,
|
|
1162
1162
|
field: "confirmPassword",
|
|
1163
1163
|
label: "确认密码",
|
|
@@ -1166,7 +1166,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1166
1166
|
}, {
|
|
1167
1167
|
default: f(() => [s(t(V), {
|
|
1168
1168
|
modelValue: e.value.confirmPassword,
|
|
1169
|
-
"onUpdate:modelValue":
|
|
1169
|
+
"onUpdate:modelValue": d[3] || (d[3] = (w) => e.value.confirmPassword = w),
|
|
1170
1170
|
placeholder: "请输入确认密码",
|
|
1171
1171
|
type: "password",
|
|
1172
1172
|
autocomplete: "new-password"
|
|
@@ -1182,7 +1182,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1182
1182
|
}, {
|
|
1183
1183
|
default: f(() => [s(t(V), {
|
|
1184
1184
|
modelValue: e.value.referrerId,
|
|
1185
|
-
"onUpdate:modelValue":
|
|
1185
|
+
"onUpdate:modelValue": d[4] || (d[4] = (w) => e.value.referrerId = w),
|
|
1186
1186
|
placeholder: "邀请人ID(可选)",
|
|
1187
1187
|
autocomplete: "off"
|
|
1188
1188
|
}, null, 8, ["modelValue"])]),
|
|
@@ -1192,9 +1192,9 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1192
1192
|
loading: o.loading,
|
|
1193
1193
|
long: "",
|
|
1194
1194
|
size: o.size,
|
|
1195
|
-
onClick:
|
|
1195
|
+
onClick: m
|
|
1196
1196
|
}, {
|
|
1197
|
-
default: f(() => [...
|
|
1197
|
+
default: f(() => [...d[5] || (d[5] = [$(" 注册 ", -1)])]),
|
|
1198
1198
|
_: 1
|
|
1199
1199
|
}, 8, ["loading", "size"])])]),
|
|
1200
1200
|
_: 1
|
|
@@ -1241,7 +1241,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1241
1241
|
}), e = S("email");
|
|
1242
1242
|
ee(() => {
|
|
1243
1243
|
var p;
|
|
1244
|
-
r.value.some((
|
|
1244
|
+
r.value.some((m) => m.key === e.value) || (e.value = ((p = r.value[0]) == null ? void 0 : p.key) || "email");
|
|
1245
1245
|
});
|
|
1246
1246
|
function h() {
|
|
1247
1247
|
n("switchSignIn");
|
|
@@ -1252,11 +1252,11 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1252
1252
|
...p
|
|
1253
1253
|
});
|
|
1254
1254
|
}
|
|
1255
|
-
return (p,
|
|
1255
|
+
return (p, m) => (c(), b("div", St, [r.value.length > 1 ? (c(), b("div", kt, [s(t(oe), {
|
|
1256
1256
|
"active-key": e.value,
|
|
1257
|
-
"onUpdate:activeKey":
|
|
1257
|
+
"onUpdate:activeKey": m[0] || (m[0] = (a) => e.value = a)
|
|
1258
1258
|
}, {
|
|
1259
|
-
default: f(() => [(
|
|
1259
|
+
default: f(() => [(c(!0), b(G, null, te(r.value, (a) => (c(), k(t(se), {
|
|
1260
1260
|
key: a.key,
|
|
1261
1261
|
title: a.title
|
|
1262
1262
|
}, null, 8, ["title"]))), 128))]),
|
|
@@ -1266,18 +1266,18 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1266
1266
|
style: {
|
|
1267
1267
|
margin: "0"
|
|
1268
1268
|
}
|
|
1269
|
-
})])) : I("", !0), e.value === "email" && l.value.signUp.email ? (
|
|
1269
|
+
})])) : I("", !0), e.value === "email" && l.value.signUp.email ? (c(), k(we, {
|
|
1270
1270
|
key: 1,
|
|
1271
1271
|
size: o.size,
|
|
1272
1272
|
loading: g.loading,
|
|
1273
1273
|
onSubmit: i
|
|
1274
|
-
}, null, 8, ["size", "loading"])) : e.value === "phone" && l.value.signUp.phone ? (
|
|
1274
|
+
}, null, 8, ["size", "loading"])) : e.value === "phone" && l.value.signUp.phone ? (c(), k(bt, {
|
|
1275
1275
|
key: 2,
|
|
1276
1276
|
size: o.size,
|
|
1277
1277
|
loading: g.loading,
|
|
1278
1278
|
onSubmit: i,
|
|
1279
1279
|
onSwitchSignIn: h
|
|
1280
|
-
}, null, 8, ["size", "loading"])) : (
|
|
1280
|
+
}, null, 8, ["size", "loading"])) : (c(), b("div", It, " 当前应用未开放用户注册 ")), e.value === "email" ? (c(), k(ne, {
|
|
1281
1281
|
key: 4,
|
|
1282
1282
|
onSwitchSignIn: h
|
|
1283
1283
|
})) : I("", !0)]));
|
|
@@ -1307,20 +1307,20 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1307
1307
|
} = F(), {
|
|
1308
1308
|
appsData: r
|
|
1309
1309
|
} = H(), e = C(() => l.value === "signIn" ? `${r.value.name}登录` : l.value === "signUp" ? `${r.value.name}账号注册` : l.value === "resetPassword" ? `${r.value.name}密码重置` : "");
|
|
1310
|
-
return (h, i) => (
|
|
1310
|
+
return (h, i) => (c(), b("div", {
|
|
1311
1311
|
class: "Title",
|
|
1312
1312
|
style: Q({
|
|
1313
1313
|
fontSize: o,
|
|
1314
1314
|
lineHeight: v
|
|
1315
1315
|
})
|
|
1316
|
-
}, [t(r).applicationLogoUrl ? (
|
|
1316
|
+
}, [t(r).applicationLogoUrl ? (c(), b("img", {
|
|
1317
1317
|
key: 0,
|
|
1318
1318
|
src: t(r).applicationLogoUrl,
|
|
1319
1319
|
srcset: "",
|
|
1320
1320
|
style: Q({
|
|
1321
1321
|
width: n
|
|
1322
1322
|
})
|
|
1323
|
-
}, null, 12, At)) : I("", !0), y("span", null,
|
|
1323
|
+
}, null, 12, At)) : I("", !0), y("span", null, T(e.value), 1), N(h.$slots, "default", {}, void 0, !0)], 4));
|
|
1324
1324
|
}
|
|
1325
1325
|
}), pe = /* @__PURE__ */ P(Vt, [["__scopeId", "data-v-8ebe7939"]]), Ut = {
|
|
1326
1326
|
class: "Auth"
|
|
@@ -1350,25 +1350,25 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1350
1350
|
authSignInLoading: h,
|
|
1351
1351
|
authSignUpLoading: i,
|
|
1352
1352
|
resetPasswordLoading: p,
|
|
1353
|
-
switchSignUp:
|
|
1353
|
+
switchSignUp: m,
|
|
1354
1354
|
switchResetPassword: a,
|
|
1355
|
-
switchSignIn:
|
|
1355
|
+
switchSignIn: d
|
|
1356
1356
|
} = F();
|
|
1357
|
-
function
|
|
1357
|
+
function w() {
|
|
1358
1358
|
o("toPrivacyPolicy");
|
|
1359
1359
|
}
|
|
1360
|
-
function
|
|
1360
|
+
function _() {
|
|
1361
1361
|
o("toUserServiceAgreement");
|
|
1362
1362
|
}
|
|
1363
|
-
return (U, R) => (
|
|
1363
|
+
return (U, R) => (c(), b("div", Ut, [g.showTitle ? (c(), k(pe, {
|
|
1364
1364
|
key: 0,
|
|
1365
1365
|
size: 32,
|
|
1366
1366
|
"font-size": 20
|
|
1367
|
-
})) : I("", !0), y("div", $t, [t(e) === "signIn" ? (
|
|
1367
|
+
})) : I("", !0), y("div", $t, [t(e) === "signIn" ? (c(), k(vt, {
|
|
1368
1368
|
key: 0,
|
|
1369
1369
|
size: n.size,
|
|
1370
1370
|
loading: t(h),
|
|
1371
|
-
onSwitchSignUp: t(
|
|
1371
|
+
onSwitchSignUp: t(m),
|
|
1372
1372
|
onSwitchResetPassword: t(a),
|
|
1373
1373
|
onSubmit: R[0] || (R[0] = (q) => t(v)(q))
|
|
1374
1374
|
}, {
|
|
@@ -1376,21 +1376,21 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1376
1376
|
size: n.size
|
|
1377
1377
|
}, null, 8, ["size"])]),
|
|
1378
1378
|
_: 1
|
|
1379
|
-
}, 8, ["size", "loading", "onSwitchSignUp", "onSwitchResetPassword"])) : t(e) === "signUp" ? (
|
|
1379
|
+
}, 8, ["size", "loading", "onSwitchSignUp", "onSwitchResetPassword"])) : t(e) === "signUp" ? (c(), k(Pt, {
|
|
1380
1380
|
key: 1,
|
|
1381
1381
|
size: n.size,
|
|
1382
1382
|
loading: t(i),
|
|
1383
|
-
onSwitchSignIn: t(
|
|
1383
|
+
onSwitchSignIn: t(d),
|
|
1384
1384
|
onSubmit: R[1] || (R[1] = (q) => t(l)(q))
|
|
1385
|
-
}, null, 8, ["size", "loading", "onSwitchSignIn"])) : t(e) === "resetPassword" ? (
|
|
1385
|
+
}, null, 8, ["size", "loading", "onSwitchSignIn"])) : t(e) === "resetPassword" ? (c(), k(Ge, {
|
|
1386
1386
|
key: 2,
|
|
1387
1387
|
size: n.size,
|
|
1388
1388
|
loading: t(p),
|
|
1389
|
-
onSwitchSignIn: t(
|
|
1389
|
+
onSwitchSignIn: t(d),
|
|
1390
1390
|
onSubmit: R[2] || (R[2] = (q) => t(r)(q))
|
|
1391
1391
|
}, null, 8, ["size", "loading", "onSwitchSignIn"])) : I("", !0), s(We, {
|
|
1392
|
-
onToPrivacyPolicy:
|
|
1393
|
-
onToUserServiceAgreement:
|
|
1392
|
+
onToPrivacyPolicy: w,
|
|
1393
|
+
onToUserServiceAgreement: _
|
|
1394
1394
|
})])]));
|
|
1395
1395
|
}
|
|
1396
1396
|
}), Rt = /* @__PURE__ */ P(Ct, [["__scopeId", "data-v-859909ca"]]), qt = /* @__PURE__ */ z({
|
|
@@ -1422,7 +1422,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1422
1422
|
function h() {
|
|
1423
1423
|
l(), n("close");
|
|
1424
1424
|
}
|
|
1425
|
-
return (i, p) => (
|
|
1425
|
+
return (i, p) => (c(), k(t(fe), {
|
|
1426
1426
|
visible: t(v),
|
|
1427
1427
|
footer: !1,
|
|
1428
1428
|
"mask-closable": !1,
|
|
@@ -1437,13 +1437,13 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1437
1437
|
default: f(() => [s(Rt, {
|
|
1438
1438
|
"show-title": !1,
|
|
1439
1439
|
size: g.size,
|
|
1440
|
-
onToPrivacyPolicy: p[0] || (p[0] = (
|
|
1441
|
-
onToUserServiceAgreement: p[1] || (p[1] = (
|
|
1440
|
+
onToPrivacyPolicy: p[0] || (p[0] = (m) => n("toPrivacyPolicy")),
|
|
1441
|
+
onToUserServiceAgreement: p[1] || (p[1] = (m) => n("toUserServiceAgreement"))
|
|
1442
1442
|
}, null, 8, ["size"])]),
|
|
1443
1443
|
_: 1
|
|
1444
1444
|
}, 8, ["visible"]));
|
|
1445
1445
|
}
|
|
1446
|
-
}), Bt = /* @__PURE__ */ P(qt, [["__scopeId", "data-v-e2b88450"]]),
|
|
1446
|
+
}), Bt = /* @__PURE__ */ P(qt, [["__scopeId", "data-v-e2b88450"]]), Ot = /* @__PURE__ */ z({
|
|
1447
1447
|
__name: "AuthkitOAuthCallbackProvider",
|
|
1448
1448
|
props: {
|
|
1449
1449
|
bindIdentityRedirect: {
|
|
@@ -1468,7 +1468,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1468
1468
|
return n.some((p) => i.searchParams.has(p));
|
|
1469
1469
|
}
|
|
1470
1470
|
function r(i) {
|
|
1471
|
-
n.forEach((
|
|
1471
|
+
n.forEach((m) => i.searchParams.delete(m));
|
|
1472
1472
|
const p = `${i.pathname}${i.search}${i.hash}`;
|
|
1473
1473
|
window.history.replaceState({}, "", p);
|
|
1474
1474
|
}
|
|
@@ -1493,20 +1493,20 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1493
1493
|
r(i), await v(), Z.success(U ? `${U} 绑定成功` : "绑定成功"), u.closePopupOnBindSuccess && window.opener && setTimeout(() => window.close(), 800);
|
|
1494
1494
|
return;
|
|
1495
1495
|
}
|
|
1496
|
-
const
|
|
1497
|
-
if (!
|
|
1498
|
-
const a = i.searchParams.get("userId"),
|
|
1496
|
+
const m = i.searchParams.get("token");
|
|
1497
|
+
if (!m) return;
|
|
1498
|
+
const a = i.searchParams.get("userId"), d = i.searchParams.get("appId"), w = i.searchParams.get("needBindIdentity") === "true";
|
|
1499
1499
|
if (r(i), o({
|
|
1500
|
-
jwtToken:
|
|
1500
|
+
jwtToken: m,
|
|
1501
1501
|
userId: a,
|
|
1502
|
-
appId:
|
|
1503
|
-
needBindIdentity:
|
|
1504
|
-
}), await v(),
|
|
1502
|
+
appId: d,
|
|
1503
|
+
needBindIdentity: w
|
|
1504
|
+
}), await v(), w && u.bindIdentityRedirect) {
|
|
1505
1505
|
window.location.href = u.bindIdentityRedirect;
|
|
1506
1506
|
return;
|
|
1507
1507
|
}
|
|
1508
|
-
const
|
|
1509
|
-
|
|
1508
|
+
const _ = e();
|
|
1509
|
+
_ && (window.location.href = _);
|
|
1510
1510
|
}
|
|
1511
1511
|
return j(() => {
|
|
1512
1512
|
h();
|
|
@@ -1555,34 +1555,37 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1555
1555
|
n.config && he(n.config);
|
|
1556
1556
|
const {
|
|
1557
1557
|
restoreSession: v,
|
|
1558
|
-
onSignIn: l
|
|
1558
|
+
onSignIn: l,
|
|
1559
|
+
onSignOut: r
|
|
1559
1560
|
} = F(), {
|
|
1560
|
-
fetchUserProfile:
|
|
1561
|
-
clearUserProfile:
|
|
1561
|
+
fetchUserProfile: e,
|
|
1562
|
+
clearUserProfile: h
|
|
1562
1563
|
} = J(), {
|
|
1563
|
-
appsAuthPageInfoApi:
|
|
1564
|
-
} = H(),
|
|
1565
|
-
|
|
1564
|
+
appsAuthPageInfoApi: i
|
|
1565
|
+
} = H(), p = l(() => {
|
|
1566
|
+
e();
|
|
1567
|
+
}), m = r(() => {
|
|
1568
|
+
h();
|
|
1566
1569
|
});
|
|
1567
1570
|
return j(async () => {
|
|
1568
|
-
n.fetchAppInfo && await
|
|
1571
|
+
n.fetchAppInfo && await i(), n.restoreSession && v() ? e() : h();
|
|
1569
1572
|
}), ie(() => {
|
|
1570
|
-
|
|
1571
|
-
}), (
|
|
1573
|
+
p(), m();
|
|
1574
|
+
}), (a, d) => (c(), b(G, null, [N(a.$slots, "default"), n.handleOAuthCallback ? (c(), k(Ot, {
|
|
1572
1575
|
key: 0,
|
|
1573
1576
|
"bind-identity-redirect": n.bindIdentityRedirect,
|
|
1574
1577
|
"close-popup-on-bind-success": n.closePopupOnBindSuccess,
|
|
1575
1578
|
"restore-redirect-after-sign-in": n.restoreRedirectAfterSignIn
|
|
1576
|
-
}, null, 8, ["bind-identity-redirect", "close-popup-on-bind-success", "restore-redirect-after-sign-in"])) : I("", !0), n.showAuthModal ? (
|
|
1579
|
+
}, null, 8, ["bind-identity-redirect", "close-popup-on-bind-success", "restore-redirect-after-sign-in"])) : I("", !0), n.showAuthModal ? (c(), k(Bt, {
|
|
1577
1580
|
key: 1,
|
|
1578
1581
|
size: n.authModalSize,
|
|
1579
|
-
onToPrivacyPolicy:
|
|
1580
|
-
onToUserServiceAgreement:
|
|
1582
|
+
onToPrivacyPolicy: d[0] || (d[0] = (w) => o("toPrivacyPolicy")),
|
|
1583
|
+
onToUserServiceAgreement: d[1] || (d[1] = (w) => o("toUserServiceAgreement"))
|
|
1581
1584
|
}, null, 8, ["size"])) : I("", !0)], 64));
|
|
1582
1585
|
}
|
|
1583
|
-
}),
|
|
1586
|
+
}), Tt = {
|
|
1584
1587
|
class: "header"
|
|
1585
|
-
},
|
|
1588
|
+
}, xt = ["href"], Lt = {
|
|
1586
1589
|
class: "container"
|
|
1587
1590
|
}, Mt = /* @__PURE__ */ z({
|
|
1588
1591
|
__name: "AuthkitAuthContainer",
|
|
@@ -1632,10 +1635,10 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1632
1635
|
} : {
|
|
1633
1636
|
backgroundImage: `url(${u.backgroundImage})`
|
|
1634
1637
|
});
|
|
1635
|
-
return (o, v) => (
|
|
1638
|
+
return (o, v) => (c(), b("div", {
|
|
1636
1639
|
class: "auth",
|
|
1637
1640
|
style: Q(n.value)
|
|
1638
|
-
}, [y("div",
|
|
1641
|
+
}, [y("div", Tt, [u.name ? (c(), b("a", {
|
|
1639
1642
|
key: 0,
|
|
1640
1643
|
href: u.appHomePage,
|
|
1641
1644
|
target: "_self",
|
|
@@ -1643,7 +1646,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1643
1646
|
style: Q({
|
|
1644
1647
|
color: u.linkColor
|
|
1645
1648
|
})
|
|
1646
|
-
}, " 返回主页 ", 12,
|
|
1649
|
+
}, " 返回主页 ", 12, xt)) : I("", !0)]), y("div", Lt, [N(o.$slots, "default", {}, void 0, !0)])], 4));
|
|
1647
1650
|
}
|
|
1648
1651
|
}), Ai = /* @__PURE__ */ P(Mt, [["__scopeId", "data-v-0e13d3ff"]]), Ft = {
|
|
1649
1652
|
class: "box"
|
|
@@ -1717,7 +1720,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1717
1720
|
async function v() {
|
|
1718
1721
|
const {
|
|
1719
1722
|
data: r
|
|
1720
|
-
} = await
|
|
1723
|
+
} = await O.apps.authPageInfo.post({});
|
|
1721
1724
|
r && (o.value = {
|
|
1722
1725
|
appKey: "",
|
|
1723
1726
|
name: r.name,
|
|
@@ -1731,7 +1734,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1731
1734
|
u.value = !0;
|
|
1732
1735
|
const {
|
|
1733
1736
|
data: r
|
|
1734
|
-
} = await
|
|
1737
|
+
} = await O.oauth2.authorize.post({
|
|
1735
1738
|
client_id: n.clientId,
|
|
1736
1739
|
response_type: n.responseType,
|
|
1737
1740
|
scope: n.scope,
|
|
@@ -1740,7 +1743,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1740
1743
|
});
|
|
1741
1744
|
u.value = !1, r && (window.location = r.authorizeUrl);
|
|
1742
1745
|
}
|
|
1743
|
-
return (r, e) => (
|
|
1746
|
+
return (r, e) => (c(), b("div", Ft, [y("div", Ht, T(`授权 ${o.value.name}`), 1), y("div", Dt, [s(t(ve), null, {
|
|
1744
1747
|
default: f(() => [s(t(X), null, {
|
|
1745
1748
|
default: f(() => {
|
|
1746
1749
|
var h;
|
|
@@ -1805,7 +1808,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1805
1808
|
_: 1
|
|
1806
1809
|
}, 8, ["size", "loading"]), y("div", Et, [e[3] || (e[3] = y("div", {
|
|
1807
1810
|
class: "redirect-hint"
|
|
1808
|
-
}, "授权后将跳转至", -1)), y("div", Gt,
|
|
1811
|
+
}, "授权后将跳转至", -1)), y("div", Gt, T(o.value.authorizationCallback), 1)])])]));
|
|
1809
1812
|
}
|
|
1810
1813
|
}), Vi = /* @__PURE__ */ P(Nt, [["__scopeId", "data-v-64edc8c9"]]), jt = {
|
|
1811
1814
|
class: "oauth-callback"
|
|
@@ -1836,9 +1839,9 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1836
1839
|
fetchUserProfile: i
|
|
1837
1840
|
} = J();
|
|
1838
1841
|
async function p() {
|
|
1839
|
-
const a = new URLSearchParams(window.location.search),
|
|
1840
|
-
if (
|
|
1841
|
-
l.value =
|
|
1842
|
+
const a = new URLSearchParams(window.location.search), d = a.get("error");
|
|
1843
|
+
if (d) {
|
|
1844
|
+
l.value = d, v.value = !1, o("error", l.value);
|
|
1842
1845
|
return;
|
|
1843
1846
|
}
|
|
1844
1847
|
if (a.get("bindSuccess") === "true") {
|
|
@@ -1847,22 +1850,22 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1847
1850
|
}, 800);
|
|
1848
1851
|
return;
|
|
1849
1852
|
}
|
|
1850
|
-
const
|
|
1851
|
-
if (!
|
|
1853
|
+
const w = a.get("token"), _ = a.get("userId"), U = a.get("appId"), R = a.get("needBindIdentity") === "true";
|
|
1854
|
+
if (!w) {
|
|
1852
1855
|
l.value = "登录失败:未收到认证令牌", v.value = !1, o("error", l.value);
|
|
1853
1856
|
return;
|
|
1854
1857
|
}
|
|
1855
1858
|
try {
|
|
1856
1859
|
e({
|
|
1857
|
-
jwtToken:
|
|
1858
|
-
userId:
|
|
1860
|
+
jwtToken: w,
|
|
1861
|
+
userId: _,
|
|
1859
1862
|
appId: U,
|
|
1860
1863
|
needBindIdentity: R
|
|
1861
1864
|
}), await i();
|
|
1862
1865
|
const q = window.location.pathname;
|
|
1863
1866
|
if (window.history.replaceState({}, "", q), R && (o("needBindIdentity", {
|
|
1864
|
-
token:
|
|
1865
|
-
userId:
|
|
1867
|
+
token: w,
|
|
1868
|
+
userId: _ || "",
|
|
1866
1869
|
appId: U || ""
|
|
1867
1870
|
}), n.bindIdentityRedirect)) {
|
|
1868
1871
|
v.value = !1, setTimeout(() => {
|
|
@@ -1871,8 +1874,8 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1871
1874
|
return;
|
|
1872
1875
|
}
|
|
1873
1876
|
o("success", {
|
|
1874
|
-
token:
|
|
1875
|
-
userId:
|
|
1877
|
+
token: w,
|
|
1878
|
+
userId: _ || "",
|
|
1876
1879
|
appId: U || "",
|
|
1877
1880
|
needBindIdentity: R
|
|
1878
1881
|
});
|
|
@@ -1886,7 +1889,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1886
1889
|
console.error("OAuth 回调处理失败:", q), l.value = "登录处理失败,请重试", v.value = !1, o("error", l.value);
|
|
1887
1890
|
}
|
|
1888
1891
|
}
|
|
1889
|
-
function
|
|
1892
|
+
function m() {
|
|
1890
1893
|
const a = sessionStorage.getItem("auth_redirect");
|
|
1891
1894
|
sessionStorage.removeItem("auth_redirect"), window.location.href = a || n.defaultRedirect || "/";
|
|
1892
1895
|
}
|
|
@@ -1895,20 +1898,20 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1895
1898
|
if (a.has("token") || a.has("error") || a.has("bindSuccess"))
|
|
1896
1899
|
p();
|
|
1897
1900
|
else if (h()) {
|
|
1898
|
-
const
|
|
1899
|
-
sessionStorage.removeItem("auth_redirect"), window.location.href =
|
|
1901
|
+
const d = sessionStorage.getItem("auth_redirect");
|
|
1902
|
+
sessionStorage.removeItem("auth_redirect"), window.location.href = d || n.defaultRedirect || "/";
|
|
1900
1903
|
} else
|
|
1901
1904
|
l.value = "无效的访问", v.value = !1;
|
|
1902
|
-
}), (a,
|
|
1905
|
+
}), (a, d) => (c(), b("div", jt, [v.value ? (c(), b("div", Kt, [d[0] || (d[0] = y("div", {
|
|
1903
1906
|
class: "spinner"
|
|
1904
|
-
}, null, -1)), y("p", null,
|
|
1907
|
+
}, null, -1)), y("p", null, T(g.loadingText), 1)])) : l.value ? (c(), b("div", Wt, [d[1] || (d[1] = y("div", {
|
|
1905
1908
|
class: "error-icon"
|
|
1906
|
-
}, "✕", -1)),
|
|
1909
|
+
}, "✕", -1)), d[2] || (d[2] = y("h2", null, "登录失败", -1)), y("p", null, T(l.value), 1), y("button", {
|
|
1907
1910
|
class: "retry-btn",
|
|
1908
|
-
onClick:
|
|
1909
|
-
}, "返回重试")])) : (
|
|
1911
|
+
onClick: m
|
|
1912
|
+
}, "返回重试")])) : (c(), b("div", Qt, [d[3] || (d[3] = y("div", {
|
|
1910
1913
|
class: "success-icon"
|
|
1911
|
-
}, "✓", -1)), y("p", null,
|
|
1914
|
+
}, "✓", -1)), y("p", null, T(r.value), 1)]))]));
|
|
1912
1915
|
}
|
|
1913
1916
|
}), Ui = /* @__PURE__ */ P(Jt, [["__scopeId", "data-v-4b4b59a1"]]), Xt = {
|
|
1914
1917
|
class: "BindEmail"
|
|
@@ -1953,7 +1956,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1953
1956
|
l.value = !0;
|
|
1954
1957
|
const {
|
|
1955
1958
|
data: a
|
|
1956
|
-
} = await
|
|
1959
|
+
} = await O.verify.email.retry.post({
|
|
1957
1960
|
email: e.value.email,
|
|
1958
1961
|
purpose: "bindEmail"
|
|
1959
1962
|
});
|
|
@@ -1961,8 +1964,8 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1961
1964
|
}
|
|
1962
1965
|
}
|
|
1963
1966
|
async function i() {
|
|
1964
|
-
r.value.validate().then((
|
|
1965
|
-
|
|
1967
|
+
r.value.validate().then((m) => {
|
|
1968
|
+
m || n("submit", {
|
|
1966
1969
|
email: e.value.email,
|
|
1967
1970
|
userToken: e.value.userToken,
|
|
1968
1971
|
emailVerifyId: e.value.emailVerifyId
|
|
@@ -1972,13 +1975,13 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1972
1975
|
function p() {
|
|
1973
1976
|
n("skip");
|
|
1974
1977
|
}
|
|
1975
|
-
return (
|
|
1978
|
+
return (m, a) => (c(), b("div", Xt, [a[4] || (a[4] = y("div", {
|
|
1976
1979
|
class: "header"
|
|
1977
1980
|
}, [y("h3", {
|
|
1978
1981
|
class: "title"
|
|
1979
1982
|
}, "绑定邮箱"), y("p", {
|
|
1980
1983
|
class: "subtitle"
|
|
1981
|
-
}, "请绑定邮箱以完成账号设置,绑定后可使用邮箱登录")], -1)), y("div", Yt, [s(t(
|
|
1984
|
+
}, "请绑定邮箱以完成账号设置,绑定后可使用邮箱登录")], -1)), y("div", Yt, [s(t(x), {
|
|
1982
1985
|
ref_key: "formRef",
|
|
1983
1986
|
ref: r,
|
|
1984
1987
|
model: e.value,
|
|
@@ -1999,7 +2002,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
1999
2002
|
}, {
|
|
2000
2003
|
default: f(() => [s(t(V), {
|
|
2001
2004
|
modelValue: e.value.email,
|
|
2002
|
-
"onUpdate:modelValue": a[0] || (a[0] = (
|
|
2005
|
+
"onUpdate:modelValue": a[0] || (a[0] = (d) => e.value.email = d),
|
|
2003
2006
|
placeholder: "请输入邮箱",
|
|
2004
2007
|
autocomplete: "email",
|
|
2005
2008
|
type: "email"
|
|
@@ -2016,7 +2019,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
2016
2019
|
}, {
|
|
2017
2020
|
default: f(() => [y("div", Zt, [s(t(V), {
|
|
2018
2021
|
modelValue: e.value.userToken,
|
|
2019
|
-
"onUpdate:modelValue": a[1] || (a[1] = (
|
|
2022
|
+
"onUpdate:modelValue": a[1] || (a[1] = (d) => e.value.userToken = d),
|
|
2020
2023
|
placeholder: "请输入验证码",
|
|
2021
2024
|
autocomplete: "one-time-code"
|
|
2022
2025
|
}, null, 8, ["modelValue"]), s(D, {
|
|
@@ -2041,7 +2044,7 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
2041
2044
|
_: 1
|
|
2042
2045
|
}, 8, ["loading", "size"])])]),
|
|
2043
2046
|
_: 1
|
|
2044
|
-
}, 8, ["model", "size"])]), o.showSkip ? (
|
|
2047
|
+
}, 8, ["model", "size"])]), o.showSkip ? (c(), b("div", ti, [s(t(M), {
|
|
2045
2048
|
onClick: p
|
|
2046
2049
|
}, {
|
|
2047
2050
|
default: f(() => [...a[3] || (a[3] = [$("稍后绑定", -1)])]),
|
|
@@ -2069,88 +2072,88 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
2069
2072
|
} = J(), o = S("hidden"), v = S(!1);
|
|
2070
2073
|
let l;
|
|
2071
2074
|
const r = g, e = C(() => {
|
|
2072
|
-
var
|
|
2073
|
-
return ((
|
|
2075
|
+
var w, _, U;
|
|
2076
|
+
return ((_ = (w = u.value) == null ? void 0 : w.github) == null ? void 0 : _.avatar_url) || ((U = u.value) == null ? void 0 : U.avatar) || "";
|
|
2074
2077
|
}), {
|
|
2075
2078
|
getOauthCallbackUrl: h
|
|
2076
2079
|
} = ue();
|
|
2077
|
-
function i(
|
|
2078
|
-
o.value =
|
|
2080
|
+
function i(w) {
|
|
2081
|
+
o.value = w;
|
|
2079
2082
|
}
|
|
2080
2083
|
async function p() {
|
|
2081
|
-
const
|
|
2082
|
-
if (!
|
|
2084
|
+
const w = ye.appId;
|
|
2085
|
+
if (!w) {
|
|
2083
2086
|
console.error("GitHub OAuth 失败: appId 未配置");
|
|
2084
2087
|
return;
|
|
2085
2088
|
}
|
|
2086
2089
|
const {
|
|
2087
|
-
data:
|
|
2088
|
-
} = await
|
|
2089
|
-
appId:
|
|
2090
|
+
data: _
|
|
2091
|
+
} = await O.oauth.github.login.get({
|
|
2092
|
+
appId: w,
|
|
2090
2093
|
mode: "bind",
|
|
2091
2094
|
redirectUri: h()
|
|
2092
2095
|
});
|
|
2093
|
-
if (
|
|
2096
|
+
if (_) {
|
|
2094
2097
|
const {
|
|
2095
2098
|
redirectUri: U
|
|
2096
|
-
} =
|
|
2099
|
+
} = _;
|
|
2097
2100
|
v.value = !0, window.open(U, "_blank");
|
|
2098
2101
|
}
|
|
2099
2102
|
}
|
|
2100
|
-
async function
|
|
2103
|
+
async function m() {
|
|
2101
2104
|
const {
|
|
2102
|
-
error:
|
|
2103
|
-
} = await
|
|
2105
|
+
error: w
|
|
2106
|
+
} = await O.users.unbind.oauth.post({
|
|
2104
2107
|
provider: "github"
|
|
2105
2108
|
});
|
|
2106
|
-
|
|
2109
|
+
w || (Z.success("解绑成功"), o.value = "hidden", n());
|
|
2107
2110
|
}
|
|
2108
2111
|
function a() {
|
|
2109
|
-
o.value === "bind" && (o.value = "hidden", p()), o.value === "unbind" &&
|
|
2112
|
+
o.value === "bind" && (o.value = "hidden", p()), o.value === "unbind" && m();
|
|
2110
2113
|
}
|
|
2111
|
-
function
|
|
2114
|
+
function d() {
|
|
2112
2115
|
v.value && n();
|
|
2113
2116
|
}
|
|
2114
2117
|
return j(() => {
|
|
2115
|
-
u.value || n(), l = setInterval(
|
|
2118
|
+
u.value || n(), l = setInterval(d, 1e3);
|
|
2116
2119
|
}), ie(() => {
|
|
2117
2120
|
l && clearInterval(l);
|
|
2118
|
-
}), (
|
|
2121
|
+
}), (w, _) => {
|
|
2119
2122
|
var U, R, q;
|
|
2120
|
-
return
|
|
2123
|
+
return c(), b(G, null, [!((U = t(u)) != null && U.github) && o.value === "hidden" ? (c(), k(t(le), {
|
|
2121
2124
|
key: 0,
|
|
2122
2125
|
title: "绑定GitHub"
|
|
2123
2126
|
}, {
|
|
2124
2127
|
action: f(() => [s(t(B), {
|
|
2125
2128
|
size: r.size,
|
|
2126
2129
|
type: "primary",
|
|
2127
|
-
onClick:
|
|
2130
|
+
onClick: _[0] || (_[0] = (L) => i("bind"))
|
|
2128
2131
|
}, {
|
|
2129
|
-
default: f(() => [...
|
|
2132
|
+
default: f(() => [..._[2] || (_[2] = [$(" 绑定GitHub ", -1)])]),
|
|
2130
2133
|
_: 1
|
|
2131
2134
|
}, 8, ["size"])]),
|
|
2132
|
-
default: f(() => [
|
|
2135
|
+
default: f(() => [_[3] || (_[3] = $(" 您还未绑定GitHub账号,请点击绑定。 ", -1))]),
|
|
2133
2136
|
_: 1
|
|
2134
|
-
})) : I("", !0), (R = t(u)) != null && R.github && o.value === "hidden" ? (
|
|
2137
|
+
})) : I("", !0), (R = t(u)) != null && R.github && o.value === "hidden" ? (c(), k(t(le), {
|
|
2135
2138
|
key: 1,
|
|
2136
2139
|
title: "解绑GitHub"
|
|
2137
2140
|
}, {
|
|
2138
2141
|
action: f(() => [s(t(B), {
|
|
2139
2142
|
size: r.size,
|
|
2140
2143
|
type: "primary",
|
|
2141
|
-
onClick:
|
|
2144
|
+
onClick: _[1] || (_[1] = (L) => i("unbind"))
|
|
2142
2145
|
}, {
|
|
2143
|
-
default: f(() => [...
|
|
2146
|
+
default: f(() => [..._[5] || (_[5] = [$(" 解绑GitHub ", -1)])]),
|
|
2144
2147
|
_: 1
|
|
2145
2148
|
}, 8, ["size"])]),
|
|
2146
2149
|
default: f(() => {
|
|
2147
2150
|
var L, K;
|
|
2148
|
-
return [y("div", oi, [e.value ? (
|
|
2151
|
+
return [y("div", oi, [e.value ? (c(), k(t(E), {
|
|
2149
2152
|
key: 0,
|
|
2150
2153
|
class: "oauth-binding-account__avatar",
|
|
2151
2154
|
"image-url": e.value,
|
|
2152
2155
|
size: 42
|
|
2153
|
-
}, null, 8, ["image-url"])) : (
|
|
2156
|
+
}, null, 8, ["image-url"])) : (c(), k(t(E), {
|
|
2154
2157
|
key: 1,
|
|
2155
2158
|
class: "oauth-binding-account__avatar oauth-binding-account__avatar--placeholder",
|
|
2156
2159
|
size: 42
|
|
@@ -2160,12 +2163,12 @@ const Se = ["title", "aria-label"], ke = /* @__PURE__ */ z({
|
|
|
2160
2163
|
width: 22
|
|
2161
2164
|
})]),
|
|
2162
2165
|
_: 1
|
|
2163
|
-
})), y("div", si, [
|
|
2166
|
+
})), y("div", si, [_[4] || (_[4] = y("div", {
|
|
2164
2167
|
class: "oauth-binding-account__provider"
|
|
2165
|
-
}, "GitHub", -1)), y("div", ai,
|
|
2168
|
+
}, "GitHub", -1)), y("div", ai, T(((K = (L = t(u)) == null ? void 0 : L.github) == null ? void 0 : K.login) || "GitHub"), 1)])])];
|
|
2166
2169
|
}),
|
|
2167
2170
|
_: 1
|
|
2168
|
-
})) : I("", !0), o.value === "bind" || o.value === "unbind" ? (
|
|
2171
|
+
})) : I("", !0), o.value === "bind" || o.value === "unbind" ? (c(), k(_e, {
|
|
2169
2172
|
key: 2,
|
|
2170
2173
|
size: r.size,
|
|
2171
2174
|
email: (q = t(u)) == null ? void 0 : q.email,
|
|
@@ -2180,7 +2183,7 @@ export {
|
|
|
2180
2183
|
Ye as P,
|
|
2181
2184
|
Ge as R,
|
|
2182
2185
|
We as S,
|
|
2183
|
-
|
|
2186
|
+
Ot as _,
|
|
2184
2187
|
Ai as a,
|
|
2185
2188
|
Bt as b,
|
|
2186
2189
|
pe as c,
|
|
@@ -2190,7 +2193,7 @@ export {
|
|
|
2190
2193
|
Ui as g,
|
|
2191
2194
|
Ve as h,
|
|
2192
2195
|
qe as i,
|
|
2193
|
-
|
|
2196
|
+
xe as j,
|
|
2194
2197
|
Pi as k,
|
|
2195
2198
|
vt as l,
|
|
2196
2199
|
lt as m,
|