@huyooo/ui 2.2.7 → 3.0.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/{AuthkitAppSetting-K0qhtQoU.js → AuthkitAppSetting-DhLRYlL_.js} +95 -89
- package/dist/{FeedbackModal.vue_vue_type_script_setup_true_lang-hbfe8U5u.js → FeedbackModal.vue_vue_type_script_setup_true_lang-BXqxUXuu.js} +1 -1
- package/dist/{LegalDocViewer-C6yZJ_kH.js → LegalDocViewer-DkVW9tCh.js} +618 -621
- package/dist/{PricingPlans-BKbMjHaY.js → PricingPlans-BhcDv8uk.js} +2 -2
- package/dist/{ReferrerReferees-BQ0_OW74.js → ReferrerReferees-QTZnOCJB.js} +1 -1
- package/dist/{UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-K5_YUkGs.js → UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-BQgy_CeZ.js} +4 -4
- package/dist/{WidthContainer-ummelwr_.js → WidthContainer-BEeYYOat.js} +4 -4
- package/dist/authkit.js +5 -5
- package/dist/common.js +1 -1
- package/dist/composables/Authkit/oauthCallback.d.ts +1 -1
- package/dist/composables/Authkit/useAuthkitAuth.d.ts +14 -3
- package/dist/composables.js +4 -4
- package/dist/feedback.js +1 -1
- package/dist/main.js +12 -12
- package/dist/pay.js +2 -2
- package/dist/referrer.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/api/auth.generated.d.ts +23 -0
- package/dist/useAuthkitAuth-CO61XogP.js +295 -0
- package/dist/{useAuthkitUsersProfile-DyjCmUka.js → useAuthkitUsersProfile-CF7t2Y7T.js} +1 -1
- package/dist/{useEnsureAuthenticated-CpZcAqLg.js → useEnsureAuthenticated-Q7EHguY4.js} +1 -1
- package/dist/{useRoutePermission-BCXxvMoU.js → useRoutePermission-Bvn-J8bp.js} +1 -1
- package/dist/{useSubscriptionCheckout-D8W6v3YG.js → useSubscriptionCheckout-Bic8vKgm.js} +1 -1
- package/dist/user.js +1 -1
- package/package.json +1 -1
- package/dist/useAuthkitAuth-HqXgYzfZ.js +0 -273
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { defineComponent as V, computed as $, openBlock as o, createElementBlock as S, normalizeStyle as G, normalizeClass as ye, renderSlot as Z, createBlock as z, unref as e, createCommentVNode as I, createElementVNode as _, ref as A, createVNode as i, withCtx as
|
|
2
|
-
import { useRouter as
|
|
1
|
+
import { defineComponent as V, computed as $, openBlock as o, createElementBlock as S, normalizeStyle as G, normalizeClass as ye, renderSlot as Z, createBlock as z, unref as e, createCommentVNode as I, createElementVNode as _, ref as A, createVNode as i, withCtx as p, createTextVNode as q, watchEffect as re, Fragment as D, renderList as ue, useModel as Ue, watch as we, toDisplayString as M, mergeModels as $e, useSlots as Re, onMounted as H, onUnmounted as de, Teleport as Te } from "vue";
|
|
2
|
+
import { useRouter as be, useRoute as qe } from "vue-router";
|
|
3
3
|
/* empty css */
|
|
4
4
|
/* empty css */
|
|
5
5
|
import "./userMenuModal-D-nDaYqM.js";
|
|
6
|
-
import { Message as
|
|
7
|
-
import { a as F, u as N } from "./useAuthkitAuth-
|
|
6
|
+
import { Message as oe, Form as E, FormItem as P, Input as C, Button as x, Link as Y, Tabs as ce, TabPane as pe, Checkbox as Oe, Modal as Le, List as xe, ListItem as le, ListItemMeta as ne, Avatar as se, Alert as ve, Spin as Be, Empty as Me } from "@arco-design/web-vue";
|
|
7
|
+
import { a as F, u as N } from "./useAuthkitAuth-CO61XogP.js";
|
|
8
8
|
import { g as B, u as _e } from "./apiClients-8_c5cDW5.js";
|
|
9
9
|
import { u as j } from "./useAuthkitAppsAuthPageInfo-mv7hOnhi.js";
|
|
10
|
-
import { o as ge, j as Fe, k as he, l as ke, u as De, m as He, n as X, p as Ee, i as Se, S as K, q as W, r as ze, s as Ie, t as
|
|
10
|
+
import { o as ge, j as Fe, k as he, l as ke, u as De, m as He, n as X, p as Ee, i as Se, S as K, q as W, r as ze, s as Ie, t as te, v as Ge, w as Ne, b as je } from "./AuthkitAppSetting-DhLRYlL_.js";
|
|
11
11
|
import { _ as U } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
12
12
|
/* empty css */
|
|
13
13
|
import "./index-D9YtlhTa.js";
|
|
14
14
|
/* empty css */
|
|
15
15
|
import { u as Ae, L as Ke, i as We } from "./useLegalDocs-DUbab5R9.js";
|
|
16
16
|
import { u as me, g as Je } from "./runtime-CDEl4QQl.js";
|
|
17
|
-
import { u as Pe } from "./useAuthkitUsersProfile-
|
|
17
|
+
import { u as Pe } from "./useAuthkitUsersProfile-CF7t2Y7T.js";
|
|
18
18
|
/* empty css */
|
|
19
19
|
/* empty css */
|
|
20
20
|
import "./CustomTable-B1KjkixL.js";
|
|
@@ -48,14 +48,14 @@ const Ze = ["title", "aria-label", "disabled"], et = {
|
|
|
48
48
|
default: !1
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
|
-
setup(
|
|
52
|
-
const u =
|
|
51
|
+
setup(y) {
|
|
52
|
+
const u = y, l = $(() => ({
|
|
53
53
|
width: `${he}px`,
|
|
54
54
|
height: `${he}px`,
|
|
55
55
|
padding: `${Fe}px`,
|
|
56
56
|
"--oauth-icon-size": `${ge}px`
|
|
57
57
|
}));
|
|
58
|
-
return (
|
|
58
|
+
return (n, g) => (o(), S("button", {
|
|
59
59
|
class: ye(["OAuthItem", {
|
|
60
60
|
"OAuthItem--loading": u.loading
|
|
61
61
|
}]),
|
|
@@ -63,8 +63,8 @@ const Ze = ["title", "aria-label", "disabled"], et = {
|
|
|
63
63
|
title: u.label,
|
|
64
64
|
"aria-label": u.label,
|
|
65
65
|
disabled: u.disabled || u.loading,
|
|
66
|
-
style: G(
|
|
67
|
-
}, [u.loading ? (o(), S("span", et)) : Z(
|
|
66
|
+
style: G(l.value)
|
|
67
|
+
}, [u.loading ? (o(), S("span", et)) : Z(n.$slots, "icon", {
|
|
68
68
|
key: 1
|
|
69
69
|
}, () => [u.icon ? (o(), z(ke, {
|
|
70
70
|
key: 0,
|
|
@@ -86,81 +86,81 @@ const Ze = ["title", "aria-label", "disabled"], et = {
|
|
|
86
86
|
}
|
|
87
87
|
},
|
|
88
88
|
emits: ["passkeySubmit"],
|
|
89
|
-
setup(
|
|
89
|
+
setup(y, {
|
|
90
90
|
emit: u
|
|
91
91
|
}) {
|
|
92
92
|
const {
|
|
93
|
-
appsData:
|
|
93
|
+
appsData: l
|
|
94
94
|
} = j(), {
|
|
95
|
-
githubAuth:
|
|
96
|
-
googleAuth:
|
|
97
|
-
microsoftAuth:
|
|
95
|
+
githubAuth: n,
|
|
96
|
+
googleAuth: g,
|
|
97
|
+
microsoftAuth: v,
|
|
98
98
|
wechatAuth: a
|
|
99
99
|
} = Se(), {
|
|
100
100
|
loading: s,
|
|
101
101
|
supported: d,
|
|
102
|
-
loginWithPasskey:
|
|
102
|
+
loginWithPasskey: b,
|
|
103
103
|
formatError: t,
|
|
104
|
-
getPasskeyEnvironmentIssue:
|
|
104
|
+
getPasskeyEnvironmentIssue: m
|
|
105
105
|
} = De(), {
|
|
106
|
-
acceptedTerms:
|
|
106
|
+
acceptedTerms: r,
|
|
107
107
|
ensureTermsAcceptedForSignIn: w
|
|
108
|
-
} = F(),
|
|
108
|
+
} = F(), c = u;
|
|
109
109
|
function f(R) {
|
|
110
110
|
w() && R({
|
|
111
|
-
acceptedTerms:
|
|
111
|
+
acceptedTerms: r.value ? !0 : void 0
|
|
112
112
|
});
|
|
113
113
|
}
|
|
114
|
-
async function
|
|
114
|
+
async function h() {
|
|
115
115
|
if (w())
|
|
116
116
|
try {
|
|
117
|
-
const R = await
|
|
118
|
-
R &&
|
|
117
|
+
const R = await b();
|
|
118
|
+
R && c("passkeySubmit", R);
|
|
119
119
|
} catch (R) {
|
|
120
|
-
|
|
120
|
+
oe.error(t(R));
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
|
-
const k =
|
|
124
|
-
const R =
|
|
125
|
-
return R.google.enabled || R.microsoft.enabled || R.github.enabled || R.wechat.enabled ||
|
|
126
|
-
}),
|
|
123
|
+
const k = y, T = $(() => {
|
|
124
|
+
const R = l.value.oauth;
|
|
125
|
+
return R.google.enabled || R.microsoft.enabled || R.github.enabled || R.wechat.enabled || l.value.authMethods.login.passkey;
|
|
126
|
+
}), L = $(() => d ? "Passkey" : m() || "Passkey 不可用");
|
|
127
127
|
return (R, O) => (o(), S("div", st, [T.value ? (o(), S("div", it, [...O[4] || (O[4] = [_("span", null, "其他登录方式", -1)])])) : I("", !0), _("div", {
|
|
128
128
|
class: "OAuthIcons",
|
|
129
129
|
style: G({
|
|
130
130
|
gap: `${e(He)}px`
|
|
131
131
|
})
|
|
132
|
-
}, [e(
|
|
132
|
+
}, [e(l).oauth.google.enabled ? (o(), z(Q, {
|
|
133
133
|
key: 0,
|
|
134
134
|
icon: e(X).google,
|
|
135
135
|
label: "Google",
|
|
136
136
|
size: k.size,
|
|
137
|
-
onClick: O[0] || (O[0] = (J) => f(e(
|
|
138
|
-
}, null, 8, ["icon", "size"])) : I("", !0), e(
|
|
137
|
+
onClick: O[0] || (O[0] = (J) => f(e(g)))
|
|
138
|
+
}, null, 8, ["icon", "size"])) : I("", !0), e(l).oauth.github.enabled ? (o(), z(Q, {
|
|
139
139
|
key: 1,
|
|
140
140
|
icon: e(X).github,
|
|
141
141
|
label: "Github",
|
|
142
142
|
size: k.size,
|
|
143
|
-
onClick: O[1] || (O[1] = (J) => f(e(
|
|
144
|
-
}, null, 8, ["icon", "size"])) : I("", !0), e(
|
|
143
|
+
onClick: O[1] || (O[1] = (J) => f(e(n)))
|
|
144
|
+
}, null, 8, ["icon", "size"])) : I("", !0), e(l).oauth.microsoft.enabled ? (o(), z(Q, {
|
|
145
145
|
key: 2,
|
|
146
146
|
icon: e(X).microsoft,
|
|
147
147
|
label: "Microsoft",
|
|
148
148
|
size: k.size,
|
|
149
|
-
onClick: O[2] || (O[2] = (J) => f(e(
|
|
150
|
-
}, null, 8, ["icon", "size"])) : I("", !0), e(
|
|
149
|
+
onClick: O[2] || (O[2] = (J) => f(e(v)))
|
|
150
|
+
}, null, 8, ["icon", "size"])) : I("", !0), e(l).oauth.wechat.enabled ? (o(), z(Q, {
|
|
151
151
|
key: 3,
|
|
152
152
|
icon: e(X).wechat,
|
|
153
153
|
label: "微信",
|
|
154
154
|
size: k.size,
|
|
155
155
|
onClick: O[3] || (O[3] = (J) => f(e(a)))
|
|
156
|
-
}, null, 8, ["icon", "size"])) : I("", !0), e(
|
|
156
|
+
}, null, 8, ["icon", "size"])) : I("", !0), e(l).authMethods.login.passkey ? (o(), z(Q, {
|
|
157
157
|
key: 4,
|
|
158
158
|
icon: e(Ee),
|
|
159
|
-
label:
|
|
159
|
+
label: L.value,
|
|
160
160
|
size: k.size,
|
|
161
161
|
loading: e(s),
|
|
162
162
|
disabled: !e(d),
|
|
163
|
-
onClick:
|
|
163
|
+
onClick: h
|
|
164
164
|
}, null, 8, ["icon", "label", "size", "loading", "disabled"])) : I("", !0)], 4)]));
|
|
165
165
|
}
|
|
166
166
|
}), ot = /* @__PURE__ */ U(at, [["__scopeId", "data-v-0473306e"]]), lt = {
|
|
@@ -183,10 +183,10 @@ const Ze = ["title", "aria-label", "disabled"], et = {
|
|
|
183
183
|
}
|
|
184
184
|
},
|
|
185
185
|
emits: ["signIn", "submit"],
|
|
186
|
-
setup(
|
|
186
|
+
setup(y, {
|
|
187
187
|
emit: u
|
|
188
188
|
}) {
|
|
189
|
-
const
|
|
189
|
+
const l = u, n = y, g = A(), v = A(!1), a = A(), s = A({
|
|
190
190
|
email: void 0,
|
|
191
191
|
userToken: void 0,
|
|
192
192
|
emailVerifyId: void 0,
|
|
@@ -195,27 +195,27 @@ const Ze = ["title", "aria-label", "disabled"], et = {
|
|
|
195
195
|
});
|
|
196
196
|
async function d() {
|
|
197
197
|
if (!await a.value.validateField(["email"])) {
|
|
198
|
-
|
|
199
|
-
const
|
|
198
|
+
v.value = !0;
|
|
199
|
+
const m = await B().auth.verify.email.retry.post({
|
|
200
200
|
email: s.value.email,
|
|
201
201
|
purpose: "resetPassword"
|
|
202
202
|
});
|
|
203
|
-
|
|
203
|
+
v.value = !1, m.data && (s.value.emailVerifyId = m.data.emailVerifyId), W(g.value, m);
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
|
-
async function
|
|
206
|
+
async function b() {
|
|
207
207
|
a.value.validate().then((t) => {
|
|
208
|
-
t ||
|
|
208
|
+
t || l("submit", s.value);
|
|
209
209
|
});
|
|
210
210
|
}
|
|
211
|
-
return (t,
|
|
211
|
+
return (t, m) => (o(), S("div", lt, [i(e(E), {
|
|
212
212
|
ref_key: "formRef",
|
|
213
213
|
ref: a,
|
|
214
214
|
model: s.value,
|
|
215
|
-
size:
|
|
215
|
+
size: n.size,
|
|
216
216
|
"auto-label-width": ""
|
|
217
217
|
}, {
|
|
218
|
-
default:
|
|
218
|
+
default: p(() => [i(e(P), {
|
|
219
219
|
field: "email",
|
|
220
220
|
label: "邮箱",
|
|
221
221
|
"hide-label": "",
|
|
@@ -227,9 +227,9 @@ const Ze = ["title", "aria-label", "disabled"], et = {
|
|
|
227
227
|
message: "请输入有效的邮箱"
|
|
228
228
|
}]
|
|
229
229
|
}, {
|
|
230
|
-
default:
|
|
230
|
+
default: p(() => [i(e(C), {
|
|
231
231
|
modelValue: s.value.email,
|
|
232
|
-
"onUpdate:modelValue":
|
|
232
|
+
"onUpdate:modelValue": m[0] || (m[0] = (r) => s.value.email = r),
|
|
233
233
|
placeholder: "请输入邮箱"
|
|
234
234
|
}, null, 8, ["modelValue"])]),
|
|
235
235
|
_: 1
|
|
@@ -242,15 +242,15 @@ const Ze = ["title", "aria-label", "disabled"], et = {
|
|
|
242
242
|
message: "请输入验证码"
|
|
243
243
|
}]
|
|
244
244
|
}, {
|
|
245
|
-
default:
|
|
245
|
+
default: p(() => [_("div", nt, [i(e(C), {
|
|
246
246
|
modelValue: s.value.userToken,
|
|
247
|
-
"onUpdate:modelValue":
|
|
247
|
+
"onUpdate:modelValue": m[1] || (m[1] = (r) => s.value.userToken = r),
|
|
248
248
|
placeholder: "请输入验证码"
|
|
249
249
|
}, null, 8, ["modelValue"]), i(K, {
|
|
250
250
|
ref_key: "SendVerifyCodeRef",
|
|
251
|
-
ref:
|
|
252
|
-
size:
|
|
253
|
-
loading:
|
|
251
|
+
ref: g,
|
|
252
|
+
size: n.size,
|
|
253
|
+
loading: v.value,
|
|
254
254
|
style: {
|
|
255
255
|
"margin-left": "10px"
|
|
256
256
|
},
|
|
@@ -269,9 +269,9 @@ const Ze = ["title", "aria-label", "disabled"], et = {
|
|
|
269
269
|
message: "密码不能少于10字符"
|
|
270
270
|
}]
|
|
271
271
|
}, {
|
|
272
|
-
default:
|
|
272
|
+
default: p(() => [i(e(C), {
|
|
273
273
|
modelValue: s.value.password,
|
|
274
|
-
"onUpdate:modelValue":
|
|
274
|
+
"onUpdate:modelValue": m[2] || (m[2] = (r) => s.value.password = r),
|
|
275
275
|
placeholder: "请输入密码",
|
|
276
276
|
type: "password",
|
|
277
277
|
autocomplete: ""
|
|
@@ -288,27 +288,27 @@ const Ze = ["title", "aria-label", "disabled"], et = {
|
|
|
288
288
|
minLength: 10,
|
|
289
289
|
message: "确认密码不能少于10字符"
|
|
290
290
|
}, {
|
|
291
|
-
validator: (
|
|
292
|
-
|
|
291
|
+
validator: (r, w) => {
|
|
292
|
+
r !== s.value.password ? w("两次密码输入不一致,请重新输入") : w();
|
|
293
293
|
}
|
|
294
294
|
}]
|
|
295
295
|
}, {
|
|
296
|
-
default:
|
|
296
|
+
default: p(() => [i(e(C), {
|
|
297
297
|
modelValue: s.value.confirmPassword,
|
|
298
|
-
"onUpdate:modelValue":
|
|
298
|
+
"onUpdate:modelValue": m[3] || (m[3] = (r) => s.value.confirmPassword = r),
|
|
299
299
|
placeholder: "请输入确认密码密码",
|
|
300
300
|
type: "password",
|
|
301
301
|
autocomplete: ""
|
|
302
302
|
}, null, 8, ["modelValue"])]),
|
|
303
303
|
_: 1
|
|
304
|
-
}, 8, ["rules"]), _("div", rt, [i(e(
|
|
304
|
+
}, 8, ["rules"]), _("div", rt, [i(e(x), {
|
|
305
305
|
type: "primary",
|
|
306
|
-
loading:
|
|
306
|
+
loading: n.loading,
|
|
307
307
|
long: "",
|
|
308
|
-
size:
|
|
309
|
-
onClick:
|
|
308
|
+
size: n.size,
|
|
309
|
+
onClick: b
|
|
310
310
|
}, {
|
|
311
|
-
default:
|
|
311
|
+
default: p(() => [...m[4] || (m[4] = [q(" 提交 ", -1)])]),
|
|
312
312
|
_: 1
|
|
313
313
|
}, 8, ["loading", "size"])])]),
|
|
314
314
|
_: 1
|
|
@@ -332,10 +332,10 @@ const Ze = ["title", "aria-label", "disabled"], et = {
|
|
|
332
332
|
}
|
|
333
333
|
},
|
|
334
334
|
emits: ["submit"],
|
|
335
|
-
setup(
|
|
335
|
+
setup(y, {
|
|
336
336
|
emit: u
|
|
337
337
|
}) {
|
|
338
|
-
const
|
|
338
|
+
const l = u, n = y, g = A(), v = A(!1), a = A(), s = A({
|
|
339
339
|
phone: void 0,
|
|
340
340
|
code: void 0,
|
|
341
341
|
password: void 0,
|
|
@@ -347,27 +347,27 @@ const Ze = ["title", "aria-label", "disabled"], et = {
|
|
|
347
347
|
minLength: 10,
|
|
348
348
|
message: "确认密码不能少于10字符"
|
|
349
349
|
}, {
|
|
350
|
-
validator: (
|
|
351
|
-
if (
|
|
352
|
-
|
|
350
|
+
validator: (m, r) => {
|
|
351
|
+
if (m !== s.value.password) {
|
|
352
|
+
r("两次密码输入不一致,请重新输入");
|
|
353
353
|
return;
|
|
354
354
|
}
|
|
355
|
-
|
|
355
|
+
r();
|
|
356
356
|
}
|
|
357
357
|
}];
|
|
358
|
-
async function
|
|
358
|
+
async function b() {
|
|
359
359
|
if (!await a.value.validateField(["phone"])) {
|
|
360
|
-
|
|
361
|
-
const
|
|
360
|
+
v.value = !0;
|
|
361
|
+
const r = await B().auth.verify.sms.send.post({
|
|
362
362
|
phone: s.value.phone,
|
|
363
363
|
purpose: "resetPassword"
|
|
364
364
|
});
|
|
365
|
-
|
|
365
|
+
v.value = !1, W(g.value, r);
|
|
366
366
|
}
|
|
367
367
|
}
|
|
368
368
|
async function t() {
|
|
369
|
-
a.value.validate().then((
|
|
370
|
-
|
|
369
|
+
a.value.validate().then((m) => {
|
|
370
|
+
m || l("submit", {
|
|
371
371
|
method: "phone",
|
|
372
372
|
phone: s.value.phone,
|
|
373
373
|
code: s.value.code,
|
|
@@ -375,14 +375,14 @@ const Ze = ["title", "aria-label", "disabled"], et = {
|
|
|
375
375
|
});
|
|
376
376
|
});
|
|
377
377
|
}
|
|
378
|
-
return (
|
|
378
|
+
return (m, r) => (o(), S("div", ct, [i(e(E), {
|
|
379
379
|
ref_key: "formRef",
|
|
380
380
|
ref: a,
|
|
381
381
|
model: s.value,
|
|
382
|
-
size:
|
|
382
|
+
size: n.size,
|
|
383
383
|
"auto-label-width": ""
|
|
384
384
|
}, {
|
|
385
|
-
default:
|
|
385
|
+
default: p(() => [i(e(P), {
|
|
386
386
|
field: "phone",
|
|
387
387
|
label: "手机号",
|
|
388
388
|
"hide-label": "",
|
|
@@ -394,9 +394,9 @@ const Ze = ["title", "aria-label", "disabled"], et = {
|
|
|
394
394
|
message: "请输入有效的手机号"
|
|
395
395
|
}]
|
|
396
396
|
}, {
|
|
397
|
-
default:
|
|
397
|
+
default: p(() => [i(e(C), {
|
|
398
398
|
modelValue: s.value.phone,
|
|
399
|
-
"onUpdate:modelValue":
|
|
399
|
+
"onUpdate:modelValue": r[0] || (r[0] = (w) => s.value.phone = w),
|
|
400
400
|
placeholder: "请输入手机号",
|
|
401
401
|
autocomplete: "tel",
|
|
402
402
|
type: "tel"
|
|
@@ -411,20 +411,20 @@ const Ze = ["title", "aria-label", "disabled"], et = {
|
|
|
411
411
|
message: "请输入验证码"
|
|
412
412
|
}]
|
|
413
413
|
}, {
|
|
414
|
-
default:
|
|
414
|
+
default: p(() => [_("div", pt, [i(e(C), {
|
|
415
415
|
modelValue: s.value.code,
|
|
416
|
-
"onUpdate:modelValue":
|
|
416
|
+
"onUpdate:modelValue": r[1] || (r[1] = (w) => s.value.code = w),
|
|
417
417
|
placeholder: "请输入验证码",
|
|
418
418
|
autocomplete: "one-time-code"
|
|
419
419
|
}, null, 8, ["modelValue"]), i(K, {
|
|
420
420
|
ref_key: "SendVerifyCodeRef",
|
|
421
|
-
ref:
|
|
422
|
-
size:
|
|
423
|
-
loading:
|
|
421
|
+
ref: g,
|
|
422
|
+
size: n.size,
|
|
423
|
+
loading: v.value,
|
|
424
424
|
style: {
|
|
425
425
|
"margin-left": "10px"
|
|
426
426
|
},
|
|
427
|
-
onSend:
|
|
427
|
+
onSend: b
|
|
428
428
|
}, null, 8, ["size", "loading"])])]),
|
|
429
429
|
_: 1
|
|
430
430
|
}), i(e(P), {
|
|
@@ -439,9 +439,9 @@ const Ze = ["title", "aria-label", "disabled"], et = {
|
|
|
439
439
|
message: "密码不能少于10字符"
|
|
440
440
|
}]
|
|
441
441
|
}, {
|
|
442
|
-
default:
|
|
442
|
+
default: p(() => [i(e(C), {
|
|
443
443
|
modelValue: s.value.password,
|
|
444
|
-
"onUpdate:modelValue":
|
|
444
|
+
"onUpdate:modelValue": r[2] || (r[2] = (w) => s.value.password = w),
|
|
445
445
|
placeholder: "请输入密码",
|
|
446
446
|
type: "password",
|
|
447
447
|
autocomplete: "new-password"
|
|
@@ -453,22 +453,22 @@ const Ze = ["title", "aria-label", "disabled"], et = {
|
|
|
453
453
|
"hide-label": "",
|
|
454
454
|
rules: d
|
|
455
455
|
}, {
|
|
456
|
-
default:
|
|
456
|
+
default: p(() => [i(e(C), {
|
|
457
457
|
modelValue: s.value.confirmPassword,
|
|
458
|
-
"onUpdate:modelValue":
|
|
458
|
+
"onUpdate:modelValue": r[3] || (r[3] = (w) => s.value.confirmPassword = w),
|
|
459
459
|
placeholder: "请输入确认密码",
|
|
460
460
|
type: "password",
|
|
461
461
|
autocomplete: "new-password"
|
|
462
462
|
}, null, 8, ["modelValue"])]),
|
|
463
463
|
_: 1
|
|
464
|
-
}), i(e(
|
|
464
|
+
}), i(e(x), {
|
|
465
465
|
type: "primary",
|
|
466
|
-
loading:
|
|
466
|
+
loading: n.loading,
|
|
467
467
|
long: "",
|
|
468
|
-
size:
|
|
468
|
+
size: n.size,
|
|
469
469
|
onClick: t
|
|
470
470
|
}, {
|
|
471
|
-
default:
|
|
471
|
+
default: p(() => [...r[4] || (r[4] = [q(" 提交 ", -1)])]),
|
|
472
472
|
_: 1
|
|
473
473
|
}, 8, ["loading", "size"])]),
|
|
474
474
|
_: 1
|
|
@@ -479,20 +479,20 @@ const Ze = ["title", "aria-label", "disabled"], et = {
|
|
|
479
479
|
}, gt = /* @__PURE__ */ V({
|
|
480
480
|
__name: "AuthkitSwitchSignIn",
|
|
481
481
|
emits: ["switchSignIn"],
|
|
482
|
-
setup(
|
|
482
|
+
setup(y, {
|
|
483
483
|
emit: u
|
|
484
484
|
}) {
|
|
485
|
-
const
|
|
486
|
-
function
|
|
487
|
-
|
|
485
|
+
const l = u;
|
|
486
|
+
function n() {
|
|
487
|
+
l("switchSignIn");
|
|
488
488
|
}
|
|
489
|
-
return (
|
|
489
|
+
return (g, v) => (o(), S("div", vt, [_("span", null, [v[1] || (v[1] = _("span", null, "已经有账号?", -1)), i(e(Y), {
|
|
490
490
|
style: {
|
|
491
491
|
padding: "0px"
|
|
492
492
|
},
|
|
493
|
-
onClick:
|
|
493
|
+
onClick: n
|
|
494
494
|
}, {
|
|
495
|
-
default:
|
|
495
|
+
default: p(() => [...v[0] || (v[0] = [q("去登录", -1)])]),
|
|
496
496
|
_: 1
|
|
497
497
|
})])]));
|
|
498
498
|
}
|
|
@@ -501,10 +501,10 @@ const Ze = ["title", "aria-label", "disabled"], et = {
|
|
|
501
501
|
}, yt = {
|
|
502
502
|
key: 0,
|
|
503
503
|
class: "tabsContainer"
|
|
504
|
-
},
|
|
504
|
+
}, wt = {
|
|
505
505
|
key: 3,
|
|
506
506
|
class: "empty"
|
|
507
|
-
},
|
|
507
|
+
}, bt = /* @__PURE__ */ V({
|
|
508
508
|
__name: "AuthkitResetPassword",
|
|
509
509
|
props: {
|
|
510
510
|
size: {
|
|
@@ -519,67 +519,67 @@ const Ze = ["title", "aria-label", "disabled"], et = {
|
|
|
519
519
|
}
|
|
520
520
|
},
|
|
521
521
|
emits: ["switchSignIn", "submit"],
|
|
522
|
-
setup(
|
|
522
|
+
setup(y, {
|
|
523
523
|
emit: u
|
|
524
524
|
}) {
|
|
525
|
-
const
|
|
526
|
-
appsData:
|
|
527
|
-
} = j(),
|
|
525
|
+
const l = u, n = y, {
|
|
526
|
+
appsData: g
|
|
527
|
+
} = j(), v = $(() => g.value.authMethods), a = $(() => {
|
|
528
528
|
const t = [];
|
|
529
|
-
return
|
|
529
|
+
return v.value.login.emailPassword && t.push({
|
|
530
530
|
key: "email",
|
|
531
531
|
title: "邮箱找回"
|
|
532
|
-
}),
|
|
532
|
+
}), v.value.login.phonePassword && t.push({
|
|
533
533
|
key: "phone",
|
|
534
534
|
title: "手机号找回"
|
|
535
535
|
}), t;
|
|
536
536
|
}), s = A("email");
|
|
537
537
|
re(() => {
|
|
538
538
|
var t;
|
|
539
|
-
a.value.some((
|
|
539
|
+
a.value.some((m) => m.key === s.value) || (s.value = ((t = a.value[0]) == null ? void 0 : t.key) || "email");
|
|
540
540
|
});
|
|
541
541
|
function d() {
|
|
542
|
-
|
|
542
|
+
l("switchSignIn");
|
|
543
543
|
}
|
|
544
|
-
async function
|
|
545
|
-
|
|
544
|
+
async function b(t) {
|
|
545
|
+
l("submit", {
|
|
546
546
|
method: s.value,
|
|
547
547
|
...t
|
|
548
548
|
});
|
|
549
549
|
}
|
|
550
|
-
return (t,
|
|
550
|
+
return (t, m) => (o(), S("div", ht, [a.value.length > 1 ? (o(), S("div", yt, [i(e(ce), {
|
|
551
551
|
"active-key": s.value,
|
|
552
|
-
"onUpdate:activeKey":
|
|
552
|
+
"onUpdate:activeKey": m[0] || (m[0] = (r) => s.value = r)
|
|
553
553
|
}, {
|
|
554
|
-
default:
|
|
555
|
-
key:
|
|
556
|
-
title:
|
|
554
|
+
default: p(() => [(o(!0), S(D, null, ue(a.value, (r) => (o(), z(e(pe), {
|
|
555
|
+
key: r.key,
|
|
556
|
+
title: r.title
|
|
557
557
|
}, null, 8, ["title"]))), 128))]),
|
|
558
558
|
_: 1
|
|
559
|
-
}, 8, ["active-key"])])) : I("", !0), s.value === "email" &&
|
|
559
|
+
}, 8, ["active-key"])])) : I("", !0), s.value === "email" && v.value.login.emailPassword ? (o(), z(dt, {
|
|
560
560
|
key: 1,
|
|
561
|
-
loading:
|
|
562
|
-
size:
|
|
563
|
-
onSubmit:
|
|
564
|
-
}, null, 8, ["loading", "size"])) : s.value === "phone" &&
|
|
561
|
+
loading: y.loading,
|
|
562
|
+
size: n.size,
|
|
563
|
+
onSubmit: b
|
|
564
|
+
}, null, 8, ["loading", "size"])) : s.value === "phone" && v.value.login.phonePassword ? (o(), z(ft, {
|
|
565
565
|
key: 2,
|
|
566
|
-
loading:
|
|
567
|
-
size:
|
|
568
|
-
onSubmit:
|
|
569
|
-
}, null, 8, ["loading", "size"])) : (o(), S("div",
|
|
566
|
+
loading: y.loading,
|
|
567
|
+
size: n.size,
|
|
568
|
+
onSubmit: b
|
|
569
|
+
}, null, 8, ["loading", "size"])) : (o(), S("div", wt, "当前应用未开放找回密码")), i(fe, {
|
|
570
570
|
onSwitchSignIn: d
|
|
571
571
|
})]));
|
|
572
572
|
}
|
|
573
|
-
}), _t = /* @__PURE__ */ U(
|
|
574
|
-
let
|
|
575
|
-
function kt(
|
|
576
|
-
|
|
573
|
+
}), _t = /* @__PURE__ */ U(bt, [["__scopeId", "data-v-90d789bb"]]);
|
|
574
|
+
let ie = null, ae = null;
|
|
575
|
+
function kt(y) {
|
|
576
|
+
ie = y.onPrivacyPolicy ?? null, ae = y.onUserServiceAgreement ?? null;
|
|
577
577
|
}
|
|
578
578
|
function St() {
|
|
579
|
-
|
|
579
|
+
ie == null || ie();
|
|
580
580
|
}
|
|
581
581
|
function zt() {
|
|
582
|
-
|
|
582
|
+
ae == null || ae();
|
|
583
583
|
}
|
|
584
584
|
const It = {
|
|
585
585
|
key: 2
|
|
@@ -595,56 +595,56 @@ const It = {
|
|
|
595
595
|
acceptedTermsModifiers: {}
|
|
596
596
|
}),
|
|
597
597
|
emits: ["update:acceptedTerms"],
|
|
598
|
-
setup(
|
|
598
|
+
setup(y) {
|
|
599
599
|
const {
|
|
600
600
|
config: u
|
|
601
|
-
} = me(),
|
|
602
|
-
getLink:
|
|
603
|
-
openLegalDoc:
|
|
601
|
+
} = me(), l = y, n = Ue(y, "acceptedTerms"), {
|
|
602
|
+
getLink: g,
|
|
603
|
+
openLegalDoc: v
|
|
604
604
|
} = Ae(), {
|
|
605
605
|
termsShaking: a,
|
|
606
606
|
requiresAcceptanceForSignUp: s,
|
|
607
607
|
requiresAcceptanceForOAuth: d,
|
|
608
|
-
syncAcceptedTerms:
|
|
608
|
+
syncAcceptedTerms: b
|
|
609
609
|
} = F();
|
|
610
|
-
|
|
611
|
-
|
|
610
|
+
we(n, (k) => {
|
|
611
|
+
b(k);
|
|
612
612
|
});
|
|
613
613
|
const t = $(() => {
|
|
614
|
-
const k =
|
|
614
|
+
const k = g("userServiceAgreement");
|
|
615
615
|
return k != null && k.configured ? k : void 0;
|
|
616
|
-
}),
|
|
617
|
-
const k =
|
|
616
|
+
}), m = $(() => {
|
|
617
|
+
const k = g("privacyPolicy");
|
|
618
618
|
return k != null && k.configured ? k : void 0;
|
|
619
|
-
}),
|
|
619
|
+
}), r = $(() => !!(t.value || m.value)), w = $(() => l.currentView === "signUp" ? s() : l.currentView === "signIn" ? d() : !1), c = $(() => r.value && w.value);
|
|
620
620
|
function f() {
|
|
621
621
|
if (u.legalDocsMode === "builtin") {
|
|
622
|
-
|
|
622
|
+
v("userServiceAgreement");
|
|
623
623
|
return;
|
|
624
624
|
}
|
|
625
625
|
zt();
|
|
626
626
|
}
|
|
627
|
-
function
|
|
627
|
+
function h() {
|
|
628
628
|
if (u.legalDocsMode === "builtin") {
|
|
629
|
-
|
|
629
|
+
v("privacyPolicy");
|
|
630
630
|
return;
|
|
631
631
|
}
|
|
632
632
|
St();
|
|
633
633
|
}
|
|
634
|
-
return (k, T) =>
|
|
634
|
+
return (k, T) => c.value ? (o(), S("div", {
|
|
635
635
|
key: 0,
|
|
636
636
|
class: ye(["ServiceAgreementAndPrivacyProtection", {
|
|
637
637
|
"terms-shake": e(a)
|
|
638
638
|
}])
|
|
639
|
-
}, [
|
|
639
|
+
}, [r.value ? (o(), S(D, {
|
|
640
640
|
key: 0
|
|
641
641
|
}, [w.value ? (o(), z(e(Oe), {
|
|
642
642
|
key: 0,
|
|
643
|
-
modelValue:
|
|
644
|
-
"onUpdate:modelValue": T[0] || (T[0] = (
|
|
643
|
+
modelValue: n.value,
|
|
644
|
+
"onUpdate:modelValue": T[0] || (T[0] = (L) => n.value = L),
|
|
645
645
|
class: "terms-checkbox"
|
|
646
646
|
}, {
|
|
647
|
-
default:
|
|
647
|
+
default: p(() => [...T[1] || (T[1] = [_("span", {
|
|
648
648
|
class: "terms-text"
|
|
649
649
|
}, "我已阅读并同意", -1)])]),
|
|
650
650
|
_: 1
|
|
@@ -652,13 +652,13 @@ const It = {
|
|
|
652
652
|
key: 1,
|
|
653
653
|
onClick: f
|
|
654
654
|
}, {
|
|
655
|
-
default:
|
|
655
|
+
default: p(() => [q(M(t.value.label), 1)]),
|
|
656
656
|
_: 1
|
|
657
|
-
})) : I("", !0), t.value &&
|
|
657
|
+
})) : I("", !0), t.value && m.value ? (o(), S("span", It, "和")) : I("", !0), m.value ? (o(), z(e(Y), {
|
|
658
658
|
key: 3,
|
|
659
|
-
onClick:
|
|
659
|
+
onClick: h
|
|
660
660
|
}, {
|
|
661
|
-
default:
|
|
661
|
+
default: p(() => [q(M(m.value.label), 1)]),
|
|
662
662
|
_: 1
|
|
663
663
|
})) : I("", !0)], 64)) : I("", !0)], 2)) : I("", !0);
|
|
664
664
|
}
|
|
@@ -684,32 +684,32 @@ const It = {
|
|
|
684
684
|
}
|
|
685
685
|
},
|
|
686
686
|
emits: ["submit"],
|
|
687
|
-
setup(
|
|
687
|
+
setup(y, {
|
|
688
688
|
emit: u
|
|
689
689
|
}) {
|
|
690
|
-
const
|
|
691
|
-
useTermsFormField:
|
|
690
|
+
const l = u, {
|
|
691
|
+
useTermsFormField: n
|
|
692
692
|
} = F(), {
|
|
693
|
-
showTermsField:
|
|
694
|
-
termsRules:
|
|
695
|
-
} =
|
|
693
|
+
showTermsField: g,
|
|
694
|
+
termsRules: v
|
|
695
|
+
} = n("signIn"), a = y, s = A(), d = A({
|
|
696
696
|
identifier: void 0,
|
|
697
697
|
password: void 0,
|
|
698
698
|
acceptedTerms: !1
|
|
699
699
|
});
|
|
700
|
-
async function
|
|
700
|
+
async function b() {
|
|
701
701
|
s.value.validate().then((t) => {
|
|
702
|
-
t ||
|
|
702
|
+
t || l("submit", d.value);
|
|
703
703
|
});
|
|
704
704
|
}
|
|
705
|
-
return (t,
|
|
705
|
+
return (t, m) => (o(), S("div", Pt, [i(e(E), {
|
|
706
706
|
ref_key: "formRef",
|
|
707
707
|
ref: s,
|
|
708
708
|
model: d.value,
|
|
709
709
|
size: a.size,
|
|
710
710
|
"auto-label-width": ""
|
|
711
711
|
}, {
|
|
712
|
-
default:
|
|
712
|
+
default: p(() => [i(e(P), {
|
|
713
713
|
field: "identifier",
|
|
714
714
|
label: "邮箱或手机号",
|
|
715
715
|
"hide-label": "",
|
|
@@ -718,9 +718,9 @@ const It = {
|
|
|
718
718
|
message: "请输入邮箱或手机号"
|
|
719
719
|
}]
|
|
720
720
|
}, {
|
|
721
|
-
default:
|
|
721
|
+
default: p(() => [i(e(C), {
|
|
722
722
|
modelValue: d.value.identifier,
|
|
723
|
-
"onUpdate:modelValue":
|
|
723
|
+
"onUpdate:modelValue": m[0] || (m[0] = (r) => d.value.identifier = r),
|
|
724
724
|
placeholder: a.allowPhone ? "请输入邮箱或手机号" : "请输入邮箱",
|
|
725
725
|
autocomplete: "username"
|
|
726
726
|
}, null, 8, ["modelValue", "placeholder"])]),
|
|
@@ -734,32 +734,32 @@ const It = {
|
|
|
734
734
|
message: "请输入密码"
|
|
735
735
|
}]
|
|
736
736
|
}, {
|
|
737
|
-
default:
|
|
737
|
+
default: p(() => [i(e(C), {
|
|
738
738
|
modelValue: d.value.password,
|
|
739
|
-
"onUpdate:modelValue":
|
|
739
|
+
"onUpdate:modelValue": m[1] || (m[1] = (r) => d.value.password = r),
|
|
740
740
|
placeholder: "请输入密码",
|
|
741
741
|
type: "password",
|
|
742
742
|
autocomplete: "current-password"
|
|
743
743
|
}, null, 8, ["modelValue"])]),
|
|
744
744
|
_: 1
|
|
745
|
-
}), _("div", Vt, [i(e(
|
|
745
|
+
}), _("div", Vt, [i(e(x), {
|
|
746
746
|
type: "primary",
|
|
747
747
|
loading: a.loading,
|
|
748
748
|
long: "",
|
|
749
749
|
size: a.size,
|
|
750
|
-
onClick:
|
|
750
|
+
onClick: b
|
|
751
751
|
}, {
|
|
752
|
-
default:
|
|
752
|
+
default: p(() => [...m[3] || (m[3] = [q(" 登录 ", -1)])]),
|
|
753
753
|
_: 1
|
|
754
|
-
}, 8, ["loading", "size"]), e(
|
|
754
|
+
}, 8, ["loading", "size"]), e(g) ? (o(), z(e(P), {
|
|
755
755
|
key: 0,
|
|
756
756
|
field: "acceptedTerms",
|
|
757
757
|
"hide-label": "",
|
|
758
|
-
rules: e(
|
|
758
|
+
rules: e(v)
|
|
759
759
|
}, {
|
|
760
|
-
default:
|
|
760
|
+
default: p(() => [i(ee, {
|
|
761
761
|
"accepted-terms": d.value.acceptedTerms,
|
|
762
|
-
"onUpdate:acceptedTerms":
|
|
762
|
+
"onUpdate:acceptedTerms": m[2] || (m[2] = (r) => d.value.acceptedTerms = r),
|
|
763
763
|
"current-view": "signIn"
|
|
764
764
|
}, null, 8, ["accepted-terms"])]),
|
|
765
765
|
_: 1
|
|
@@ -789,46 +789,46 @@ const It = {
|
|
|
789
789
|
}
|
|
790
790
|
},
|
|
791
791
|
emits: ["submit"],
|
|
792
|
-
setup(
|
|
792
|
+
setup(y, {
|
|
793
793
|
emit: u
|
|
794
794
|
}) {
|
|
795
|
-
const
|
|
796
|
-
useTermsFormField:
|
|
795
|
+
const l = u, {
|
|
796
|
+
useTermsFormField: n
|
|
797
797
|
} = F(), {
|
|
798
|
-
showTermsField:
|
|
799
|
-
termsRules:
|
|
800
|
-
} =
|
|
798
|
+
showTermsField: g,
|
|
799
|
+
termsRules: v
|
|
800
|
+
} = n("signIn"), a = y, s = A(), d = A(!1), b = A(), t = A({
|
|
801
801
|
phone: void 0,
|
|
802
802
|
code: void 0,
|
|
803
803
|
acceptedTerms: !1
|
|
804
804
|
});
|
|
805
|
-
async function
|
|
806
|
-
if (!await
|
|
805
|
+
async function m() {
|
|
806
|
+
if (!await b.value.validateField(["phone"])) {
|
|
807
807
|
d.value = !0;
|
|
808
|
-
const
|
|
808
|
+
const c = await B().auth.verify.sms.send.post({
|
|
809
809
|
phone: t.value.phone,
|
|
810
810
|
purpose: "signIn"
|
|
811
811
|
});
|
|
812
|
-
d.value = !1, W(s.value,
|
|
812
|
+
d.value = !1, W(s.value, c);
|
|
813
813
|
}
|
|
814
814
|
}
|
|
815
|
-
async function
|
|
816
|
-
|
|
817
|
-
w ||
|
|
815
|
+
async function r() {
|
|
816
|
+
b.value.validate().then((w) => {
|
|
817
|
+
w || l("submit", {
|
|
818
818
|
identifier: t.value.phone,
|
|
819
819
|
code: t.value.code,
|
|
820
820
|
method: "code"
|
|
821
821
|
});
|
|
822
822
|
});
|
|
823
823
|
}
|
|
824
|
-
return (w,
|
|
824
|
+
return (w, c) => (o(), S("div", $t, [_("div", Rt, [i(e(E), {
|
|
825
825
|
ref_key: "formRef",
|
|
826
|
-
ref:
|
|
826
|
+
ref: b,
|
|
827
827
|
model: t.value,
|
|
828
828
|
size: a.size,
|
|
829
829
|
"auto-label-width": ""
|
|
830
830
|
}, {
|
|
831
|
-
default:
|
|
831
|
+
default: p(() => [i(e(P), {
|
|
832
832
|
field: "phone",
|
|
833
833
|
label: "手机号",
|
|
834
834
|
"hide-label": "",
|
|
@@ -840,9 +840,9 @@ const It = {
|
|
|
840
840
|
message: "请输入有效的手机号"
|
|
841
841
|
}]
|
|
842
842
|
}, {
|
|
843
|
-
default:
|
|
843
|
+
default: p(() => [i(e(C), {
|
|
844
844
|
modelValue: t.value.phone,
|
|
845
|
-
"onUpdate:modelValue":
|
|
845
|
+
"onUpdate:modelValue": c[0] || (c[0] = (f) => t.value.phone = f),
|
|
846
846
|
placeholder: "请输入手机号",
|
|
847
847
|
autocomplete: "username",
|
|
848
848
|
type: "tel"
|
|
@@ -857,9 +857,9 @@ const It = {
|
|
|
857
857
|
message: "请输入验证码"
|
|
858
858
|
}]
|
|
859
859
|
}, {
|
|
860
|
-
default:
|
|
860
|
+
default: p(() => [_("div", Tt, [i(e(C), {
|
|
861
861
|
modelValue: t.value.code,
|
|
862
|
-
"onUpdate:modelValue":
|
|
862
|
+
"onUpdate:modelValue": c[1] || (c[1] = (f) => t.value.code = f),
|
|
863
863
|
placeholder: "请输入验证码",
|
|
864
864
|
autocomplete: "one-time-code"
|
|
865
865
|
}, null, 8, ["modelValue"]), i(K, {
|
|
@@ -870,27 +870,27 @@ const It = {
|
|
|
870
870
|
style: {
|
|
871
871
|
"margin-left": "10px"
|
|
872
872
|
},
|
|
873
|
-
onSend:
|
|
873
|
+
onSend: m
|
|
874
874
|
}, null, 8, ["size", "loading"])])]),
|
|
875
875
|
_: 1
|
|
876
|
-
}), _("div", qt, [i(e(
|
|
876
|
+
}), _("div", qt, [i(e(x), {
|
|
877
877
|
type: "primary",
|
|
878
878
|
loading: a.loading,
|
|
879
879
|
long: "",
|
|
880
880
|
size: a.size,
|
|
881
|
-
onClick:
|
|
881
|
+
onClick: r
|
|
882
882
|
}, {
|
|
883
|
-
default:
|
|
883
|
+
default: p(() => [...c[3] || (c[3] = [q(" 登录 ", -1)])]),
|
|
884
884
|
_: 1
|
|
885
|
-
}, 8, ["loading", "size"]), e(
|
|
885
|
+
}, 8, ["loading", "size"]), e(g) ? (o(), z(e(P), {
|
|
886
886
|
key: 0,
|
|
887
887
|
field: "acceptedTerms",
|
|
888
888
|
"hide-label": "",
|
|
889
|
-
rules: e(
|
|
889
|
+
rules: e(v)
|
|
890
890
|
}, {
|
|
891
|
-
default:
|
|
891
|
+
default: p(() => [i(ee, {
|
|
892
892
|
"accepted-terms": t.value.acceptedTerms,
|
|
893
|
-
"onUpdate:acceptedTerms":
|
|
893
|
+
"onUpdate:acceptedTerms": c[2] || (c[2] = (f) => t.value.acceptedTerms = f),
|
|
894
894
|
"current-view": "signIn"
|
|
895
895
|
}, null, 8, ["accepted-terms"])]),
|
|
896
896
|
_: 1
|
|
@@ -898,7 +898,7 @@ const It = {
|
|
|
898
898
|
_: 1
|
|
899
899
|
}, 8, ["model", "size"])])]));
|
|
900
900
|
}
|
|
901
|
-
}),
|
|
901
|
+
}), Lt = /* @__PURE__ */ U(Ot, [["__scopeId", "data-v-e2a3fef3"]]), xt = {
|
|
902
902
|
class: "SignInEmailCode"
|
|
903
903
|
}, Bt = {
|
|
904
904
|
class: "sendVerifyCodeItem"
|
|
@@ -918,34 +918,34 @@ const It = {
|
|
|
918
918
|
}
|
|
919
919
|
},
|
|
920
920
|
emits: ["submit"],
|
|
921
|
-
setup(
|
|
921
|
+
setup(y, {
|
|
922
922
|
emit: u
|
|
923
923
|
}) {
|
|
924
|
-
const
|
|
925
|
-
useTermsFormField:
|
|
924
|
+
const l = u, {
|
|
925
|
+
useTermsFormField: n
|
|
926
926
|
} = F(), {
|
|
927
|
-
showTermsField:
|
|
928
|
-
termsRules:
|
|
929
|
-
} =
|
|
927
|
+
showTermsField: g,
|
|
928
|
+
termsRules: v
|
|
929
|
+
} = n("signIn"), a = y, s = A(), d = A(!1), b = A(), t = A({
|
|
930
930
|
email: void 0,
|
|
931
931
|
code: void 0,
|
|
932
932
|
emailVerifyId: "",
|
|
933
933
|
acceptedTerms: !1
|
|
934
934
|
});
|
|
935
|
-
async function
|
|
936
|
-
var
|
|
937
|
-
if (!await
|
|
935
|
+
async function m() {
|
|
936
|
+
var c;
|
|
937
|
+
if (!await b.value.validateField(["email"])) {
|
|
938
938
|
d.value = !0;
|
|
939
939
|
const f = await B().auth.verify.email.retry.post({
|
|
940
940
|
email: t.value.email,
|
|
941
941
|
purpose: "signIn"
|
|
942
942
|
});
|
|
943
|
-
d.value = !1, (
|
|
943
|
+
d.value = !1, (c = f.data) != null && c.emailVerifyId && (t.value.emailVerifyId = f.data.emailVerifyId), W(s.value, f);
|
|
944
944
|
}
|
|
945
945
|
}
|
|
946
|
-
async function
|
|
947
|
-
|
|
948
|
-
w ||
|
|
946
|
+
async function r() {
|
|
947
|
+
b.value.validate().then((w) => {
|
|
948
|
+
w || l("submit", {
|
|
949
949
|
identifier: t.value.email,
|
|
950
950
|
code: t.value.code,
|
|
951
951
|
emailVerifyId: t.value.emailVerifyId,
|
|
@@ -953,14 +953,14 @@ const It = {
|
|
|
953
953
|
});
|
|
954
954
|
});
|
|
955
955
|
}
|
|
956
|
-
return (w,
|
|
956
|
+
return (w, c) => (o(), S("div", xt, [i(e(E), {
|
|
957
957
|
ref_key: "formRef",
|
|
958
|
-
ref:
|
|
958
|
+
ref: b,
|
|
959
959
|
model: t.value,
|
|
960
960
|
size: a.size,
|
|
961
961
|
"auto-label-width": ""
|
|
962
962
|
}, {
|
|
963
|
-
default:
|
|
963
|
+
default: p(() => [i(e(P), {
|
|
964
964
|
field: "email",
|
|
965
965
|
"hide-label": "",
|
|
966
966
|
rules: [{
|
|
@@ -971,9 +971,9 @@ const It = {
|
|
|
971
971
|
message: "请输入有效的邮箱"
|
|
972
972
|
}]
|
|
973
973
|
}, {
|
|
974
|
-
default:
|
|
974
|
+
default: p(() => [i(e(C), {
|
|
975
975
|
modelValue: t.value.email,
|
|
976
|
-
"onUpdate:modelValue":
|
|
976
|
+
"onUpdate:modelValue": c[0] || (c[0] = (f) => t.value.email = f),
|
|
977
977
|
placeholder: "请输入邮箱",
|
|
978
978
|
autocomplete: "username"
|
|
979
979
|
}, null, 8, ["modelValue"])]),
|
|
@@ -986,9 +986,9 @@ const It = {
|
|
|
986
986
|
message: "请输入验证码"
|
|
987
987
|
}]
|
|
988
988
|
}, {
|
|
989
|
-
default:
|
|
989
|
+
default: p(() => [_("div", Bt, [i(e(C), {
|
|
990
990
|
modelValue: t.value.code,
|
|
991
|
-
"onUpdate:modelValue":
|
|
991
|
+
"onUpdate:modelValue": c[1] || (c[1] = (f) => t.value.code = f),
|
|
992
992
|
placeholder: "请输入验证码",
|
|
993
993
|
autocomplete: "one-time-code"
|
|
994
994
|
}, null, 8, ["modelValue"]), i(K, {
|
|
@@ -999,27 +999,27 @@ const It = {
|
|
|
999
999
|
style: {
|
|
1000
1000
|
"margin-left": "10px"
|
|
1001
1001
|
},
|
|
1002
|
-
onSend:
|
|
1002
|
+
onSend: m
|
|
1003
1003
|
}, null, 8, ["size", "loading"])])]),
|
|
1004
1004
|
_: 1
|
|
1005
|
-
}), _("div", Mt, [i(e(
|
|
1005
|
+
}), _("div", Mt, [i(e(x), {
|
|
1006
1006
|
type: "primary",
|
|
1007
1007
|
loading: a.loading,
|
|
1008
1008
|
long: "",
|
|
1009
1009
|
size: a.size,
|
|
1010
|
-
onClick:
|
|
1010
|
+
onClick: r
|
|
1011
1011
|
}, {
|
|
1012
|
-
default:
|
|
1012
|
+
default: p(() => [...c[3] || (c[3] = [q(" 登录 ", -1)])]),
|
|
1013
1013
|
_: 1
|
|
1014
|
-
}, 8, ["loading", "size"]), e(
|
|
1014
|
+
}, 8, ["loading", "size"]), e(g) ? (o(), z(e(P), {
|
|
1015
1015
|
key: 0,
|
|
1016
1016
|
field: "acceptedTerms",
|
|
1017
1017
|
"hide-label": "",
|
|
1018
|
-
rules: e(
|
|
1018
|
+
rules: e(v)
|
|
1019
1019
|
}, {
|
|
1020
|
-
default:
|
|
1020
|
+
default: p(() => [i(ee, {
|
|
1021
1021
|
"accepted-terms": t.value.acceptedTerms,
|
|
1022
|
-
"onUpdate:acceptedTerms":
|
|
1022
|
+
"onUpdate:acceptedTerms": c[2] || (c[2] = (f) => t.value.acceptedTerms = f),
|
|
1023
1023
|
"current-view": "signIn"
|
|
1024
1024
|
}, null, 8, ["accepted-terms"])]),
|
|
1025
1025
|
_: 1
|
|
@@ -1044,32 +1044,32 @@ const It = {
|
|
|
1044
1044
|
}
|
|
1045
1045
|
},
|
|
1046
1046
|
emits: ["switchSignUp", "switchResetPassword"],
|
|
1047
|
-
setup(
|
|
1047
|
+
setup(y, {
|
|
1048
1048
|
emit: u
|
|
1049
1049
|
}) {
|
|
1050
|
-
const
|
|
1051
|
-
function h() {
|
|
1052
|
-
r("switchSignUp");
|
|
1053
|
-
}
|
|
1050
|
+
const l = y, n = u;
|
|
1054
1051
|
function g() {
|
|
1055
|
-
|
|
1052
|
+
n("switchSignUp");
|
|
1056
1053
|
}
|
|
1057
|
-
|
|
1054
|
+
function v() {
|
|
1055
|
+
n("switchResetPassword");
|
|
1056
|
+
}
|
|
1057
|
+
return (a, s) => (o(), S("div", Ht, [l.showSignUp ? (o(), S("span", Et, [s[1] || (s[1] = _("span", null, " 还没有账户?", -1)), i(e(Y), {
|
|
1058
1058
|
style: {
|
|
1059
1059
|
padding: "0px"
|
|
1060
1060
|
},
|
|
1061
|
-
onClick:
|
|
1061
|
+
onClick: g
|
|
1062
1062
|
}, {
|
|
1063
|
-
default:
|
|
1063
|
+
default: p(() => [...s[0] || (s[0] = [q("去注册?", -1)])]),
|
|
1064
1064
|
_: 1
|
|
1065
|
-
})])) : I("", !0),
|
|
1065
|
+
})])) : I("", !0), l.showResetPassword ? (o(), z(e(Y), {
|
|
1066
1066
|
key: 1,
|
|
1067
1067
|
style: {
|
|
1068
1068
|
padding: "0px"
|
|
1069
1069
|
},
|
|
1070
|
-
onClick:
|
|
1070
|
+
onClick: v
|
|
1071
1071
|
}, {
|
|
1072
|
-
default:
|
|
1072
|
+
default: p(() => [...s[2] || (s[2] = [q(" 忘记密码? ", -1)])]),
|
|
1073
1073
|
_: 1
|
|
1074
1074
|
})) : I("", !0)]));
|
|
1075
1075
|
}
|
|
@@ -1092,74 +1092,74 @@ const It = {
|
|
|
1092
1092
|
}
|
|
1093
1093
|
},
|
|
1094
1094
|
emits: ["submit", "switchSignUp", "switchResetPassword"],
|
|
1095
|
-
setup(
|
|
1095
|
+
setup(y, {
|
|
1096
1096
|
emit: u
|
|
1097
1097
|
}) {
|
|
1098
|
-
const
|
|
1098
|
+
const l = u, n = y, g = Re(), v = $(() => !!g.OAuth), {
|
|
1099
1099
|
appsData: a
|
|
1100
1100
|
} = j(), {
|
|
1101
1101
|
signUpAuthEnabled: s
|
|
1102
|
-
} = F(), d = $(() => a.value.authMethods),
|
|
1103
|
-
const
|
|
1104
|
-
return (d.value.login.emailPassword || d.value.login.phonePassword) &&
|
|
1102
|
+
} = F(), d = $(() => a.value.authMethods), b = $(() => s.value && (d.value.signUp.email || d.value.signUp.phone)), t = $(() => d.value.login.emailPassword || d.value.login.phonePassword), m = $(() => {
|
|
1103
|
+
const h = [];
|
|
1104
|
+
return (d.value.login.emailPassword || d.value.login.phonePassword) && h.push({
|
|
1105
1105
|
key: "password",
|
|
1106
1106
|
title: "密码登录"
|
|
1107
|
-
}), d.value.login.phoneCode &&
|
|
1107
|
+
}), d.value.login.phoneCode && h.push({
|
|
1108
1108
|
key: "phoneCode",
|
|
1109
1109
|
title: "手机验证码登录"
|
|
1110
|
-
}), d.value.login.emailCode &&
|
|
1110
|
+
}), d.value.login.emailCode && h.push({
|
|
1111
1111
|
key: "emailCode",
|
|
1112
1112
|
title: "邮箱验证码登录"
|
|
1113
|
-
}),
|
|
1114
|
-
}),
|
|
1113
|
+
}), h;
|
|
1114
|
+
}), r = A("password");
|
|
1115
1115
|
re(() => {
|
|
1116
|
-
var
|
|
1117
|
-
|
|
1116
|
+
var h;
|
|
1117
|
+
m.value.some((k) => k.key === r.value) || (r.value = ((h = m.value[0]) == null ? void 0 : h.key) || "password");
|
|
1118
1118
|
});
|
|
1119
1119
|
function w() {
|
|
1120
|
-
|
|
1120
|
+
l("switchSignUp");
|
|
1121
1121
|
}
|
|
1122
|
-
function
|
|
1123
|
-
|
|
1122
|
+
function c() {
|
|
1123
|
+
l("switchResetPassword");
|
|
1124
1124
|
}
|
|
1125
|
-
async function f(
|
|
1126
|
-
|
|
1127
|
-
method:
|
|
1128
|
-
...
|
|
1125
|
+
async function f(h) {
|
|
1126
|
+
l("submit", {
|
|
1127
|
+
method: r.value === "password" ? "password" : "code",
|
|
1128
|
+
...h
|
|
1129
1129
|
});
|
|
1130
1130
|
}
|
|
1131
|
-
return (
|
|
1132
|
-
"active-key":
|
|
1133
|
-
"onUpdate:activeKey": k[0] || (k[0] = (T) =>
|
|
1131
|
+
return (h, k) => (o(), S("div", jt, [m.value.length > 1 ? (o(), S("div", Kt, [i(e(ce), {
|
|
1132
|
+
"active-key": r.value,
|
|
1133
|
+
"onUpdate:activeKey": k[0] || (k[0] = (T) => r.value = T)
|
|
1134
1134
|
}, {
|
|
1135
|
-
default:
|
|
1135
|
+
default: p(() => [(o(!0), S(D, null, ue(m.value, (T) => (o(), z(e(pe), {
|
|
1136
1136
|
key: T.key,
|
|
1137
1137
|
title: T.title
|
|
1138
1138
|
}, null, 8, ["title"]))), 128))]),
|
|
1139
1139
|
_: 1
|
|
1140
|
-
}, 8, ["active-key"])])) : I("", !0),
|
|
1140
|
+
}, 8, ["active-key"])])) : I("", !0), r.value === "password" && (d.value.login.emailPassword || d.value.login.phonePassword) ? (o(), z(Ut, {
|
|
1141
1141
|
key: 1,
|
|
1142
|
-
loading:
|
|
1143
|
-
size:
|
|
1142
|
+
loading: n.loading,
|
|
1143
|
+
size: n.size,
|
|
1144
1144
|
"allow-phone": d.value.login.phonePassword,
|
|
1145
1145
|
onSubmit: f
|
|
1146
|
-
}, null, 8, ["loading", "size", "allow-phone"])) :
|
|
1146
|
+
}, null, 8, ["loading", "size", "allow-phone"])) : r.value === "phoneCode" ? (o(), z(Lt, {
|
|
1147
1147
|
key: 2,
|
|
1148
|
-
loading:
|
|
1149
|
-
size:
|
|
1148
|
+
loading: n.loading,
|
|
1149
|
+
size: n.size,
|
|
1150
1150
|
onSubmit: f
|
|
1151
|
-
}, null, 8, ["loading", "size"])) :
|
|
1151
|
+
}, null, 8, ["loading", "size"])) : r.value === "emailCode" ? (o(), z(Dt, {
|
|
1152
1152
|
key: 3,
|
|
1153
|
-
loading:
|
|
1154
|
-
size:
|
|
1153
|
+
loading: n.loading,
|
|
1154
|
+
size: n.size,
|
|
1155
1155
|
onSubmit: f
|
|
1156
|
-
}, null, 8, ["loading", "size"])) : I("", !0),
|
|
1156
|
+
}, null, 8, ["loading", "size"])) : I("", !0), v.value ? Z(h.$slots, "OAuth", {
|
|
1157
1157
|
key: 4
|
|
1158
1158
|
}, void 0, !0) : I("", !0), i(Nt, {
|
|
1159
|
-
"show-sign-up":
|
|
1159
|
+
"show-sign-up": b.value,
|
|
1160
1160
|
"show-reset-password": t.value,
|
|
1161
1161
|
onSwitchSignUp: w,
|
|
1162
|
-
onSwitchResetPassword:
|
|
1162
|
+
onSwitchResetPassword: c
|
|
1163
1163
|
}, null, 8, ["show-sign-up", "show-reset-password"])]));
|
|
1164
1164
|
}
|
|
1165
1165
|
}), Jt = /* @__PURE__ */ U(Wt, [["__scopeId", "data-v-fc20af9d"]]), Qt = {
|
|
@@ -1186,15 +1186,15 @@ const It = {
|
|
|
1186
1186
|
}
|
|
1187
1187
|
},
|
|
1188
1188
|
emits: ["submit"],
|
|
1189
|
-
setup(
|
|
1189
|
+
setup(y, {
|
|
1190
1190
|
emit: u
|
|
1191
1191
|
}) {
|
|
1192
|
-
const
|
|
1193
|
-
useTermsFormField:
|
|
1192
|
+
const l = u, {
|
|
1193
|
+
useTermsFormField: n
|
|
1194
1194
|
} = F(), {
|
|
1195
|
-
showTermsField:
|
|
1196
|
-
termsRules:
|
|
1197
|
-
} =
|
|
1195
|
+
showTermsField: g,
|
|
1196
|
+
termsRules: v
|
|
1197
|
+
} = n("signUp"), a = y, s = A(), d = A(!1), b = A(), t = A({
|
|
1198
1198
|
email: void 0,
|
|
1199
1199
|
userToken: void 0,
|
|
1200
1200
|
emailVerifyId: void 0,
|
|
@@ -1207,29 +1207,29 @@ const It = {
|
|
|
1207
1207
|
const w = ze();
|
|
1208
1208
|
w && (t.value.inviteCode = w);
|
|
1209
1209
|
});
|
|
1210
|
-
async function
|
|
1211
|
-
if (!await
|
|
1210
|
+
async function m() {
|
|
1211
|
+
if (!await b.value.validateField(["email"])) {
|
|
1212
1212
|
d.value = !0;
|
|
1213
|
-
const
|
|
1213
|
+
const c = await B().auth.verify.email.retry.post({
|
|
1214
1214
|
email: t.value.email,
|
|
1215
1215
|
purpose: a.purpose
|
|
1216
1216
|
});
|
|
1217
|
-
d.value = !1,
|
|
1217
|
+
d.value = !1, c.data && (t.value.emailVerifyId = c.data.emailVerifyId), W(s.value, c);
|
|
1218
1218
|
}
|
|
1219
1219
|
}
|
|
1220
|
-
async function
|
|
1221
|
-
|
|
1222
|
-
w ||
|
|
1220
|
+
async function r() {
|
|
1221
|
+
b.value.validate().then((w) => {
|
|
1222
|
+
w || l("submit", t.value);
|
|
1223
1223
|
});
|
|
1224
1224
|
}
|
|
1225
|
-
return (w,
|
|
1225
|
+
return (w, c) => (o(), S("div", Qt, [i(e(E), {
|
|
1226
1226
|
ref_key: "formRef",
|
|
1227
|
-
ref:
|
|
1227
|
+
ref: b,
|
|
1228
1228
|
model: t.value,
|
|
1229
1229
|
size: a.size,
|
|
1230
1230
|
"auto-label-width": ""
|
|
1231
1231
|
}, {
|
|
1232
|
-
default:
|
|
1232
|
+
default: p(() => [i(e(P), {
|
|
1233
1233
|
field: "email",
|
|
1234
1234
|
label: "邮箱",
|
|
1235
1235
|
"hide-label": "",
|
|
@@ -1241,9 +1241,9 @@ const It = {
|
|
|
1241
1241
|
message: "请输入有效的邮箱"
|
|
1242
1242
|
}]
|
|
1243
1243
|
}, {
|
|
1244
|
-
default:
|
|
1244
|
+
default: p(() => [i(e(C), {
|
|
1245
1245
|
modelValue: t.value.email,
|
|
1246
|
-
"onUpdate:modelValue":
|
|
1246
|
+
"onUpdate:modelValue": c[0] || (c[0] = (f) => t.value.email = f),
|
|
1247
1247
|
placeholder: "请输入邮箱",
|
|
1248
1248
|
autocomplete: "email username",
|
|
1249
1249
|
type: "email"
|
|
@@ -1258,9 +1258,9 @@ const It = {
|
|
|
1258
1258
|
message: "请输入验证码"
|
|
1259
1259
|
}]
|
|
1260
1260
|
}, {
|
|
1261
|
-
default:
|
|
1261
|
+
default: p(() => [_("div", Xt, [i(e(C), {
|
|
1262
1262
|
modelValue: t.value.userToken,
|
|
1263
|
-
"onUpdate:modelValue":
|
|
1263
|
+
"onUpdate:modelValue": c[1] || (c[1] = (f) => t.value.userToken = f),
|
|
1264
1264
|
placeholder: "请输入验证码",
|
|
1265
1265
|
autocomplete: "one-time-code"
|
|
1266
1266
|
}, null, 8, ["modelValue"]), i(K, {
|
|
@@ -1271,7 +1271,7 @@ const It = {
|
|
|
1271
1271
|
style: {
|
|
1272
1272
|
"margin-left": "10px"
|
|
1273
1273
|
},
|
|
1274
|
-
onSend:
|
|
1274
|
+
onSend: m
|
|
1275
1275
|
}, null, 8, ["size", "loading"])])]),
|
|
1276
1276
|
_: 1
|
|
1277
1277
|
}), i(e(P), {
|
|
@@ -1286,9 +1286,9 @@ const It = {
|
|
|
1286
1286
|
message: "密码不能少于10字符"
|
|
1287
1287
|
}]
|
|
1288
1288
|
}, {
|
|
1289
|
-
default:
|
|
1289
|
+
default: p(() => [i(e(C), {
|
|
1290
1290
|
modelValue: t.value.password,
|
|
1291
|
-
"onUpdate:modelValue":
|
|
1291
|
+
"onUpdate:modelValue": c[2] || (c[2] = (f) => t.value.password = f),
|
|
1292
1292
|
placeholder: "请输入密码",
|
|
1293
1293
|
type: "password",
|
|
1294
1294
|
autocomplete: "new-password"
|
|
@@ -1305,14 +1305,14 @@ const It = {
|
|
|
1305
1305
|
minLength: 10,
|
|
1306
1306
|
message: "确认密码不能少于10字符"
|
|
1307
1307
|
}, {
|
|
1308
|
-
validator: (f,
|
|
1309
|
-
f !== t.value.password ?
|
|
1308
|
+
validator: (f, h) => {
|
|
1309
|
+
f !== t.value.password ? h("两次密码输入不一致,请重新输入") : h();
|
|
1310
1310
|
}
|
|
1311
1311
|
}]
|
|
1312
1312
|
}, {
|
|
1313
|
-
default:
|
|
1313
|
+
default: p(() => [i(e(C), {
|
|
1314
1314
|
modelValue: t.value.confirmPassword,
|
|
1315
|
-
"onUpdate:modelValue":
|
|
1315
|
+
"onUpdate:modelValue": c[3] || (c[3] = (f) => t.value.confirmPassword = f),
|
|
1316
1316
|
placeholder: "请输入确认密码密码",
|
|
1317
1317
|
type: "password",
|
|
1318
1318
|
autocomplete: "new-password"
|
|
@@ -1326,31 +1326,31 @@ const It = {
|
|
|
1326
1326
|
required: !1
|
|
1327
1327
|
}]
|
|
1328
1328
|
}, {
|
|
1329
|
-
default:
|
|
1329
|
+
default: p(() => [i(e(C), {
|
|
1330
1330
|
modelValue: t.value.inviteCode,
|
|
1331
|
-
"onUpdate:modelValue":
|
|
1331
|
+
"onUpdate:modelValue": c[4] || (c[4] = (f) => t.value.inviteCode = f),
|
|
1332
1332
|
placeholder: "邀请码(可选)",
|
|
1333
1333
|
autocomplete: "off"
|
|
1334
1334
|
}, null, 8, ["modelValue"])]),
|
|
1335
1335
|
_: 1
|
|
1336
|
-
}), _("div", Yt, [i(e(
|
|
1336
|
+
}), _("div", Yt, [i(e(x), {
|
|
1337
1337
|
type: "primary",
|
|
1338
1338
|
loading: a.loading,
|
|
1339
1339
|
long: "",
|
|
1340
1340
|
size: a.size,
|
|
1341
|
-
onClick:
|
|
1341
|
+
onClick: r
|
|
1342
1342
|
}, {
|
|
1343
|
-
default:
|
|
1343
|
+
default: p(() => [...c[6] || (c[6] = [q(" 提交 ", -1)])]),
|
|
1344
1344
|
_: 1
|
|
1345
|
-
}, 8, ["loading", "size"]), e(
|
|
1345
|
+
}, 8, ["loading", "size"]), e(g) ? (o(), z(e(P), {
|
|
1346
1346
|
key: 0,
|
|
1347
1347
|
field: "acceptedTerms",
|
|
1348
1348
|
"hide-label": "",
|
|
1349
|
-
rules: e(
|
|
1349
|
+
rules: e(v)
|
|
1350
1350
|
}, {
|
|
1351
|
-
default:
|
|
1351
|
+
default: p(() => [i(ee, {
|
|
1352
1352
|
"accepted-terms": t.value.acceptedTerms,
|
|
1353
|
-
"onUpdate:acceptedTerms":
|
|
1353
|
+
"onUpdate:acceptedTerms": c[5] || (c[5] = (f) => t.value.acceptedTerms = f),
|
|
1354
1354
|
"current-view": "signUp"
|
|
1355
1355
|
}, null, 8, ["accepted-terms"])]),
|
|
1356
1356
|
_: 1
|
|
@@ -1385,15 +1385,15 @@ const It = {
|
|
|
1385
1385
|
}
|
|
1386
1386
|
},
|
|
1387
1387
|
emits: ["switchSignIn", "submit"],
|
|
1388
|
-
setup(
|
|
1388
|
+
setup(y, {
|
|
1389
1389
|
emit: u
|
|
1390
1390
|
}) {
|
|
1391
|
-
const
|
|
1392
|
-
useTermsFormField:
|
|
1391
|
+
const l = u, {
|
|
1392
|
+
useTermsFormField: n
|
|
1393
1393
|
} = F(), {
|
|
1394
|
-
showTermsField:
|
|
1395
|
-
termsRules:
|
|
1396
|
-
} =
|
|
1394
|
+
showTermsField: g,
|
|
1395
|
+
termsRules: v
|
|
1396
|
+
} = n("signUp"), a = y, s = A(), d = A(!1), b = A(), t = A({
|
|
1397
1397
|
phone: void 0,
|
|
1398
1398
|
code: void 0,
|
|
1399
1399
|
password: void 0,
|
|
@@ -1405,30 +1405,30 @@ const It = {
|
|
|
1405
1405
|
const f = ze();
|
|
1406
1406
|
f && (t.value.inviteCode = f);
|
|
1407
1407
|
});
|
|
1408
|
-
const
|
|
1408
|
+
const m = [{
|
|
1409
1409
|
required: !0,
|
|
1410
1410
|
message: "请输入确认密码"
|
|
1411
1411
|
}, {
|
|
1412
|
-
validator: (f,
|
|
1413
|
-
t.value.password && f !== t.value.password ?
|
|
1412
|
+
validator: (f, h) => {
|
|
1413
|
+
t.value.password && f !== t.value.password ? h("两次密码输入不一致") : h();
|
|
1414
1414
|
}
|
|
1415
1415
|
}];
|
|
1416
|
-
function
|
|
1417
|
-
|
|
1416
|
+
function r() {
|
|
1417
|
+
l("switchSignIn");
|
|
1418
1418
|
}
|
|
1419
1419
|
async function w() {
|
|
1420
|
-
if (!await
|
|
1420
|
+
if (!await b.value.validateField(["phone"])) {
|
|
1421
1421
|
d.value = !0;
|
|
1422
|
-
const
|
|
1422
|
+
const h = await B().auth.verify.sms.send.post({
|
|
1423
1423
|
phone: t.value.phone,
|
|
1424
1424
|
purpose: "signUp"
|
|
1425
1425
|
});
|
|
1426
|
-
d.value = !1, W(s.value,
|
|
1426
|
+
d.value = !1, W(s.value, h);
|
|
1427
1427
|
}
|
|
1428
1428
|
}
|
|
1429
|
-
async function
|
|
1430
|
-
|
|
1431
|
-
f ||
|
|
1429
|
+
async function c() {
|
|
1430
|
+
b.value.validate().then((f) => {
|
|
1431
|
+
f || l("submit", {
|
|
1432
1432
|
type: "phone",
|
|
1433
1433
|
phone: t.value.phone,
|
|
1434
1434
|
code: t.value.code,
|
|
@@ -1437,14 +1437,14 @@ const It = {
|
|
|
1437
1437
|
});
|
|
1438
1438
|
});
|
|
1439
1439
|
}
|
|
1440
|
-
return (f,
|
|
1440
|
+
return (f, h) => (o(), S("div", ts, [_("div", ss, [i(e(E), {
|
|
1441
1441
|
ref_key: "formRef",
|
|
1442
|
-
ref:
|
|
1442
|
+
ref: b,
|
|
1443
1443
|
model: t.value,
|
|
1444
1444
|
size: a.size,
|
|
1445
1445
|
"auto-label-width": ""
|
|
1446
1446
|
}, {
|
|
1447
|
-
default:
|
|
1447
|
+
default: p(() => [i(e(P), {
|
|
1448
1448
|
field: "phone",
|
|
1449
1449
|
label: "手机号",
|
|
1450
1450
|
"hide-label": "",
|
|
@@ -1456,9 +1456,9 @@ const It = {
|
|
|
1456
1456
|
message: "请输入有效的手机号"
|
|
1457
1457
|
}]
|
|
1458
1458
|
}, {
|
|
1459
|
-
default:
|
|
1459
|
+
default: p(() => [i(e(C), {
|
|
1460
1460
|
modelValue: t.value.phone,
|
|
1461
|
-
"onUpdate:modelValue":
|
|
1461
|
+
"onUpdate:modelValue": h[0] || (h[0] = (k) => t.value.phone = k),
|
|
1462
1462
|
placeholder: "请输入手机号",
|
|
1463
1463
|
autocomplete: "tel",
|
|
1464
1464
|
type: "tel"
|
|
@@ -1473,9 +1473,9 @@ const It = {
|
|
|
1473
1473
|
message: "请输入验证码"
|
|
1474
1474
|
}]
|
|
1475
1475
|
}, {
|
|
1476
|
-
default:
|
|
1476
|
+
default: p(() => [_("div", is, [i(e(C), {
|
|
1477
1477
|
modelValue: t.value.code,
|
|
1478
|
-
"onUpdate:modelValue":
|
|
1478
|
+
"onUpdate:modelValue": h[1] || (h[1] = (k) => t.value.code = k),
|
|
1479
1479
|
placeholder: "请输入验证码",
|
|
1480
1480
|
autocomplete: "one-time-code"
|
|
1481
1481
|
}, null, 8, ["modelValue"]), i(K, {
|
|
@@ -1502,9 +1502,9 @@ const It = {
|
|
|
1502
1502
|
message: "密码不能少于10字符"
|
|
1503
1503
|
}]
|
|
1504
1504
|
}, {
|
|
1505
|
-
default:
|
|
1505
|
+
default: p(() => [i(e(C), {
|
|
1506
1506
|
modelValue: t.value.password,
|
|
1507
|
-
"onUpdate:modelValue":
|
|
1507
|
+
"onUpdate:modelValue": h[2] || (h[2] = (k) => t.value.password = k),
|
|
1508
1508
|
placeholder: "请输入密码(可选)",
|
|
1509
1509
|
type: "password",
|
|
1510
1510
|
autocomplete: "new-password"
|
|
@@ -1515,11 +1515,11 @@ const It = {
|
|
|
1515
1515
|
field: "confirmPassword",
|
|
1516
1516
|
label: "确认密码",
|
|
1517
1517
|
"hide-label": "",
|
|
1518
|
-
rules:
|
|
1518
|
+
rules: m
|
|
1519
1519
|
}, {
|
|
1520
|
-
default:
|
|
1520
|
+
default: p(() => [i(e(C), {
|
|
1521
1521
|
modelValue: t.value.confirmPassword,
|
|
1522
|
-
"onUpdate:modelValue":
|
|
1522
|
+
"onUpdate:modelValue": h[3] || (h[3] = (k) => t.value.confirmPassword = k),
|
|
1523
1523
|
placeholder: "请输入确认密码",
|
|
1524
1524
|
type: "password",
|
|
1525
1525
|
autocomplete: "new-password"
|
|
@@ -1533,38 +1533,38 @@ const It = {
|
|
|
1533
1533
|
required: !1
|
|
1534
1534
|
}]
|
|
1535
1535
|
}, {
|
|
1536
|
-
default:
|
|
1536
|
+
default: p(() => [i(e(C), {
|
|
1537
1537
|
modelValue: t.value.inviteCode,
|
|
1538
|
-
"onUpdate:modelValue":
|
|
1538
|
+
"onUpdate:modelValue": h[4] || (h[4] = (k) => t.value.inviteCode = k),
|
|
1539
1539
|
placeholder: "邀请码(可选)",
|
|
1540
1540
|
autocomplete: "off"
|
|
1541
1541
|
}, null, 8, ["modelValue"])]),
|
|
1542
1542
|
_: 1
|
|
1543
|
-
}), _("div", as, [i(e(
|
|
1543
|
+
}), _("div", as, [i(e(x), {
|
|
1544
1544
|
type: "primary",
|
|
1545
1545
|
loading: a.loading,
|
|
1546
1546
|
long: "",
|
|
1547
1547
|
size: a.size,
|
|
1548
|
-
onClick:
|
|
1548
|
+
onClick: c
|
|
1549
1549
|
}, {
|
|
1550
|
-
default:
|
|
1550
|
+
default: p(() => [...h[6] || (h[6] = [q(" 注册 ", -1)])]),
|
|
1551
1551
|
_: 1
|
|
1552
|
-
}, 8, ["loading", "size"]), e(
|
|
1552
|
+
}, 8, ["loading", "size"]), e(g) ? (o(), z(e(P), {
|
|
1553
1553
|
key: 0,
|
|
1554
1554
|
field: "acceptedTerms",
|
|
1555
1555
|
"hide-label": "",
|
|
1556
|
-
rules: e(
|
|
1556
|
+
rules: e(v)
|
|
1557
1557
|
}, {
|
|
1558
|
-
default:
|
|
1558
|
+
default: p(() => [i(ee, {
|
|
1559
1559
|
"accepted-terms": t.value.acceptedTerms,
|
|
1560
|
-
"onUpdate:acceptedTerms":
|
|
1560
|
+
"onUpdate:acceptedTerms": h[5] || (h[5] = (k) => t.value.acceptedTerms = k),
|
|
1561
1561
|
"current-view": "signUp"
|
|
1562
1562
|
}, null, 8, ["accepted-terms"])]),
|
|
1563
1563
|
_: 1
|
|
1564
1564
|
}, 8, ["rules"])) : I("", !0)])]),
|
|
1565
1565
|
_: 1
|
|
1566
1566
|
}, 8, ["model", "size"])]), i(fe, {
|
|
1567
|
-
onSwitchSignIn:
|
|
1567
|
+
onSwitchSignIn: r
|
|
1568
1568
|
})]));
|
|
1569
1569
|
}
|
|
1570
1570
|
}), ls = /* @__PURE__ */ U(os, [["__scopeId", "data-v-d0af58fd"]]), ns = {
|
|
@@ -1595,60 +1595,60 @@ const It = {
|
|
|
1595
1595
|
}
|
|
1596
1596
|
},
|
|
1597
1597
|
emits: ["switchSignIn", "submit"],
|
|
1598
|
-
setup(
|
|
1598
|
+
setup(y, {
|
|
1599
1599
|
emit: u
|
|
1600
1600
|
}) {
|
|
1601
|
-
const
|
|
1602
|
-
appsData:
|
|
1601
|
+
const l = u, n = y, {
|
|
1602
|
+
appsData: g
|
|
1603
1603
|
} = j(), {
|
|
1604
|
-
registrationBlocked:
|
|
1604
|
+
registrationBlocked: v,
|
|
1605
1605
|
signUpAuthEnabled: a
|
|
1606
|
-
} = F(), s = $(() =>
|
|
1607
|
-
const
|
|
1608
|
-
return s.value.signUp.email &&
|
|
1606
|
+
} = F(), s = $(() => g.value.authMethods), d = $(() => {
|
|
1607
|
+
const r = [];
|
|
1608
|
+
return s.value.signUp.email && r.push({
|
|
1609
1609
|
key: "email",
|
|
1610
1610
|
title: "邮箱注册"
|
|
1611
|
-
}), s.value.signUp.phone &&
|
|
1611
|
+
}), s.value.signUp.phone && r.push({
|
|
1612
1612
|
key: "phone",
|
|
1613
1613
|
title: "手机号注册"
|
|
1614
|
-
}),
|
|
1615
|
-
}),
|
|
1614
|
+
}), r;
|
|
1615
|
+
}), b = A("email");
|
|
1616
1616
|
re(() => {
|
|
1617
|
-
var
|
|
1618
|
-
d.value.some((w) => w.key ===
|
|
1617
|
+
var r;
|
|
1618
|
+
d.value.some((w) => w.key === b.value) || (b.value = ((r = d.value[0]) == null ? void 0 : r.key) || "email");
|
|
1619
1619
|
});
|
|
1620
1620
|
function t() {
|
|
1621
|
-
|
|
1621
|
+
l("switchSignIn");
|
|
1622
1622
|
}
|
|
1623
|
-
async function
|
|
1624
|
-
|
|
1625
|
-
type:
|
|
1626
|
-
...
|
|
1623
|
+
async function m(r) {
|
|
1624
|
+
l("submit", {
|
|
1625
|
+
type: b.value,
|
|
1626
|
+
...r
|
|
1627
1627
|
});
|
|
1628
1628
|
}
|
|
1629
|
-
return (
|
|
1630
|
-
"active-key":
|
|
1631
|
-
"onUpdate:activeKey": w[0] || (w[0] = (
|
|
1629
|
+
return (r, w) => (o(), S("div", ns, [d.value.length > 1 ? (o(), S("div", rs, [i(e(ce), {
|
|
1630
|
+
"active-key": b.value,
|
|
1631
|
+
"onUpdate:activeKey": w[0] || (w[0] = (c) => b.value = c)
|
|
1632
1632
|
}, {
|
|
1633
|
-
default:
|
|
1634
|
-
key:
|
|
1635
|
-
title:
|
|
1633
|
+
default: p(() => [(o(!0), S(D, null, ue(d.value, (c) => (o(), z(e(pe), {
|
|
1634
|
+
key: c.key,
|
|
1635
|
+
title: c.title
|
|
1636
1636
|
}, null, 8, ["title"]))), 128))]),
|
|
1637
1637
|
_: 1
|
|
1638
|
-
}, 8, ["active-key"])])) : I("", !0), e(a) ? e(
|
|
1638
|
+
}, 8, ["active-key"])])) : I("", !0), e(a) ? e(v) ? (o(), S("div", ds, " 管理员尚未配置用户协议或隐私政策,暂无法注册。 ")) : (o(), S(D, {
|
|
1639
1639
|
key: 3
|
|
1640
|
-
}, [
|
|
1640
|
+
}, [b.value === "email" && s.value.signUp.email ? (o(), z(es, {
|
|
1641
1641
|
key: 0,
|
|
1642
|
-
size:
|
|
1643
|
-
loading:
|
|
1644
|
-
onSubmit:
|
|
1645
|
-
}, null, 8, ["size", "loading"])) :
|
|
1642
|
+
size: n.size,
|
|
1643
|
+
loading: y.loading,
|
|
1644
|
+
onSubmit: m
|
|
1645
|
+
}, null, 8, ["size", "loading"])) : b.value === "phone" && s.value.signUp.phone ? (o(), z(ls, {
|
|
1646
1646
|
key: 1,
|
|
1647
|
-
size:
|
|
1648
|
-
loading:
|
|
1649
|
-
onSubmit:
|
|
1647
|
+
size: n.size,
|
|
1648
|
+
loading: y.loading,
|
|
1649
|
+
onSubmit: m,
|
|
1650
1650
|
onSwitchSignIn: t
|
|
1651
|
-
}, null, 8, ["size", "loading"])) : (o(), S("div", cs, " 当前应用未开放用户注册 ")),
|
|
1651
|
+
}, null, 8, ["size", "loading"])) : (o(), S("div", cs, " 当前应用未开放用户注册 ")), b.value === "email" ? (o(), z(fe, {
|
|
1652
1652
|
key: 3,
|
|
1653
1653
|
onSwitchSignIn: t
|
|
1654
1654
|
})) : I("", !0)], 64)) : (o(), S("div", us, " 系统已停止用户注册 "))]));
|
|
@@ -1672,24 +1672,24 @@ const It = {
|
|
|
1672
1672
|
default: 60
|
|
1673
1673
|
}
|
|
1674
1674
|
},
|
|
1675
|
-
setup(
|
|
1676
|
-
const u =
|
|
1677
|
-
currentView:
|
|
1675
|
+
setup(y) {
|
|
1676
|
+
const u = y, l = `${u.size}px`, n = `${u.fontSize}px`, g = `${u.lineHeight}px`, {
|
|
1677
|
+
currentView: v
|
|
1678
1678
|
} = N(), {
|
|
1679
1679
|
appsData: a
|
|
1680
|
-
} = j(), s = $(() =>
|
|
1681
|
-
return (d,
|
|
1680
|
+
} = j(), s = $(() => v.value === "signIn" ? `${a.value.name}登录` : v.value === "signUp" ? `${a.value.name}账号注册` : v.value === "resetPassword" ? `${a.value.name}密码重置` : "");
|
|
1681
|
+
return (d, b) => (o(), S("div", {
|
|
1682
1682
|
class: "Title",
|
|
1683
1683
|
style: G({
|
|
1684
|
-
fontSize:
|
|
1685
|
-
lineHeight:
|
|
1684
|
+
fontSize: n,
|
|
1685
|
+
lineHeight: g
|
|
1686
1686
|
})
|
|
1687
1687
|
}, [e(a).applicationLogoUrl ? (o(), S("img", {
|
|
1688
1688
|
key: 0,
|
|
1689
1689
|
src: e(a).applicationLogoUrl,
|
|
1690
1690
|
srcset: "",
|
|
1691
1691
|
style: G({
|
|
1692
|
-
width:
|
|
1692
|
+
width: l
|
|
1693
1693
|
})
|
|
1694
1694
|
}, null, 12, fs)) : I("", !0), _("span", null, M(s.value), 1), Z(d.$slots, "default", {}, void 0, !0)], 4));
|
|
1695
1695
|
}
|
|
@@ -1709,21 +1709,21 @@ const It = {
|
|
|
1709
1709
|
default: () => !0
|
|
1710
1710
|
}
|
|
1711
1711
|
},
|
|
1712
|
-
setup(
|
|
1713
|
-
const u =
|
|
1714
|
-
signInSubmit:
|
|
1715
|
-
passkeySignInSubmit:
|
|
1716
|
-
signUpSubmit:
|
|
1717
|
-
resetPasswordSubmit:
|
|
1712
|
+
setup(y) {
|
|
1713
|
+
const u = y, {
|
|
1714
|
+
signInSubmit: l,
|
|
1715
|
+
passkeySignInSubmit: n,
|
|
1716
|
+
signUpSubmit: g,
|
|
1717
|
+
resetPasswordSubmit: v,
|
|
1718
1718
|
currentView: a,
|
|
1719
1719
|
authSignInLoading: s,
|
|
1720
1720
|
authSignUpLoading: d,
|
|
1721
|
-
resetPasswordLoading:
|
|
1721
|
+
resetPasswordLoading: b,
|
|
1722
1722
|
switchSignUp: t,
|
|
1723
|
-
switchResetPassword:
|
|
1724
|
-
switchSignIn:
|
|
1723
|
+
switchResetPassword: m,
|
|
1724
|
+
switchSignIn: r
|
|
1725
1725
|
} = N();
|
|
1726
|
-
return (w,
|
|
1726
|
+
return (w, c) => (o(), S("div", gs, [y.showTitle ? (o(), z(Ve, {
|
|
1727
1727
|
key: 0,
|
|
1728
1728
|
size: 32,
|
|
1729
1729
|
"font-size": 20
|
|
@@ -1732,29 +1732,29 @@ const It = {
|
|
|
1732
1732
|
size: u.size,
|
|
1733
1733
|
loading: e(s),
|
|
1734
1734
|
onSwitchSignUp: e(t),
|
|
1735
|
-
onSwitchResetPassword: e(
|
|
1736
|
-
onSubmit:
|
|
1735
|
+
onSwitchResetPassword: e(m),
|
|
1736
|
+
onSubmit: c[0] || (c[0] = (f) => e(l)(f))
|
|
1737
1737
|
}, {
|
|
1738
|
-
OAuth:
|
|
1738
|
+
OAuth: p(() => [i(ot, {
|
|
1739
1739
|
size: u.size,
|
|
1740
|
-
onPasskeySubmit: e(
|
|
1740
|
+
onPasskeySubmit: e(n)
|
|
1741
1741
|
}, null, 8, ["size", "onPasskeySubmit"])]),
|
|
1742
1742
|
_: 1
|
|
1743
1743
|
}, 8, ["size", "loading", "onSwitchSignUp", "onSwitchResetPassword"])) : e(a) === "signUp" ? (o(), z(ms, {
|
|
1744
1744
|
key: 1,
|
|
1745
1745
|
size: u.size,
|
|
1746
1746
|
loading: e(d),
|
|
1747
|
-
onSwitchSignIn: e(
|
|
1748
|
-
onSubmit:
|
|
1747
|
+
onSwitchSignIn: e(r),
|
|
1748
|
+
onSubmit: c[1] || (c[1] = (f) => e(g)(f))
|
|
1749
1749
|
}, null, 8, ["size", "loading", "onSwitchSignIn"])) : e(a) === "resetPassword" ? (o(), z(_t, {
|
|
1750
1750
|
key: 2,
|
|
1751
1751
|
size: u.size,
|
|
1752
|
-
loading: e(
|
|
1753
|
-
onSwitchSignIn: e(
|
|
1754
|
-
onSubmit:
|
|
1752
|
+
loading: e(b),
|
|
1753
|
+
onSwitchSignIn: e(r),
|
|
1754
|
+
onSubmit: c[2] || (c[2] = (f) => e(v)(f))
|
|
1755
1755
|
}, null, 8, ["size", "loading", "onSwitchSignIn"])) : I("", !0)])]));
|
|
1756
1756
|
}
|
|
1757
|
-
}),
|
|
1757
|
+
}), ws = /* @__PURE__ */ U(ys, [["__scopeId", "data-v-41b6adcc"]]), bs = /* @__PURE__ */ V({
|
|
1758
1758
|
__name: "AuthkitAuthModal",
|
|
1759
1759
|
props: {
|
|
1760
1760
|
size: {
|
|
@@ -1762,28 +1762,28 @@ const It = {
|
|
|
1762
1762
|
}
|
|
1763
1763
|
},
|
|
1764
1764
|
emits: ["close"],
|
|
1765
|
-
setup(
|
|
1765
|
+
setup(y, {
|
|
1766
1766
|
emit: u
|
|
1767
1767
|
}) {
|
|
1768
|
-
const
|
|
1769
|
-
onSignIn:
|
|
1770
|
-
switchSignIn:
|
|
1768
|
+
const l = u, {
|
|
1769
|
+
onSignIn: n,
|
|
1770
|
+
switchSignIn: g
|
|
1771
1771
|
} = N(), {
|
|
1772
|
-
close:
|
|
1772
|
+
close: v
|
|
1773
1773
|
} = _e();
|
|
1774
1774
|
let a = null;
|
|
1775
1775
|
H(() => {
|
|
1776
|
-
a =
|
|
1776
|
+
a = n(() => v());
|
|
1777
1777
|
}), de(() => {
|
|
1778
1778
|
a == null || a(), a = null;
|
|
1779
1779
|
});
|
|
1780
|
-
function s(
|
|
1781
|
-
|
|
1780
|
+
function s(b) {
|
|
1781
|
+
b || d();
|
|
1782
1782
|
}
|
|
1783
1783
|
function d() {
|
|
1784
|
-
|
|
1784
|
+
g(), v(), l("close");
|
|
1785
1785
|
}
|
|
1786
|
-
return (
|
|
1786
|
+
return (b, t) => (o(), z(e(Le), {
|
|
1787
1787
|
visible: !0,
|
|
1788
1788
|
footer: !1,
|
|
1789
1789
|
"mask-closable": !1,
|
|
@@ -1793,59 +1793,56 @@ const It = {
|
|
|
1793
1793
|
"onUpdate:visible": s,
|
|
1794
1794
|
onClose: d
|
|
1795
1795
|
}, {
|
|
1796
|
-
title:
|
|
1797
|
-
default:
|
|
1796
|
+
title: p(() => [i(Ve)]),
|
|
1797
|
+
default: p(() => [i(ws, {
|
|
1798
1798
|
"show-title": !1,
|
|
1799
|
-
size:
|
|
1799
|
+
size: y.size
|
|
1800
1800
|
}, null, 8, ["size"])]),
|
|
1801
1801
|
_: 1
|
|
1802
1802
|
}));
|
|
1803
1803
|
}
|
|
1804
|
-
}), _s = /* @__PURE__ */ U(
|
|
1805
|
-
function Ce(
|
|
1804
|
+
}), _s = /* @__PURE__ */ U(bs, [["__scopeId", "data-v-19a4d5d0"]]);
|
|
1805
|
+
function Ce(y, u = {}) {
|
|
1806
1806
|
const {
|
|
1807
|
-
bindIdentityRedirect:
|
|
1808
|
-
closePopupOnBindSuccess:
|
|
1809
|
-
restoreRedirectAfterSignIn:
|
|
1810
|
-
defaultRedirect:
|
|
1807
|
+
bindIdentityRedirect: l = "",
|
|
1808
|
+
closePopupOnBindSuccess: n = !0,
|
|
1809
|
+
restoreRedirectAfterSignIn: g = !0,
|
|
1810
|
+
defaultRedirect: v = ""
|
|
1811
1811
|
} = u, a = A(!1), {
|
|
1812
|
-
|
|
1812
|
+
consumeOAuthLoginCallback: s,
|
|
1813
|
+
hasOAuthLoginConsumeStarted: d
|
|
1813
1814
|
} = N();
|
|
1814
|
-
async function
|
|
1815
|
+
async function b() {
|
|
1815
1816
|
if (typeof window > "u")
|
|
1816
1817
|
return !1;
|
|
1817
|
-
const
|
|
1818
|
-
if (!Ie(
|
|
1818
|
+
const t = new URL(window.location.href), m = d();
|
|
1819
|
+
if (!Ie(t) && !m)
|
|
1819
1820
|
return !1;
|
|
1820
|
-
const
|
|
1821
|
-
if (
|
|
1822
|
-
return window.history.replaceState({}, "",
|
|
1823
|
-
if (
|
|
1824
|
-
const
|
|
1825
|
-
return window.history.replaceState({}, "",
|
|
1826
|
-
}
|
|
1827
|
-
|
|
1828
|
-
if (!p)
|
|
1821
|
+
const r = t.searchParams.get("error");
|
|
1822
|
+
if (r)
|
|
1823
|
+
return window.history.replaceState({}, "", te(t)), oe.error(r), !0;
|
|
1824
|
+
if (t.searchParams.get("bindSuccess") === "true") {
|
|
1825
|
+
const c = t.searchParams.get("provider");
|
|
1826
|
+
return window.history.replaceState({}, "", te(t)), oe.success(c ? `${c} 绑定成功` : "绑定成功"), n && window.opener && setTimeout(() => window.close(), 800), !0;
|
|
1827
|
+
}
|
|
1828
|
+
if (!!!t.searchParams.get("loginCode") && !m)
|
|
1829
1829
|
return !1;
|
|
1830
1830
|
a.value = !0;
|
|
1831
1831
|
try {
|
|
1832
|
-
const
|
|
1833
|
-
if (
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
return await b.replace(n), !0;
|
|
1840
|
-
const y = Ge(h) || g;
|
|
1841
|
-
return y && await b.replace(y), !0;
|
|
1832
|
+
const c = await s();
|
|
1833
|
+
if (!c)
|
|
1834
|
+
return window.history.replaceState({}, "", te(new URL(window.location.href))), !1;
|
|
1835
|
+
if (window.history.replaceState({}, "", te(new URL(window.location.href))), c.needBindIdentity && l)
|
|
1836
|
+
return await y.replace(l), !0;
|
|
1837
|
+
const h = Ge(g) || v;
|
|
1838
|
+
return h && await y.replace(h), !0;
|
|
1842
1839
|
} finally {
|
|
1843
1840
|
a.value = !1;
|
|
1844
1841
|
}
|
|
1845
1842
|
}
|
|
1846
1843
|
return {
|
|
1847
1844
|
processing: a,
|
|
1848
|
-
handleOAuthCallback:
|
|
1845
|
+
handleOAuthCallback: b
|
|
1849
1846
|
};
|
|
1850
1847
|
}
|
|
1851
1848
|
const ks = {
|
|
@@ -1868,20 +1865,20 @@ const ks = {
|
|
|
1868
1865
|
default: !0
|
|
1869
1866
|
}
|
|
1870
1867
|
},
|
|
1871
|
-
setup(
|
|
1872
|
-
const u =
|
|
1873
|
-
processing:
|
|
1874
|
-
handleOAuthCallback:
|
|
1875
|
-
} = Ce(
|
|
1868
|
+
setup(y) {
|
|
1869
|
+
const u = y, l = be(), {
|
|
1870
|
+
processing: n,
|
|
1871
|
+
handleOAuthCallback: g
|
|
1872
|
+
} = Ce(l, {
|
|
1876
1873
|
bindIdentityRedirect: u.bindIdentityRedirect,
|
|
1877
1874
|
closePopupOnBindSuccess: u.closePopupOnBindSuccess,
|
|
1878
1875
|
restoreRedirectAfterSignIn: u.restoreRedirectAfterSignIn
|
|
1879
1876
|
});
|
|
1880
1877
|
return H(() => {
|
|
1881
|
-
|
|
1882
|
-
}), (
|
|
1878
|
+
g();
|
|
1879
|
+
}), (v, a) => (o(), z(Te, {
|
|
1883
1880
|
to: "body"
|
|
1884
|
-
}, [e(
|
|
1881
|
+
}, [e(n) ? (o(), S("div", ks, [...a[0] || (a[0] = [_("div", {
|
|
1885
1882
|
class: "AuthkitOAuthCallbackOverlay__panel"
|
|
1886
1883
|
}, [_("div", {
|
|
1887
1884
|
class: "AuthkitOAuthCallbackOverlay__spinner"
|
|
@@ -1924,60 +1921,60 @@ const ks = {
|
|
|
1924
1921
|
}
|
|
1925
1922
|
},
|
|
1926
1923
|
emits: ["toPrivacyPolicy", "toUserServiceAgreement"],
|
|
1927
|
-
setup(
|
|
1924
|
+
setup(y, {
|
|
1928
1925
|
emit: u
|
|
1929
1926
|
}) {
|
|
1930
1927
|
const {
|
|
1931
|
-
config:
|
|
1932
|
-
} = me(),
|
|
1928
|
+
config: l
|
|
1929
|
+
} = me(), n = y, g = u, v = qe(), {
|
|
1933
1930
|
openLegalDoc: a
|
|
1934
1931
|
} = Ae({
|
|
1935
|
-
route:
|
|
1932
|
+
route: v
|
|
1936
1933
|
}), {
|
|
1937
1934
|
isOpen: s
|
|
1938
1935
|
} = _e(), {
|
|
1939
1936
|
restoreSession: d,
|
|
1940
|
-
onSignIn:
|
|
1937
|
+
onSignIn: b,
|
|
1941
1938
|
onSignOut: t
|
|
1942
1939
|
} = N(), {
|
|
1943
|
-
fetchUserProfile:
|
|
1944
|
-
clearUserProfile:
|
|
1940
|
+
fetchUserProfile: m,
|
|
1941
|
+
clearUserProfile: r,
|
|
1945
1942
|
markAuthSessionBootstrapped: w
|
|
1946
1943
|
} = Pe(), {
|
|
1947
|
-
appsAuthPageInfoApi:
|
|
1948
|
-
} = j(), f =
|
|
1949
|
-
|
|
1950
|
-
}),
|
|
1951
|
-
|
|
1944
|
+
appsAuthPageInfoApi: c
|
|
1945
|
+
} = j(), f = b(() => {
|
|
1946
|
+
m();
|
|
1947
|
+
}), h = t(() => {
|
|
1948
|
+
r();
|
|
1952
1949
|
});
|
|
1953
1950
|
function k() {
|
|
1954
|
-
if (
|
|
1951
|
+
if (l.legalDocsMode === "builtin") {
|
|
1955
1952
|
a("privacyPolicy");
|
|
1956
1953
|
return;
|
|
1957
1954
|
}
|
|
1958
|
-
|
|
1955
|
+
g("toPrivacyPolicy");
|
|
1959
1956
|
}
|
|
1960
1957
|
function T() {
|
|
1961
|
-
if (
|
|
1958
|
+
if (l.legalDocsMode === "builtin") {
|
|
1962
1959
|
a("userServiceAgreement");
|
|
1963
1960
|
return;
|
|
1964
1961
|
}
|
|
1965
|
-
|
|
1962
|
+
g("toUserServiceAgreement");
|
|
1966
1963
|
}
|
|
1967
|
-
let
|
|
1964
|
+
let L = null;
|
|
1968
1965
|
async function R() {
|
|
1969
1966
|
try {
|
|
1970
|
-
if (
|
|
1971
|
-
await
|
|
1967
|
+
if (n.fetchAppInfo && c(), n.restoreSession && await d()) {
|
|
1968
|
+
await m();
|
|
1972
1969
|
return;
|
|
1973
1970
|
}
|
|
1974
|
-
|
|
1971
|
+
r();
|
|
1975
1972
|
} finally {
|
|
1976
1973
|
w();
|
|
1977
1974
|
}
|
|
1978
1975
|
}
|
|
1979
1976
|
function O() {
|
|
1980
|
-
return
|
|
1977
|
+
return L || (L = R()), L;
|
|
1981
1978
|
}
|
|
1982
1979
|
return typeof window < "u" && O(), H(() => {
|
|
1983
1980
|
kt({
|
|
@@ -1985,15 +1982,15 @@ const ks = {
|
|
|
1985
1982
|
onUserServiceAgreement: T
|
|
1986
1983
|
});
|
|
1987
1984
|
}), de(() => {
|
|
1988
|
-
f(),
|
|
1989
|
-
}), (J, js) => (o(), S(D, null, [Z(J.$slots, "default"),
|
|
1985
|
+
f(), h();
|
|
1986
|
+
}), (J, js) => (o(), S(D, null, [Z(J.$slots, "default"), n.handleOAuthCallback ? (o(), z(zs, {
|
|
1990
1987
|
key: 0,
|
|
1991
|
-
"bind-identity-redirect":
|
|
1992
|
-
"close-popup-on-bind-success":
|
|
1993
|
-
"restore-redirect-after-sign-in":
|
|
1994
|
-
}, null, 8, ["bind-identity-redirect", "close-popup-on-bind-success", "restore-redirect-after-sign-in"])) : I("", !0),
|
|
1988
|
+
"bind-identity-redirect": n.bindIdentityRedirect,
|
|
1989
|
+
"close-popup-on-bind-success": n.closePopupOnBindSuccess,
|
|
1990
|
+
"restore-redirect-after-sign-in": n.restoreRedirectAfterSignIn
|
|
1991
|
+
}, null, 8, ["bind-identity-redirect", "close-popup-on-bind-success", "restore-redirect-after-sign-in"])) : I("", !0), n.showAuthModal && e(s) ? (o(), z(_s, {
|
|
1995
1992
|
key: 1,
|
|
1996
|
-
size:
|
|
1993
|
+
size: n.authModalSize
|
|
1997
1994
|
}, null, 8, ["size"])) : I("", !0)], 64));
|
|
1998
1995
|
}
|
|
1999
1996
|
}), Is = {
|
|
@@ -2042,15 +2039,15 @@ const ks = {
|
|
|
2042
2039
|
default: "color"
|
|
2043
2040
|
}
|
|
2044
2041
|
},
|
|
2045
|
-
setup(
|
|
2046
|
-
const u =
|
|
2042
|
+
setup(y) {
|
|
2043
|
+
const u = y, l = $(() => u.backgroundType === "color" ? {
|
|
2047
2044
|
backgroundColor: u.backgroundColor
|
|
2048
2045
|
} : {
|
|
2049
2046
|
backgroundImage: `url(${u.backgroundImage})`
|
|
2050
2047
|
});
|
|
2051
|
-
return (
|
|
2048
|
+
return (n, g) => (o(), S("div", {
|
|
2052
2049
|
class: "auth",
|
|
2053
|
-
style: G(
|
|
2050
|
+
style: G(l.value)
|
|
2054
2051
|
}, [_("div", Is, [u.name ? (o(), S("a", {
|
|
2055
2052
|
key: 0,
|
|
2056
2053
|
href: u.appHomePage,
|
|
@@ -2059,7 +2056,7 @@ const ks = {
|
|
|
2059
2056
|
style: G({
|
|
2060
2057
|
color: u.linkColor
|
|
2061
2058
|
})
|
|
2062
|
-
}, " 返回主页 ", 12, As)) : I("", !0)]), _("div", Ps, [Z(
|
|
2059
|
+
}, " 返回主页 ", 12, As)) : I("", !0)]), _("div", Ps, [Z(n.$slots, "default", {}, void 0, !0)])], 4));
|
|
2063
2060
|
}
|
|
2064
2061
|
}), hi = /* @__PURE__ */ U(Vs, [["__scopeId", "data-v-0e13d3ff"]]), Cs = {
|
|
2065
2062
|
class: "box"
|
|
@@ -2122,73 +2119,73 @@ const ks = {
|
|
|
2122
2119
|
default: () => ""
|
|
2123
2120
|
}
|
|
2124
2121
|
},
|
|
2125
|
-
setup(
|
|
2126
|
-
const u = A(!1),
|
|
2122
|
+
setup(y) {
|
|
2123
|
+
const u = A(!1), l = y, n = A({
|
|
2127
2124
|
name: "",
|
|
2128
2125
|
homePageUrl: "",
|
|
2129
2126
|
createAt: "",
|
|
2130
2127
|
authorizationCallback: ""
|
|
2131
2128
|
});
|
|
2132
|
-
async function
|
|
2129
|
+
async function g() {
|
|
2133
2130
|
const {
|
|
2134
2131
|
data: a,
|
|
2135
2132
|
error: s
|
|
2136
2133
|
} = await B().auth.apps.authPageInfo.post({
|
|
2137
2134
|
clientKey: Je().config.clientKey
|
|
2138
2135
|
});
|
|
2139
|
-
s || !a || (
|
|
2136
|
+
s || !a || (n.value = {
|
|
2140
2137
|
name: a.name,
|
|
2141
2138
|
homePageUrl: a.homePageUrl || "",
|
|
2142
2139
|
createAt: "",
|
|
2143
2140
|
authorizationCallback: a.authorizationCallback || ""
|
|
2144
2141
|
});
|
|
2145
2142
|
}
|
|
2146
|
-
|
|
2147
|
-
async function
|
|
2143
|
+
g();
|
|
2144
|
+
async function v() {
|
|
2148
2145
|
u.value = !0;
|
|
2149
2146
|
const {
|
|
2150
2147
|
data: a,
|
|
2151
2148
|
error: s
|
|
2152
2149
|
} = await B().auth.oauth2.authorize.post({
|
|
2153
|
-
client_id:
|
|
2154
|
-
response_type:
|
|
2155
|
-
scope:
|
|
2156
|
-
state:
|
|
2157
|
-
redirect_uri:
|
|
2150
|
+
client_id: l.clientId,
|
|
2151
|
+
response_type: l.responseType,
|
|
2152
|
+
scope: l.scope,
|
|
2153
|
+
state: l.state,
|
|
2154
|
+
redirect_uri: l.redirectUri
|
|
2158
2155
|
});
|
|
2159
2156
|
if (u.value = !1, s || !a)
|
|
2160
2157
|
return;
|
|
2161
2158
|
const d = a;
|
|
2162
2159
|
window.location.href = d.authorizeUrl;
|
|
2163
2160
|
}
|
|
2164
|
-
return (a, s) => (o(), S("div", Cs, [_("div", Us, M(`授权 ${
|
|
2165
|
-
default:
|
|
2166
|
-
default:
|
|
2161
|
+
return (a, s) => (o(), S("div", Cs, [_("div", Us, M(`授权 ${n.value.name}`), 1), _("div", $s, [i(e(xe), null, {
|
|
2162
|
+
default: p(() => [i(e(le), null, {
|
|
2163
|
+
default: p(() => {
|
|
2167
2164
|
var d;
|
|
2168
|
-
return [i(e(
|
|
2169
|
-
title:
|
|
2170
|
-
description: `想要使用您的${(d =
|
|
2165
|
+
return [i(e(ne), {
|
|
2166
|
+
title: n.value.name,
|
|
2167
|
+
description: `想要使用您的${(d = l.userInfo) == null ? void 0 : d.nickname}账户`
|
|
2171
2168
|
}, {
|
|
2172
|
-
avatar:
|
|
2173
|
-
var
|
|
2174
|
-
return [i(e(
|
|
2169
|
+
avatar: p(() => {
|
|
2170
|
+
var b;
|
|
2171
|
+
return [i(e(se), {
|
|
2175
2172
|
shape: "square",
|
|
2176
|
-
"image-url": (
|
|
2173
|
+
"image-url": (b = l.userInfo) == null ? void 0 : b.avatar
|
|
2177
2174
|
}, null, 8, ["image-url"])];
|
|
2178
2175
|
}),
|
|
2179
2176
|
_: 1
|
|
2180
2177
|
}, 8, ["title", "description"])];
|
|
2181
2178
|
}),
|
|
2182
2179
|
_: 1
|
|
2183
|
-
}), i(e(
|
|
2184
|
-
default:
|
|
2180
|
+
}), i(e(le), null, {
|
|
2181
|
+
default: p(() => [i(e(ne), {
|
|
2185
2182
|
title: "公开信息",
|
|
2186
2183
|
description: "头像、昵称"
|
|
2187
2184
|
}, {
|
|
2188
|
-
avatar:
|
|
2185
|
+
avatar: p(() => [i(e(se), {
|
|
2189
2186
|
shape: "square"
|
|
2190
2187
|
}, {
|
|
2191
|
-
default:
|
|
2188
|
+
default: p(() => [...s[0] || (s[0] = [_("img", {
|
|
2192
2189
|
alt: "avatar",
|
|
2193
2190
|
src: "https://p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/3ee5f13fb09879ecb5185e440cef6eb9.png~tplv-uwbnlip3yd-webp.webp"
|
|
2194
2191
|
}, null, -1)])]),
|
|
@@ -2197,15 +2194,15 @@ const ks = {
|
|
|
2197
2194
|
_: 1
|
|
2198
2195
|
})]),
|
|
2199
2196
|
_: 1
|
|
2200
|
-
}), i(e(
|
|
2201
|
-
default:
|
|
2197
|
+
}), i(e(le), null, {
|
|
2198
|
+
default: p(() => [i(e(ne), {
|
|
2202
2199
|
title: "个人用户数据",
|
|
2203
2200
|
description: "电子邮件地址"
|
|
2204
2201
|
}, {
|
|
2205
|
-
avatar:
|
|
2202
|
+
avatar: p(() => [i(e(se), {
|
|
2206
2203
|
shape: "square"
|
|
2207
2204
|
}, {
|
|
2208
|
-
default:
|
|
2205
|
+
default: p(() => [...s[1] || (s[1] = [_("img", {
|
|
2209
2206
|
alt: "avatar",
|
|
2210
2207
|
src: "https://p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/3ee5f13fb09879ecb5185e440cef6eb9.png~tplv-uwbnlip3yd-webp.webp"
|
|
2211
2208
|
}, null, -1)])]),
|
|
@@ -2216,24 +2213,24 @@ const ks = {
|
|
|
2216
2213
|
_: 1
|
|
2217
2214
|
})]),
|
|
2218
2215
|
_: 1
|
|
2219
|
-
}), i(e(
|
|
2216
|
+
}), i(e(x), {
|
|
2220
2217
|
type: "primary",
|
|
2221
|
-
size:
|
|
2218
|
+
size: l.size,
|
|
2222
2219
|
loading: u.value,
|
|
2223
|
-
onClick:
|
|
2220
|
+
onClick: v
|
|
2224
2221
|
}, {
|
|
2225
|
-
default:
|
|
2222
|
+
default: p(() => [...s[2] || (s[2] = [q(" 授权 ", -1)])]),
|
|
2226
2223
|
_: 1
|
|
2227
2224
|
}, 8, ["size", "loading"]), _("div", Rs, [s[3] || (s[3] = _("div", {
|
|
2228
2225
|
class: "redirect-hint"
|
|
2229
|
-
}, "授权后将跳转至", -1)), _("div", Ts, M(
|
|
2226
|
+
}, "授权后将跳转至", -1)), _("div", Ts, M(n.value.authorizationCallback), 1)])])]));
|
|
2230
2227
|
}
|
|
2231
2228
|
}), yi = /* @__PURE__ */ U(qs, [["__scopeId", "data-v-11c1752e"]]), Os = {
|
|
2232
2229
|
class: "oauth-callback"
|
|
2233
|
-
},
|
|
2230
|
+
}, Ls = {
|
|
2234
2231
|
key: 0,
|
|
2235
2232
|
class: "callback-loading"
|
|
2236
|
-
},
|
|
2233
|
+
}, xs = {
|
|
2237
2234
|
key: 1,
|
|
2238
2235
|
class: "callback-error"
|
|
2239
2236
|
}, Bs = {
|
|
@@ -2247,53 +2244,53 @@ const ks = {
|
|
|
2247
2244
|
bindIdentityRedirect: {}
|
|
2248
2245
|
},
|
|
2249
2246
|
emits: ["success", "error", "needBindIdentity"],
|
|
2250
|
-
setup(
|
|
2247
|
+
setup(y, {
|
|
2251
2248
|
emit: u
|
|
2252
2249
|
}) {
|
|
2253
|
-
const
|
|
2250
|
+
const l = y, n = u, g = A("登录成功,正在跳转..."), v = A(""), {
|
|
2254
2251
|
restoreSession: a
|
|
2255
|
-
} = N(), s =
|
|
2252
|
+
} = N(), s = be(), {
|
|
2256
2253
|
processing: d,
|
|
2257
|
-
handleOAuthCallback:
|
|
2254
|
+
handleOAuthCallback: b
|
|
2258
2255
|
} = Ce(s, {
|
|
2259
|
-
bindIdentityRedirect:
|
|
2260
|
-
defaultRedirect:
|
|
2256
|
+
bindIdentityRedirect: l.bindIdentityRedirect,
|
|
2257
|
+
defaultRedirect: l.defaultRedirect
|
|
2261
2258
|
});
|
|
2262
2259
|
async function t() {
|
|
2263
|
-
const
|
|
2264
|
-
if (!Ie(
|
|
2265
|
-
if (a()) {
|
|
2266
|
-
await s.replace(
|
|
2260
|
+
const r = new URL(window.location.href);
|
|
2261
|
+
if (!Ie(r)) {
|
|
2262
|
+
if (await a()) {
|
|
2263
|
+
await s.replace(l.defaultRedirect || "/");
|
|
2267
2264
|
return;
|
|
2268
2265
|
}
|
|
2269
|
-
|
|
2266
|
+
v.value = "无效的访问";
|
|
2270
2267
|
return;
|
|
2271
2268
|
}
|
|
2272
|
-
const w =
|
|
2269
|
+
const w = r.searchParams.get("error");
|
|
2273
2270
|
if (w) {
|
|
2274
|
-
|
|
2271
|
+
v.value = w, n("error", w), await b();
|
|
2275
2272
|
return;
|
|
2276
2273
|
}
|
|
2277
|
-
await
|
|
2274
|
+
await b() || (v.value = "登录失败:未能完成认证", n("error", v.value));
|
|
2278
2275
|
}
|
|
2279
|
-
function
|
|
2280
|
-
s.replace(
|
|
2276
|
+
function m() {
|
|
2277
|
+
s.replace(l.defaultRedirect || "/");
|
|
2281
2278
|
}
|
|
2282
2279
|
return H(() => {
|
|
2283
2280
|
t();
|
|
2284
|
-
}), (
|
|
2281
|
+
}), (r, w) => (o(), S("div", Os, [e(d) ? (o(), S("div", Ls, [w[0] || (w[0] = _("div", {
|
|
2285
2282
|
class: "spinner"
|
|
2286
|
-
}, null, -1)), _("p", null, M(
|
|
2283
|
+
}, null, -1)), _("p", null, M(l.loadingText ?? "正在登录..."), 1)])) : v.value ? (o(), S("div", xs, [w[1] || (w[1] = _("div", {
|
|
2287
2284
|
class: "error-icon"
|
|
2288
|
-
}, "✕", -1)), w[2] || (w[2] = _("h2", null, "登录失败", -1)), _("p", null, M(
|
|
2285
|
+
}, "✕", -1)), w[2] || (w[2] = _("h2", null, "登录失败", -1)), _("p", null, M(v.value), 1), _("button", {
|
|
2289
2286
|
class: "retry-btn",
|
|
2290
2287
|
type: "button",
|
|
2291
|
-
onClick:
|
|
2288
|
+
onClick: m
|
|
2292
2289
|
}, "返回重试")])) : (o(), S("div", Bs, [w[3] || (w[3] = _("div", {
|
|
2293
2290
|
class: "success-icon"
|
|
2294
|
-
}, "✓", -1)), _("p", null, M(
|
|
2291
|
+
}, "✓", -1)), _("p", null, M(g.value), 1)]))]));
|
|
2295
2292
|
}
|
|
2296
|
-
}),
|
|
2293
|
+
}), wi = /* @__PURE__ */ U(Ms, [["__scopeId", "data-v-f022e372"]]), Fs = {
|
|
2297
2294
|
class: "oauth-binding-account"
|
|
2298
2295
|
}, Ds = {
|
|
2299
2296
|
key: 1,
|
|
@@ -2310,88 +2307,88 @@ const ks = {
|
|
|
2310
2307
|
required: !0
|
|
2311
2308
|
}
|
|
2312
2309
|
},
|
|
2313
|
-
setup(
|
|
2310
|
+
setup(y) {
|
|
2314
2311
|
const {
|
|
2315
2312
|
config: u
|
|
2316
2313
|
} = me(), {
|
|
2317
|
-
userProfile:
|
|
2318
|
-
fetchUserProfile:
|
|
2319
|
-
} = Pe(),
|
|
2314
|
+
userProfile: l,
|
|
2315
|
+
fetchUserProfile: n
|
|
2316
|
+
} = Pe(), g = A("hidden"), v = A(!1);
|
|
2320
2317
|
let a;
|
|
2321
|
-
const s =
|
|
2322
|
-
var f,
|
|
2323
|
-
return ((
|
|
2318
|
+
const s = y, d = $(() => {
|
|
2319
|
+
var f, h, k;
|
|
2320
|
+
return ((h = (f = l.value) == null ? void 0 : f.github) == null ? void 0 : h.avatar_url) || ((k = l.value) == null ? void 0 : k.avatar) || "";
|
|
2324
2321
|
}), {
|
|
2325
|
-
buildBindOauthRedirectUri:
|
|
2322
|
+
buildBindOauthRedirectUri: b
|
|
2326
2323
|
} = Se();
|
|
2327
2324
|
function t(f) {
|
|
2328
|
-
|
|
2325
|
+
g.value = f;
|
|
2329
2326
|
}
|
|
2330
|
-
async function
|
|
2327
|
+
async function m() {
|
|
2331
2328
|
const f = u.appId;
|
|
2332
2329
|
if (!f) {
|
|
2333
2330
|
console.error("GitHub OAuth 失败: appId 未配置");
|
|
2334
2331
|
return;
|
|
2335
2332
|
}
|
|
2336
2333
|
const {
|
|
2337
|
-
data:
|
|
2334
|
+
data: h,
|
|
2338
2335
|
error: k
|
|
2339
2336
|
} = await B().auth.oauth.github.login.get({
|
|
2340
2337
|
appId: f,
|
|
2341
2338
|
mode: "bind",
|
|
2342
|
-
redirectUri:
|
|
2339
|
+
redirectUri: b()
|
|
2343
2340
|
});
|
|
2344
|
-
k || !
|
|
2341
|
+
k || !h || (v.value = !0, window.open(h.redirectUri, "_blank"));
|
|
2345
2342
|
}
|
|
2346
|
-
async function
|
|
2343
|
+
async function r() {
|
|
2347
2344
|
const {
|
|
2348
2345
|
error: f
|
|
2349
2346
|
} = await B().auth.users.unbind.oauth.post({
|
|
2350
2347
|
provider: "github"
|
|
2351
2348
|
});
|
|
2352
|
-
f || (
|
|
2349
|
+
f || (oe.success("解绑成功"), g.value = "hidden", n());
|
|
2353
2350
|
}
|
|
2354
2351
|
function w() {
|
|
2355
|
-
|
|
2352
|
+
g.value === "bind" && (g.value = "hidden", m()), g.value === "unbind" && r();
|
|
2356
2353
|
}
|
|
2357
|
-
function
|
|
2358
|
-
|
|
2354
|
+
function c() {
|
|
2355
|
+
v.value && n();
|
|
2359
2356
|
}
|
|
2360
2357
|
return H(() => {
|
|
2361
|
-
|
|
2358
|
+
l.value || n(), a = setInterval(c, 1e3);
|
|
2362
2359
|
}), de(() => {
|
|
2363
2360
|
a && clearInterval(a);
|
|
2364
|
-
}), (f,
|
|
2365
|
-
var k, T,
|
|
2366
|
-
return o(), S(D, null, [!((k = e(
|
|
2361
|
+
}), (f, h) => {
|
|
2362
|
+
var k, T, L;
|
|
2363
|
+
return o(), S(D, null, [!((k = e(l)) != null && k.github) && g.value === "hidden" ? (o(), z(e(ve), {
|
|
2367
2364
|
key: 0,
|
|
2368
2365
|
title: "绑定GitHub"
|
|
2369
2366
|
}, {
|
|
2370
|
-
action:
|
|
2367
|
+
action: p(() => [i(e(x), {
|
|
2371
2368
|
size: s.size,
|
|
2372
2369
|
type: "primary",
|
|
2373
|
-
onClick:
|
|
2370
|
+
onClick: h[0] || (h[0] = (R) => t("bind"))
|
|
2374
2371
|
}, {
|
|
2375
|
-
default:
|
|
2372
|
+
default: p(() => [...h[2] || (h[2] = [q(" 绑定GitHub ", -1)])]),
|
|
2376
2373
|
_: 1
|
|
2377
2374
|
}, 8, ["size"])]),
|
|
2378
|
-
default:
|
|
2375
|
+
default: p(() => [h[3] || (h[3] = q(" 您还未绑定GitHub账号,请点击绑定。 ", -1))]),
|
|
2379
2376
|
_: 1
|
|
2380
|
-
})) : I("", !0), (T = e(
|
|
2377
|
+
})) : I("", !0), (T = e(l)) != null && T.github && g.value === "hidden" ? (o(), z(e(ve), {
|
|
2381
2378
|
key: 1,
|
|
2382
2379
|
title: "解绑GitHub"
|
|
2383
2380
|
}, {
|
|
2384
|
-
action:
|
|
2381
|
+
action: p(() => [i(e(x), {
|
|
2385
2382
|
size: s.size,
|
|
2386
2383
|
type: "primary",
|
|
2387
|
-
onClick:
|
|
2384
|
+
onClick: h[1] || (h[1] = (R) => t("unbind"))
|
|
2388
2385
|
}, {
|
|
2389
|
-
default:
|
|
2386
|
+
default: p(() => [...h[5] || (h[5] = [q(" 解绑GitHub ", -1)])]),
|
|
2390
2387
|
_: 1
|
|
2391
2388
|
}, 8, ["size"])]),
|
|
2392
|
-
default:
|
|
2389
|
+
default: p(() => {
|
|
2393
2390
|
var R, O;
|
|
2394
|
-
return [_("div", Fs, [d.value ? (o(), z(e(
|
|
2391
|
+
return [_("div", Fs, [d.value ? (o(), z(e(se), {
|
|
2395
2392
|
key: 0,
|
|
2396
2393
|
class: "oauth-binding-account__avatar",
|
|
2397
2394
|
"image-url": d.value,
|
|
@@ -2400,58 +2397,58 @@ const ks = {
|
|
|
2400
2397
|
icon: e(X).github,
|
|
2401
2398
|
size: e(Ne),
|
|
2402
2399
|
alt: "GitHub"
|
|
2403
|
-
}, null, 8, ["icon", "size"])])), _("div", Hs, [
|
|
2400
|
+
}, null, 8, ["icon", "size"])])), _("div", Hs, [h[4] || (h[4] = _("div", {
|
|
2404
2401
|
class: "oauth-binding-account__provider"
|
|
2405
|
-
}, "GitHub", -1)), _("div", Es, M(((O = (R = e(
|
|
2402
|
+
}, "GitHub", -1)), _("div", Es, M(((O = (R = e(l)) == null ? void 0 : R.github) == null ? void 0 : O.login) || "GitHub"), 1)])])];
|
|
2406
2403
|
}),
|
|
2407
2404
|
_: 1
|
|
2408
|
-
})) : I("", !0),
|
|
2405
|
+
})) : I("", !0), g.value === "bind" || g.value === "unbind" ? (o(), z(je, {
|
|
2409
2406
|
key: 2,
|
|
2410
2407
|
size: s.size,
|
|
2411
|
-
email: (
|
|
2408
|
+
email: (L = e(l)) == null ? void 0 : L.email,
|
|
2412
2409
|
onNext: w
|
|
2413
2410
|
}, null, 8, ["size", "email"])) : I("", !0)], 64);
|
|
2414
2411
|
};
|
|
2415
2412
|
}
|
|
2416
|
-
}),
|
|
2413
|
+
}), bi = /* @__PURE__ */ U(Gs, [["__scopeId", "data-v-1cfa8892"]]), Ns = /* @__PURE__ */ V({
|
|
2417
2414
|
__name: "LegalDocViewer",
|
|
2418
2415
|
props: {
|
|
2419
2416
|
type: {},
|
|
2420
2417
|
appId: {}
|
|
2421
2418
|
},
|
|
2422
|
-
setup(
|
|
2423
|
-
const u =
|
|
2424
|
-
async function
|
|
2419
|
+
setup(y) {
|
|
2420
|
+
const u = y, l = $(() => Ke[u.type] ?? ""), n = A(!1), g = A(null);
|
|
2421
|
+
async function v() {
|
|
2425
2422
|
if (!u.type || !u.appId) {
|
|
2426
|
-
|
|
2423
|
+
g.value = null;
|
|
2427
2424
|
return;
|
|
2428
2425
|
}
|
|
2429
|
-
|
|
2426
|
+
n.value = !0;
|
|
2430
2427
|
const a = await Ye(u.appId);
|
|
2431
|
-
if (
|
|
2432
|
-
|
|
2428
|
+
if (n.value = !1, !a) {
|
|
2429
|
+
g.value = null;
|
|
2433
2430
|
return;
|
|
2434
2431
|
}
|
|
2435
2432
|
const s = a[u.type];
|
|
2436
|
-
|
|
2433
|
+
g.value = We(s) ? s : null;
|
|
2437
2434
|
}
|
|
2438
|
-
return
|
|
2439
|
-
|
|
2435
|
+
return we(() => [u.type, u.appId], () => {
|
|
2436
|
+
v();
|
|
2440
2437
|
}, {
|
|
2441
2438
|
immediate: !0
|
|
2442
|
-
}), (a, s) =>
|
|
2439
|
+
}), (a, s) => n.value ? (o(), z(e(Be), {
|
|
2443
2440
|
key: 0,
|
|
2444
|
-
loading:
|
|
2441
|
+
loading: n.value,
|
|
2445
2442
|
class: "legal-doc-viewer-loading"
|
|
2446
|
-
}, null, 8, ["loading"])) :
|
|
2443
|
+
}, null, 8, ["loading"])) : g.value ? (o(), z(e(Qe), {
|
|
2447
2444
|
key: 2,
|
|
2448
|
-
modelValue:
|
|
2449
|
-
"onUpdate:modelValue": s[1] || (s[1] = (d) =>
|
|
2445
|
+
modelValue: g.value,
|
|
2446
|
+
"onUpdate:modelValue": s[1] || (s[1] = (d) => g.value = d),
|
|
2450
2447
|
editable: !1
|
|
2451
2448
|
}, {
|
|
2452
|
-
title:
|
|
2453
|
-
modelValue:
|
|
2454
|
-
"onUpdate:modelValue": s[0] || (s[0] = (d) =>
|
|
2449
|
+
title: p(() => [i(e(Xe), {
|
|
2450
|
+
modelValue: l.value,
|
|
2451
|
+
"onUpdate:modelValue": s[0] || (s[0] = (d) => l.value = d),
|
|
2455
2452
|
editable: !1,
|
|
2456
2453
|
class: "legal-doc-viewer-title"
|
|
2457
2454
|
}, null, 8, ["modelValue"])]),
|
|
@@ -2463,7 +2460,7 @@ const ks = {
|
|
|
2463
2460
|
}
|
|
2464
2461
|
}), _i = /* @__PURE__ */ U(Ns, [["__scopeId", "data-v-fe9a3621"]]);
|
|
2465
2462
|
export {
|
|
2466
|
-
|
|
2463
|
+
ws as A,
|
|
2467
2464
|
es as E,
|
|
2468
2465
|
_i as L,
|
|
2469
2466
|
Q as O,
|
|
@@ -2475,14 +2472,14 @@ export {
|
|
|
2475
2472
|
_s as b,
|
|
2476
2473
|
Ve as c,
|
|
2477
2474
|
yi as d,
|
|
2478
|
-
|
|
2475
|
+
bi as e,
|
|
2479
2476
|
zs as f,
|
|
2480
|
-
|
|
2477
|
+
wi as g,
|
|
2481
2478
|
ot as h,
|
|
2482
2479
|
dt as i,
|
|
2483
2480
|
ft as j,
|
|
2484
2481
|
Jt as k,
|
|
2485
|
-
|
|
2482
|
+
Lt as l,
|
|
2486
2483
|
ms as m,
|
|
2487
2484
|
ls as n,
|
|
2488
2485
|
fe as o,
|