@huyooo/ui 2.0.11 → 2.0.12
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-gE5wTmN1.js → AuthkitAppSetting-Dgxd5GMR.js} +525 -519
- package/dist/{LegalDocViewer-B01O4nWg.js → LegalDocViewer-BWTrNIUE.js} +722 -719
- package/dist/{UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-DnDKhQgo.js → UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-CwB8zI6u.js} +1 -1
- package/dist/{WidthContainer-DP-vFuMF.js → WidthContainer-TAMNaEHp.js} +1 -1
- package/dist/authkit.js +2 -2
- package/dist/common.js +1 -1
- package/dist/composables/Authkit/useAuthkitPasskey.d.ts +4 -1
- package/dist/main.js +4 -4
- package/dist/style.css +1 -1
- package/dist/types/api/auth.generated.d.ts +45 -8
- package/dist/user.js +1 -1
- package/package.json +1 -1
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as C, computed as R, openBlock as n, createElementBlock as S, normalizeStyle as H, normalizeClass as ye, renderSlot as Q, createBlock as z, unref as e, createCommentVNode as A, ref as I, watch as ne, createElementVNode as k, createVNode as i, withCtx as p, createTextVNode as T, watchEffect as re, Fragment as F, renderList as ue, useModel as Ue, toDisplayString as B, mergeModels as $e, useSlots as Re, onMounted as M, onUnmounted as de, Teleport as Te } from "vue";
|
|
2
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 {
|
|
7
|
-
import { a as
|
|
8
|
-
import { g as
|
|
9
|
-
import { u as
|
|
10
|
-
import { o as
|
|
6
|
+
import { Form as D, FormItem as P, Input as V, Button as O, Link as J, Tabs as ce, TabPane as pe, Checkbox as Oe, Modal as xe, Message as le, List as Be, ListItem as ie, ListItemMeta as ae, Avatar as ee, Alert as ve, Spin as Le, Empty as Fe } from "@arco-design/web-vue";
|
|
7
|
+
import { a as L, u as G } from "./useAuthkitAuth-cHrJMM8E.js";
|
|
8
|
+
import { g as x, u as we } from "./apiClients-Ctcq8NZs.js";
|
|
9
|
+
import { u as N } from "./useAuthkitAppsAuthPageInfo-DZ1p-P3Q.js";
|
|
10
|
+
import { o as ge, j as Me, k as he, l as _e, u as De, m as Ee, n as K, i as ke, p as He, S as j, q as W, r as Se, s as ze, t as oe, v as Ge, w as Ne, b as je } from "./AuthkitAppSetting-Dgxd5GMR.js";
|
|
11
11
|
import { _ as U } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
12
12
|
/* empty css */
|
|
13
13
|
import "./index-Cn6LcfZO.js";
|
|
14
14
|
/* empty css */
|
|
15
|
-
import { u as Ie, L as
|
|
16
|
-
import { u as
|
|
15
|
+
import { u as Ie, L as We, i as Ke } from "./useLegalDocs-C4qk5CTb.js";
|
|
16
|
+
import { u as me } from "./runtime-Dp7MgwhI.js";
|
|
17
17
|
import { u as Ae } from "./useAuthkitUsersProfile-8FzLTfUJ.js";
|
|
18
18
|
/* empty css */
|
|
19
19
|
/* empty css */
|
|
20
20
|
import "./CustomTable-HDwqEcmB.js";
|
|
21
21
|
/* empty css */
|
|
22
|
-
import { TiptapEditor as
|
|
23
|
-
import { f as
|
|
24
|
-
const
|
|
22
|
+
import { TiptapEditor as Je, TiptapTitle as Qe } from "@huyooo/vue-tiptap";
|
|
23
|
+
import { f as Xe } from "./fetchAuthPageAboutUs-DV7ArpNZ.js";
|
|
24
|
+
const Ye = ["title", "aria-label", "disabled"], Ze = {
|
|
25
25
|
key: 0,
|
|
26
26
|
class: "OAuthItem__spinner"
|
|
27
|
-
},
|
|
27
|
+
}, et = /* @__PURE__ */ C({
|
|
28
28
|
__name: "AuthkitOauthItem",
|
|
29
29
|
props: {
|
|
30
30
|
size: {
|
|
@@ -48,39 +48,36 @@ const Ze = ["title", "aria-label", "disabled"], et = {
|
|
|
48
48
|
default: !1
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
|
-
setup(
|
|
52
|
-
const r =
|
|
53
|
-
width: `${
|
|
54
|
-
height: `${
|
|
55
|
-
padding: `${
|
|
56
|
-
"--oauth-icon-size": `${
|
|
51
|
+
setup(w) {
|
|
52
|
+
const r = w, u = R(() => ({
|
|
53
|
+
width: `${he}px`,
|
|
54
|
+
height: `${he}px`,
|
|
55
|
+
padding: `${Me}px`,
|
|
56
|
+
"--oauth-icon-size": `${ge}px`
|
|
57
57
|
}));
|
|
58
|
-
return (o, h) => (
|
|
59
|
-
class:
|
|
58
|
+
return (o, h) => (n(), S("button", {
|
|
59
|
+
class: ye(["OAuthItem", {
|
|
60
60
|
"OAuthItem--loading": r.loading
|
|
61
61
|
}]),
|
|
62
62
|
type: "button",
|
|
63
63
|
title: r.label,
|
|
64
64
|
"aria-label": r.label,
|
|
65
65
|
disabled: r.disabled || r.loading,
|
|
66
|
-
style:
|
|
67
|
-
}, [r.loading ? (
|
|
66
|
+
style: H(u.value)
|
|
67
|
+
}, [r.loading ? (n(), S("span", Ze)) : Q(o.$slots, "icon", {
|
|
68
68
|
key: 1
|
|
69
|
-
}, () => [r.icon ? (
|
|
69
|
+
}, () => [r.icon ? (n(), z(_e, {
|
|
70
70
|
key: 0,
|
|
71
71
|
icon: r.icon,
|
|
72
|
-
size: e(
|
|
73
|
-
}, null, 8, ["icon", "size"])) :
|
|
72
|
+
size: e(ge)
|
|
73
|
+
}, null, 8, ["icon", "size"])) : A("", !0)], !0)], 14, Ye));
|
|
74
74
|
}
|
|
75
|
-
}),
|
|
75
|
+
}), Z = /* @__PURE__ */ U(et, [["__scopeId", "data-v-e00c1d80"]]), tt = {
|
|
76
76
|
class: "OAuthList"
|
|
77
|
-
},
|
|
77
|
+
}, st = {
|
|
78
78
|
key: 0,
|
|
79
79
|
class: "OAuthDivider"
|
|
80
|
-
},
|
|
81
|
-
key: 1,
|
|
82
|
-
class: "OAuthHint"
|
|
83
|
-
}, ot = /* @__PURE__ */ V({
|
|
80
|
+
}, it = /* @__PURE__ */ C({
|
|
84
81
|
__name: "AuthkitOauthList",
|
|
85
82
|
props: {
|
|
86
83
|
size: {
|
|
@@ -89,96 +86,95 @@ const Ze = ["title", "aria-label", "disabled"], et = {
|
|
|
89
86
|
}
|
|
90
87
|
},
|
|
91
88
|
emits: ["passkeySubmit"],
|
|
92
|
-
setup(
|
|
89
|
+
setup(w, {
|
|
93
90
|
emit: r
|
|
94
91
|
}) {
|
|
95
92
|
const u = r, {
|
|
96
93
|
appsData: o
|
|
97
|
-
} =
|
|
98
|
-
|
|
99
|
-
supported: g,
|
|
100
|
-
loginWithPasskey: a,
|
|
101
|
-
formatError: s
|
|
94
|
+
} = N(), {
|
|
95
|
+
loginWithPasskey: h
|
|
102
96
|
} = De(), {
|
|
103
|
-
githubAuth:
|
|
104
|
-
googleAuth:
|
|
105
|
-
microsoftAuth:
|
|
106
|
-
wechatAuth:
|
|
97
|
+
githubAuth: g,
|
|
98
|
+
googleAuth: a,
|
|
99
|
+
microsoftAuth: s,
|
|
100
|
+
wechatAuth: d
|
|
107
101
|
} = ke(), {
|
|
108
|
-
acceptedTerms:
|
|
109
|
-
ensureTermsAcceptedForSignIn:
|
|
110
|
-
} =
|
|
111
|
-
function c(
|
|
112
|
-
|
|
113
|
-
acceptedTerms:
|
|
102
|
+
acceptedTerms: f,
|
|
103
|
+
ensureTermsAcceptedForSignIn: t
|
|
104
|
+
} = L();
|
|
105
|
+
function c(y) {
|
|
106
|
+
t() && y({
|
|
107
|
+
acceptedTerms: f.value ? !0 : void 0
|
|
114
108
|
});
|
|
115
109
|
}
|
|
116
|
-
const
|
|
117
|
-
const
|
|
118
|
-
return
|
|
119
|
-
});
|
|
120
|
-
async function
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
110
|
+
const l = w, _ = R(() => {
|
|
111
|
+
const y = o.value.oauth;
|
|
112
|
+
return y.google.enabled || y.microsoft.enabled || y.github.enabled || y.wechat.enabled;
|
|
113
|
+
}), m = I(!1);
|
|
114
|
+
async function b() {
|
|
115
|
+
const y = He();
|
|
116
|
+
if (y) {
|
|
117
|
+
console.info(`[Passkey] ${y}`);
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
try {
|
|
121
|
+
const v = await h(void 0, {
|
|
122
|
+
useBrowserAutofill: !0,
|
|
123
|
+
beforeVerify: t
|
|
124
|
+
});
|
|
125
|
+
if (!v)
|
|
126
|
+
return;
|
|
127
|
+
u("passkeySubmit", v);
|
|
128
|
+
} catch (v) {
|
|
129
|
+
if (v instanceof Error && (v.name === "AbortError" || v.name === "NotAllowedError")) {
|
|
130
|
+
console.info(`[Passkey] ${v.message}`);
|
|
131
|
+
return;
|
|
134
132
|
}
|
|
133
|
+
console.warn("[Passkey] 条件式登录初始化失败", v);
|
|
134
|
+
}
|
|
135
135
|
}
|
|
136
|
-
return (
|
|
136
|
+
return ne(() => o.value.authMethods.login.passkey, (y) => {
|
|
137
|
+
!y || m.value || (m.value = !0, b());
|
|
138
|
+
}, {
|
|
139
|
+
immediate: !0
|
|
140
|
+
}), (y, v) => (n(), S("div", tt, [_.value ? (n(), S("div", st, [...v[4] || (v[4] = [k("span", null, "其他登录方式", -1)])])) : A("", !0), k("div", {
|
|
137
141
|
class: "OAuthIcons",
|
|
138
|
-
style:
|
|
139
|
-
gap: `${e(
|
|
142
|
+
style: H({
|
|
143
|
+
gap: `${e(Ee)}px`
|
|
140
144
|
})
|
|
141
|
-
}, [e(o).oauth.google.enabled ? (
|
|
145
|
+
}, [e(o).oauth.google.enabled ? (n(), z(Z, {
|
|
142
146
|
key: 0,
|
|
143
|
-
icon: e(
|
|
147
|
+
icon: e(K).google,
|
|
144
148
|
label: "Google",
|
|
145
|
-
size:
|
|
146
|
-
onClick:
|
|
147
|
-
}, null, 8, ["icon", "size"])) :
|
|
149
|
+
size: l.size,
|
|
150
|
+
onClick: v[0] || (v[0] = ($) => c(e(a)))
|
|
151
|
+
}, null, 8, ["icon", "size"])) : A("", !0), e(o).oauth.github.enabled ? (n(), z(Z, {
|
|
148
152
|
key: 1,
|
|
149
|
-
icon: e(
|
|
153
|
+
icon: e(K).github,
|
|
150
154
|
label: "Github",
|
|
151
|
-
size:
|
|
152
|
-
onClick:
|
|
153
|
-
}, null, 8, ["icon", "size"])) :
|
|
155
|
+
size: l.size,
|
|
156
|
+
onClick: v[1] || (v[1] = ($) => c(e(g)))
|
|
157
|
+
}, null, 8, ["icon", "size"])) : A("", !0), e(o).oauth.microsoft.enabled ? (n(), z(Z, {
|
|
154
158
|
key: 2,
|
|
155
|
-
icon: e(
|
|
159
|
+
icon: e(K).microsoft,
|
|
156
160
|
label: "Microsoft",
|
|
157
|
-
size:
|
|
158
|
-
onClick:
|
|
159
|
-
}, null, 8, ["icon", "size"])) :
|
|
161
|
+
size: l.size,
|
|
162
|
+
onClick: v[2] || (v[2] = ($) => c(e(s)))
|
|
163
|
+
}, null, 8, ["icon", "size"])) : A("", !0), e(o).oauth.wechat.enabled ? (n(), z(Z, {
|
|
160
164
|
key: 3,
|
|
161
|
-
icon: e(
|
|
165
|
+
icon: e(K).wechat,
|
|
162
166
|
label: "微信",
|
|
163
|
-
size:
|
|
164
|
-
onClick:
|
|
165
|
-
}, null, 8, ["icon", "size"])) :
|
|
166
|
-
key: 4,
|
|
167
|
-
icon: e(Ge),
|
|
168
|
-
label: "Passkey",
|
|
169
|
-
size: m.size,
|
|
170
|
-
loading: e(h),
|
|
171
|
-
disabled: !e(g),
|
|
172
|
-
onClick: q
|
|
173
|
-
}, null, 8, ["icon", "size", "loading", "disabled"])) : I("", !0)], 4), y.value ? (l(), k("p", at, L(y.value), 1)) : I("", !0)]));
|
|
167
|
+
size: l.size,
|
|
168
|
+
onClick: v[3] || (v[3] = ($) => c(e(d)))
|
|
169
|
+
}, null, 8, ["icon", "size"])) : A("", !0)], 4)]));
|
|
174
170
|
}
|
|
175
|
-
}),
|
|
171
|
+
}), at = /* @__PURE__ */ U(it, [["__scopeId", "data-v-b0f3f609"]]), ot = {
|
|
176
172
|
class: "content"
|
|
177
|
-
},
|
|
173
|
+
}, lt = {
|
|
178
174
|
class: "sendVerifyCodeItem"
|
|
179
|
-
},
|
|
175
|
+
}, nt = {
|
|
180
176
|
class: "handle"
|
|
181
|
-
},
|
|
177
|
+
}, rt = /* @__PURE__ */ C({
|
|
182
178
|
__name: "AuthkitPasswordUpdateAndVerify",
|
|
183
179
|
props: {
|
|
184
180
|
size: {
|
|
@@ -192,10 +188,10 @@ const Ze = ["title", "aria-label", "disabled"], et = {
|
|
|
192
188
|
}
|
|
193
189
|
},
|
|
194
190
|
emits: ["signIn", "submit"],
|
|
195
|
-
setup(
|
|
191
|
+
setup(w, {
|
|
196
192
|
emit: r
|
|
197
193
|
}) {
|
|
198
|
-
const u = r, o =
|
|
194
|
+
const u = r, o = w, h = I(), g = I(!1), a = I(), s = I({
|
|
199
195
|
email: void 0,
|
|
200
196
|
userToken: void 0,
|
|
201
197
|
emailVerifyId: void 0,
|
|
@@ -205,19 +201,19 @@ const Ze = ["title", "aria-label", "disabled"], et = {
|
|
|
205
201
|
async function d() {
|
|
206
202
|
if (!await a.value.validateField(["email"])) {
|
|
207
203
|
g.value = !0;
|
|
208
|
-
const
|
|
204
|
+
const c = await x().auth.verify.email.retry.post({
|
|
209
205
|
email: s.value.email,
|
|
210
206
|
purpose: "resetPassword"
|
|
211
207
|
});
|
|
212
|
-
g.value = !1,
|
|
208
|
+
g.value = !1, c.data && (s.value.emailVerifyId = c.data.emailVerifyId), W(h.value, c);
|
|
213
209
|
}
|
|
214
210
|
}
|
|
215
|
-
async function
|
|
211
|
+
async function f() {
|
|
216
212
|
a.value.validate().then((t) => {
|
|
217
213
|
t || u("submit", s.value);
|
|
218
214
|
});
|
|
219
215
|
}
|
|
220
|
-
return (t,
|
|
216
|
+
return (t, c) => (n(), S("div", ot, [i(e(D), {
|
|
221
217
|
ref_key: "formRef",
|
|
222
218
|
ref: a,
|
|
223
219
|
model: s.value,
|
|
@@ -236,9 +232,9 @@ const Ze = ["title", "aria-label", "disabled"], et = {
|
|
|
236
232
|
message: "请输入有效的邮箱"
|
|
237
233
|
}]
|
|
238
234
|
}, {
|
|
239
|
-
default: p(() => [i(e(
|
|
235
|
+
default: p(() => [i(e(V), {
|
|
240
236
|
modelValue: s.value.email,
|
|
241
|
-
"onUpdate:modelValue":
|
|
237
|
+
"onUpdate:modelValue": c[0] || (c[0] = (l) => s.value.email = l),
|
|
242
238
|
placeholder: "请输入邮箱"
|
|
243
239
|
}, null, 8, ["modelValue"])]),
|
|
244
240
|
_: 1
|
|
@@ -251,11 +247,11 @@ const Ze = ["title", "aria-label", "disabled"], et = {
|
|
|
251
247
|
message: "请输入验证码"
|
|
252
248
|
}]
|
|
253
249
|
}, {
|
|
254
|
-
default: p(() => [
|
|
250
|
+
default: p(() => [k("div", lt, [i(e(V), {
|
|
255
251
|
modelValue: s.value.userToken,
|
|
256
|
-
"onUpdate:modelValue":
|
|
252
|
+
"onUpdate:modelValue": c[1] || (c[1] = (l) => s.value.userToken = l),
|
|
257
253
|
placeholder: "请输入验证码"
|
|
258
|
-
}, null, 8, ["modelValue"]), i(
|
|
254
|
+
}, null, 8, ["modelValue"]), i(j, {
|
|
259
255
|
ref_key: "SendVerifyCodeRef",
|
|
260
256
|
ref: h,
|
|
261
257
|
size: o.size,
|
|
@@ -278,9 +274,9 @@ const Ze = ["title", "aria-label", "disabled"], et = {
|
|
|
278
274
|
message: "密码不能少于10字符"
|
|
279
275
|
}]
|
|
280
276
|
}, {
|
|
281
|
-
default: p(() => [i(e(
|
|
277
|
+
default: p(() => [i(e(V), {
|
|
282
278
|
modelValue: s.value.password,
|
|
283
|
-
"onUpdate:modelValue":
|
|
279
|
+
"onUpdate:modelValue": c[2] || (c[2] = (l) => s.value.password = l),
|
|
284
280
|
placeholder: "请输入密码",
|
|
285
281
|
type: "password",
|
|
286
282
|
autocomplete: ""
|
|
@@ -297,37 +293,37 @@ const Ze = ["title", "aria-label", "disabled"], et = {
|
|
|
297
293
|
minLength: 10,
|
|
298
294
|
message: "确认密码不能少于10字符"
|
|
299
295
|
}, {
|
|
300
|
-
validator: (
|
|
301
|
-
|
|
296
|
+
validator: (l, _) => {
|
|
297
|
+
l !== s.value.password ? _("两次密码输入不一致,请重新输入") : _();
|
|
302
298
|
}
|
|
303
299
|
}]
|
|
304
300
|
}, {
|
|
305
|
-
default: p(() => [i(e(
|
|
301
|
+
default: p(() => [i(e(V), {
|
|
306
302
|
modelValue: s.value.confirmPassword,
|
|
307
|
-
"onUpdate:modelValue":
|
|
303
|
+
"onUpdate:modelValue": c[3] || (c[3] = (l) => s.value.confirmPassword = l),
|
|
308
304
|
placeholder: "请输入确认密码密码",
|
|
309
305
|
type: "password",
|
|
310
306
|
autocomplete: ""
|
|
311
307
|
}, null, 8, ["modelValue"])]),
|
|
312
308
|
_: 1
|
|
313
|
-
}, 8, ["rules"]),
|
|
309
|
+
}, 8, ["rules"]), k("div", nt, [i(e(O), {
|
|
314
310
|
type: "primary",
|
|
315
311
|
loading: o.loading,
|
|
316
312
|
long: "",
|
|
317
313
|
size: o.size,
|
|
318
|
-
onClick:
|
|
314
|
+
onClick: f
|
|
319
315
|
}, {
|
|
320
|
-
default: p(() => [...
|
|
316
|
+
default: p(() => [...c[4] || (c[4] = [T(" 提交 ", -1)])]),
|
|
321
317
|
_: 1
|
|
322
318
|
}, 8, ["loading", "size"])])]),
|
|
323
319
|
_: 1
|
|
324
320
|
}, 8, ["model", "size"])]));
|
|
325
321
|
}
|
|
326
|
-
}),
|
|
322
|
+
}), ut = /* @__PURE__ */ U(rt, [["__scopeId", "data-v-4091e418"]]), dt = {
|
|
327
323
|
class: "content"
|
|
328
|
-
},
|
|
324
|
+
}, ct = {
|
|
329
325
|
class: "sendVerifyCodeItem"
|
|
330
|
-
},
|
|
326
|
+
}, pt = /* @__PURE__ */ C({
|
|
331
327
|
__name: "AuthkitPhonePasswordUpdateAndVerify",
|
|
332
328
|
props: {
|
|
333
329
|
size: {
|
|
@@ -341,10 +337,10 @@ const Ze = ["title", "aria-label", "disabled"], et = {
|
|
|
341
337
|
}
|
|
342
338
|
},
|
|
343
339
|
emits: ["submit"],
|
|
344
|
-
setup(
|
|
340
|
+
setup(w, {
|
|
345
341
|
emit: r
|
|
346
342
|
}) {
|
|
347
|
-
const u = r, o =
|
|
343
|
+
const u = r, o = w, h = I(), g = I(!1), a = I(), s = I({
|
|
348
344
|
phone: void 0,
|
|
349
345
|
code: void 0,
|
|
350
346
|
password: void 0,
|
|
@@ -356,27 +352,27 @@ const Ze = ["title", "aria-label", "disabled"], et = {
|
|
|
356
352
|
minLength: 10,
|
|
357
353
|
message: "确认密码不能少于10字符"
|
|
358
354
|
}, {
|
|
359
|
-
validator: (
|
|
360
|
-
if (
|
|
361
|
-
|
|
355
|
+
validator: (c, l) => {
|
|
356
|
+
if (c !== s.value.password) {
|
|
357
|
+
l("两次密码输入不一致,请重新输入");
|
|
362
358
|
return;
|
|
363
359
|
}
|
|
364
|
-
|
|
360
|
+
l();
|
|
365
361
|
}
|
|
366
362
|
}];
|
|
367
|
-
async function
|
|
363
|
+
async function f() {
|
|
368
364
|
if (!await a.value.validateField(["phone"])) {
|
|
369
365
|
g.value = !0;
|
|
370
|
-
const
|
|
366
|
+
const l = await x().auth.verify.sms.send.post({
|
|
371
367
|
phone: s.value.phone,
|
|
372
368
|
purpose: "resetPassword"
|
|
373
369
|
});
|
|
374
|
-
g.value = !1,
|
|
370
|
+
g.value = !1, W(h.value, l);
|
|
375
371
|
}
|
|
376
372
|
}
|
|
377
373
|
async function t() {
|
|
378
|
-
a.value.validate().then((
|
|
379
|
-
|
|
374
|
+
a.value.validate().then((c) => {
|
|
375
|
+
c || u("submit", {
|
|
380
376
|
method: "phone",
|
|
381
377
|
phone: s.value.phone,
|
|
382
378
|
code: s.value.code,
|
|
@@ -384,7 +380,7 @@ const Ze = ["title", "aria-label", "disabled"], et = {
|
|
|
384
380
|
});
|
|
385
381
|
});
|
|
386
382
|
}
|
|
387
|
-
return (
|
|
383
|
+
return (c, l) => (n(), S("div", dt, [i(e(D), {
|
|
388
384
|
ref_key: "formRef",
|
|
389
385
|
ref: a,
|
|
390
386
|
model: s.value,
|
|
@@ -403,9 +399,9 @@ const Ze = ["title", "aria-label", "disabled"], et = {
|
|
|
403
399
|
message: "请输入有效的手机号"
|
|
404
400
|
}]
|
|
405
401
|
}, {
|
|
406
|
-
default: p(() => [i(e(
|
|
402
|
+
default: p(() => [i(e(V), {
|
|
407
403
|
modelValue: s.value.phone,
|
|
408
|
-
"onUpdate:modelValue":
|
|
404
|
+
"onUpdate:modelValue": l[0] || (l[0] = (_) => s.value.phone = _),
|
|
409
405
|
placeholder: "请输入手机号",
|
|
410
406
|
autocomplete: "tel",
|
|
411
407
|
type: "tel"
|
|
@@ -420,12 +416,12 @@ const Ze = ["title", "aria-label", "disabled"], et = {
|
|
|
420
416
|
message: "请输入验证码"
|
|
421
417
|
}]
|
|
422
418
|
}, {
|
|
423
|
-
default: p(() => [
|
|
419
|
+
default: p(() => [k("div", ct, [i(e(V), {
|
|
424
420
|
modelValue: s.value.code,
|
|
425
|
-
"onUpdate:modelValue":
|
|
421
|
+
"onUpdate:modelValue": l[1] || (l[1] = (_) => s.value.code = _),
|
|
426
422
|
placeholder: "请输入验证码",
|
|
427
423
|
autocomplete: "one-time-code"
|
|
428
|
-
}, null, 8, ["modelValue"]), i(
|
|
424
|
+
}, null, 8, ["modelValue"]), i(j, {
|
|
429
425
|
ref_key: "SendVerifyCodeRef",
|
|
430
426
|
ref: h,
|
|
431
427
|
size: o.size,
|
|
@@ -433,7 +429,7 @@ const Ze = ["title", "aria-label", "disabled"], et = {
|
|
|
433
429
|
style: {
|
|
434
430
|
"margin-left": "10px"
|
|
435
431
|
},
|
|
436
|
-
onSend:
|
|
432
|
+
onSend: f
|
|
437
433
|
}, null, 8, ["size", "loading"])])]),
|
|
438
434
|
_: 1
|
|
439
435
|
}), i(e(P), {
|
|
@@ -448,9 +444,9 @@ const Ze = ["title", "aria-label", "disabled"], et = {
|
|
|
448
444
|
message: "密码不能少于10字符"
|
|
449
445
|
}]
|
|
450
446
|
}, {
|
|
451
|
-
default: p(() => [i(e(
|
|
447
|
+
default: p(() => [i(e(V), {
|
|
452
448
|
modelValue: s.value.password,
|
|
453
|
-
"onUpdate:modelValue":
|
|
449
|
+
"onUpdate:modelValue": l[2] || (l[2] = (_) => s.value.password = _),
|
|
454
450
|
placeholder: "请输入密码",
|
|
455
451
|
type: "password",
|
|
456
452
|
autocomplete: "new-password"
|
|
@@ -462,58 +458,58 @@ const Ze = ["title", "aria-label", "disabled"], et = {
|
|
|
462
458
|
"hide-label": "",
|
|
463
459
|
rules: d
|
|
464
460
|
}, {
|
|
465
|
-
default: p(() => [i(e(
|
|
461
|
+
default: p(() => [i(e(V), {
|
|
466
462
|
modelValue: s.value.confirmPassword,
|
|
467
|
-
"onUpdate:modelValue":
|
|
463
|
+
"onUpdate:modelValue": l[3] || (l[3] = (_) => s.value.confirmPassword = _),
|
|
468
464
|
placeholder: "请输入确认密码",
|
|
469
465
|
type: "password",
|
|
470
466
|
autocomplete: "new-password"
|
|
471
467
|
}, null, 8, ["modelValue"])]),
|
|
472
468
|
_: 1
|
|
473
|
-
}), i(e(
|
|
469
|
+
}), i(e(O), {
|
|
474
470
|
type: "primary",
|
|
475
471
|
loading: o.loading,
|
|
476
472
|
long: "",
|
|
477
473
|
size: o.size,
|
|
478
474
|
onClick: t
|
|
479
475
|
}, {
|
|
480
|
-
default: p(() => [...
|
|
476
|
+
default: p(() => [...l[4] || (l[4] = [T(" 提交 ", -1)])]),
|
|
481
477
|
_: 1
|
|
482
478
|
}, 8, ["loading", "size"])]),
|
|
483
479
|
_: 1
|
|
484
480
|
}, 8, ["model", "size"])]));
|
|
485
481
|
}
|
|
486
|
-
}),
|
|
482
|
+
}), mt = /* @__PURE__ */ U(pt, [["__scopeId", "data-v-a01a994e"]]), ft = {
|
|
487
483
|
class: "SwitchSignIn"
|
|
488
|
-
},
|
|
484
|
+
}, vt = /* @__PURE__ */ C({
|
|
489
485
|
__name: "AuthkitSwitchSignIn",
|
|
490
486
|
emits: ["switchSignIn"],
|
|
491
|
-
setup(
|
|
487
|
+
setup(w, {
|
|
492
488
|
emit: r
|
|
493
489
|
}) {
|
|
494
490
|
const u = r;
|
|
495
491
|
function o() {
|
|
496
492
|
u("switchSignIn");
|
|
497
493
|
}
|
|
498
|
-
return (h, g) => (
|
|
494
|
+
return (h, g) => (n(), S("div", ft, [k("span", null, [g[1] || (g[1] = k("span", null, "已经有账号?", -1)), i(e(J), {
|
|
499
495
|
style: {
|
|
500
496
|
padding: "0px"
|
|
501
497
|
},
|
|
502
498
|
onClick: o
|
|
503
499
|
}, {
|
|
504
|
-
default: p(() => [...g[0] || (g[0] = [
|
|
500
|
+
default: p(() => [...g[0] || (g[0] = [T("去登录", -1)])]),
|
|
505
501
|
_: 1
|
|
506
502
|
})])]));
|
|
507
503
|
}
|
|
508
|
-
}),
|
|
504
|
+
}), fe = /* @__PURE__ */ U(vt, [["__scopeId", "data-v-c09d6c18"]]), gt = {
|
|
509
505
|
class: "ResetPassword"
|
|
510
|
-
},
|
|
506
|
+
}, ht = {
|
|
511
507
|
key: 0,
|
|
512
508
|
class: "tabsContainer"
|
|
513
|
-
},
|
|
509
|
+
}, yt = {
|
|
514
510
|
key: 3,
|
|
515
511
|
class: "empty"
|
|
516
|
-
},
|
|
512
|
+
}, bt = /* @__PURE__ */ C({
|
|
517
513
|
__name: "AuthkitResetPassword",
|
|
518
514
|
props: {
|
|
519
515
|
size: {
|
|
@@ -528,12 +524,12 @@ const Ze = ["title", "aria-label", "disabled"], et = {
|
|
|
528
524
|
}
|
|
529
525
|
},
|
|
530
526
|
emits: ["switchSignIn", "submit"],
|
|
531
|
-
setup(
|
|
527
|
+
setup(w, {
|
|
532
528
|
emit: r
|
|
533
529
|
}) {
|
|
534
|
-
const u = r, o =
|
|
530
|
+
const u = r, o = w, {
|
|
535
531
|
appsData: h
|
|
536
|
-
} =
|
|
532
|
+
} = N(), g = R(() => h.value.authMethods), a = R(() => {
|
|
537
533
|
const t = [];
|
|
538
534
|
return g.value.login.emailPassword && t.push({
|
|
539
535
|
key: "email",
|
|
@@ -542,57 +538,57 @@ const Ze = ["title", "aria-label", "disabled"], et = {
|
|
|
542
538
|
key: "phone",
|
|
543
539
|
title: "手机号找回"
|
|
544
540
|
}), t;
|
|
545
|
-
}), s =
|
|
546
|
-
|
|
541
|
+
}), s = I("email");
|
|
542
|
+
re(() => {
|
|
547
543
|
var t;
|
|
548
|
-
a.value.some((
|
|
544
|
+
a.value.some((c) => c.key === s.value) || (s.value = ((t = a.value[0]) == null ? void 0 : t.key) || "email");
|
|
549
545
|
});
|
|
550
546
|
function d() {
|
|
551
547
|
u("switchSignIn");
|
|
552
548
|
}
|
|
553
|
-
async function
|
|
549
|
+
async function f(t) {
|
|
554
550
|
u("submit", {
|
|
555
551
|
method: s.value,
|
|
556
552
|
...t
|
|
557
553
|
});
|
|
558
554
|
}
|
|
559
|
-
return (t,
|
|
555
|
+
return (t, c) => (n(), S("div", gt, [a.value.length > 1 ? (n(), S("div", ht, [i(e(ce), {
|
|
560
556
|
"active-key": s.value,
|
|
561
|
-
"onUpdate:activeKey":
|
|
557
|
+
"onUpdate:activeKey": c[0] || (c[0] = (l) => s.value = l)
|
|
562
558
|
}, {
|
|
563
|
-
default: p(() => [(
|
|
564
|
-
key:
|
|
565
|
-
title:
|
|
559
|
+
default: p(() => [(n(!0), S(F, null, ue(a.value, (l) => (n(), z(e(pe), {
|
|
560
|
+
key: l.key,
|
|
561
|
+
title: l.title
|
|
566
562
|
}, null, 8, ["title"]))), 128))]),
|
|
567
563
|
_: 1
|
|
568
|
-
}, 8, ["active-key"])])) :
|
|
564
|
+
}, 8, ["active-key"])])) : A("", !0), s.value === "email" && g.value.login.emailPassword ? (n(), z(ut, {
|
|
569
565
|
key: 1,
|
|
570
|
-
loading:
|
|
566
|
+
loading: w.loading,
|
|
571
567
|
size: o.size,
|
|
572
|
-
onSubmit:
|
|
573
|
-
}, null, 8, ["loading", "size"])) : s.value === "phone" && g.value.login.phonePassword ? (
|
|
568
|
+
onSubmit: f
|
|
569
|
+
}, null, 8, ["loading", "size"])) : s.value === "phone" && g.value.login.phonePassword ? (n(), z(mt, {
|
|
574
570
|
key: 2,
|
|
575
|
-
loading:
|
|
571
|
+
loading: w.loading,
|
|
576
572
|
size: o.size,
|
|
577
|
-
onSubmit:
|
|
578
|
-
}, null, 8, ["loading", "size"])) : (
|
|
573
|
+
onSubmit: f
|
|
574
|
+
}, null, 8, ["loading", "size"])) : (n(), S("div", yt, "当前应用未开放找回密码")), i(fe, {
|
|
579
575
|
onSwitchSignIn: d
|
|
580
576
|
})]));
|
|
581
577
|
}
|
|
582
|
-
}),
|
|
583
|
-
let
|
|
584
|
-
function
|
|
585
|
-
|
|
578
|
+
}), wt = /* @__PURE__ */ U(bt, [["__scopeId", "data-v-90d789bb"]]);
|
|
579
|
+
let te = null, se = null;
|
|
580
|
+
function _t(w) {
|
|
581
|
+
te = w.onPrivacyPolicy ?? null, se = w.onUserServiceAgreement ?? null;
|
|
586
582
|
}
|
|
587
|
-
function
|
|
588
|
-
|
|
583
|
+
function kt() {
|
|
584
|
+
te == null || te();
|
|
589
585
|
}
|
|
590
|
-
function
|
|
591
|
-
|
|
586
|
+
function St() {
|
|
587
|
+
se == null || se();
|
|
592
588
|
}
|
|
593
|
-
const
|
|
589
|
+
const zt = {
|
|
594
590
|
key: 2
|
|
595
|
-
},
|
|
591
|
+
}, It = /* @__PURE__ */ C({
|
|
596
592
|
__name: "AuthkitServiceAgreementAndPrivacyProtection",
|
|
597
593
|
props: /* @__PURE__ */ $e({
|
|
598
594
|
currentView: {}
|
|
@@ -604,78 +600,78 @@ const At = {
|
|
|
604
600
|
acceptedTermsModifiers: {}
|
|
605
601
|
}),
|
|
606
602
|
emits: ["update:acceptedTerms"],
|
|
607
|
-
setup(
|
|
603
|
+
setup(w) {
|
|
608
604
|
const {
|
|
609
605
|
config: r
|
|
610
|
-
} =
|
|
606
|
+
} = me(), u = w, o = Ue(w, "acceptedTerms"), {
|
|
611
607
|
getLink: h,
|
|
612
608
|
openLegalDoc: g
|
|
613
609
|
} = Ie(), {
|
|
614
610
|
termsShaking: a,
|
|
615
611
|
requiresAcceptanceForSignUp: s,
|
|
616
612
|
requiresAcceptanceForOAuth: d,
|
|
617
|
-
syncAcceptedTerms:
|
|
618
|
-
} =
|
|
619
|
-
|
|
620
|
-
v
|
|
613
|
+
syncAcceptedTerms: f
|
|
614
|
+
} = L();
|
|
615
|
+
ne(o, (v) => {
|
|
616
|
+
f(v);
|
|
621
617
|
});
|
|
622
|
-
const t =
|
|
623
|
-
const
|
|
624
|
-
return
|
|
625
|
-
}),
|
|
626
|
-
const
|
|
627
|
-
return
|
|
628
|
-
}),
|
|
629
|
-
function
|
|
618
|
+
const t = R(() => {
|
|
619
|
+
const v = h("userServiceAgreement");
|
|
620
|
+
return v != null && v.configured ? v : void 0;
|
|
621
|
+
}), c = R(() => {
|
|
622
|
+
const v = h("privacyPolicy");
|
|
623
|
+
return v != null && v.configured ? v : void 0;
|
|
624
|
+
}), l = R(() => !!(t.value || c.value)), _ = R(() => u.currentView === "signUp" ? s() : u.currentView === "signIn" ? d() : !1), m = R(() => l.value && _.value);
|
|
625
|
+
function b() {
|
|
630
626
|
if (r.legalDocsMode === "builtin") {
|
|
631
627
|
g("userServiceAgreement");
|
|
632
628
|
return;
|
|
633
629
|
}
|
|
634
|
-
|
|
630
|
+
St();
|
|
635
631
|
}
|
|
636
632
|
function y() {
|
|
637
633
|
if (r.legalDocsMode === "builtin") {
|
|
638
634
|
g("privacyPolicy");
|
|
639
635
|
return;
|
|
640
636
|
}
|
|
641
|
-
|
|
637
|
+
kt();
|
|
642
638
|
}
|
|
643
|
-
return (
|
|
639
|
+
return (v, $) => m.value ? (n(), S("div", {
|
|
644
640
|
key: 0,
|
|
645
|
-
class:
|
|
641
|
+
class: ye(["ServiceAgreementAndPrivacyProtection", {
|
|
646
642
|
"terms-shake": e(a)
|
|
647
643
|
}])
|
|
648
|
-
}, [
|
|
644
|
+
}, [l.value ? (n(), S(F, {
|
|
649
645
|
key: 0
|
|
650
|
-
}, [
|
|
646
|
+
}, [_.value ? (n(), z(e(Oe), {
|
|
651
647
|
key: 0,
|
|
652
648
|
modelValue: o.value,
|
|
653
|
-
"onUpdate:modelValue":
|
|
649
|
+
"onUpdate:modelValue": $[0] || ($[0] = (q) => o.value = q),
|
|
654
650
|
class: "terms-checkbox"
|
|
655
651
|
}, {
|
|
656
|
-
default: p(() => [
|
|
652
|
+
default: p(() => [...$[1] || ($[1] = [k("span", {
|
|
657
653
|
class: "terms-text"
|
|
658
654
|
}, "我已阅读并同意", -1)])]),
|
|
659
655
|
_: 1
|
|
660
|
-
}, 8, ["modelValue"])) :
|
|
656
|
+
}, 8, ["modelValue"])) : A("", !0), t.value ? (n(), z(e(J), {
|
|
661
657
|
key: 1,
|
|
662
|
-
onClick:
|
|
658
|
+
onClick: b
|
|
663
659
|
}, {
|
|
664
|
-
default: p(() => [
|
|
660
|
+
default: p(() => [T(B(t.value.label), 1)]),
|
|
665
661
|
_: 1
|
|
666
|
-
})) :
|
|
662
|
+
})) : A("", !0), t.value && c.value ? (n(), S("span", zt, "和")) : A("", !0), c.value ? (n(), z(e(J), {
|
|
667
663
|
key: 3,
|
|
668
664
|
onClick: y
|
|
669
665
|
}, {
|
|
670
|
-
default: p(() => [
|
|
666
|
+
default: p(() => [T(B(c.value.label), 1)]),
|
|
671
667
|
_: 1
|
|
672
|
-
})) :
|
|
668
|
+
})) : A("", !0)], 64)) : A("", !0)], 2)) : A("", !0);
|
|
673
669
|
}
|
|
674
|
-
}),
|
|
670
|
+
}), X = /* @__PURE__ */ U(It, [["__scopeId", "data-v-a0c2f361"]]), At = {
|
|
675
671
|
class: "content"
|
|
676
|
-
},
|
|
672
|
+
}, Pt = {
|
|
677
673
|
class: "handle"
|
|
678
|
-
},
|
|
674
|
+
}, Vt = /* @__PURE__ */ C({
|
|
679
675
|
__name: "AuthkitPasswordAuth",
|
|
680
676
|
props: {
|
|
681
677
|
size: {
|
|
@@ -693,25 +689,25 @@ const At = {
|
|
|
693
689
|
}
|
|
694
690
|
},
|
|
695
691
|
emits: ["submit"],
|
|
696
|
-
setup(
|
|
692
|
+
setup(w, {
|
|
697
693
|
emit: r
|
|
698
694
|
}) {
|
|
699
695
|
const u = r, {
|
|
700
696
|
useTermsFormField: o
|
|
701
|
-
} =
|
|
697
|
+
} = L(), {
|
|
702
698
|
showTermsField: h,
|
|
703
699
|
termsRules: g
|
|
704
|
-
} = o("signIn"), a =
|
|
700
|
+
} = o("signIn"), a = w, s = I(), d = I({
|
|
705
701
|
identifier: void 0,
|
|
706
702
|
password: void 0,
|
|
707
703
|
acceptedTerms: !1
|
|
708
704
|
});
|
|
709
|
-
async function
|
|
705
|
+
async function f() {
|
|
710
706
|
s.value.validate().then((t) => {
|
|
711
707
|
t || u("submit", d.value);
|
|
712
708
|
});
|
|
713
709
|
}
|
|
714
|
-
return (t,
|
|
710
|
+
return (t, c) => (n(), S("div", At, [i(e(D), {
|
|
715
711
|
ref_key: "formRef",
|
|
716
712
|
ref: s,
|
|
717
713
|
model: d.value,
|
|
@@ -727,11 +723,11 @@ const At = {
|
|
|
727
723
|
message: "请输入邮箱或手机号"
|
|
728
724
|
}]
|
|
729
725
|
}, {
|
|
730
|
-
default: p(() => [i(e(
|
|
726
|
+
default: p(() => [i(e(V), {
|
|
731
727
|
modelValue: d.value.identifier,
|
|
732
|
-
"onUpdate:modelValue":
|
|
728
|
+
"onUpdate:modelValue": c[0] || (c[0] = (l) => d.value.identifier = l),
|
|
733
729
|
placeholder: a.allowPhone ? "请输入邮箱或手机号" : "请输入邮箱",
|
|
734
|
-
autocomplete: "
|
|
730
|
+
autocomplete: "username webauthn"
|
|
735
731
|
}, null, 8, ["modelValue", "placeholder"])]),
|
|
736
732
|
_: 1
|
|
737
733
|
}), i(e(P), {
|
|
@@ -743,48 +739,48 @@ const At = {
|
|
|
743
739
|
message: "请输入密码"
|
|
744
740
|
}]
|
|
745
741
|
}, {
|
|
746
|
-
default: p(() => [i(e(
|
|
742
|
+
default: p(() => [i(e(V), {
|
|
747
743
|
modelValue: d.value.password,
|
|
748
|
-
"onUpdate:modelValue":
|
|
744
|
+
"onUpdate:modelValue": c[1] || (c[1] = (l) => d.value.password = l),
|
|
749
745
|
placeholder: "请输入密码",
|
|
750
746
|
type: "password",
|
|
751
747
|
autocomplete: "current-password"
|
|
752
748
|
}, null, 8, ["modelValue"])]),
|
|
753
749
|
_: 1
|
|
754
|
-
}),
|
|
750
|
+
}), k("div", Pt, [i(e(O), {
|
|
755
751
|
type: "primary",
|
|
756
752
|
loading: a.loading,
|
|
757
753
|
long: "",
|
|
758
754
|
size: a.size,
|
|
759
|
-
onClick:
|
|
755
|
+
onClick: f
|
|
760
756
|
}, {
|
|
761
|
-
default: p(() => [...
|
|
757
|
+
default: p(() => [...c[3] || (c[3] = [T(" 登录 ", -1)])]),
|
|
762
758
|
_: 1
|
|
763
|
-
}, 8, ["loading", "size"]), e(h) ? (
|
|
759
|
+
}, 8, ["loading", "size"]), e(h) ? (n(), z(e(P), {
|
|
764
760
|
key: 0,
|
|
765
761
|
field: "acceptedTerms",
|
|
766
762
|
"hide-label": "",
|
|
767
763
|
rules: e(g)
|
|
768
764
|
}, {
|
|
769
|
-
default: p(() => [i(
|
|
765
|
+
default: p(() => [i(X, {
|
|
770
766
|
"accepted-terms": d.value.acceptedTerms,
|
|
771
|
-
"onUpdate:acceptedTerms":
|
|
767
|
+
"onUpdate:acceptedTerms": c[2] || (c[2] = (l) => d.value.acceptedTerms = l),
|
|
772
768
|
"current-view": "signIn"
|
|
773
769
|
}, null, 8, ["accepted-terms"])]),
|
|
774
770
|
_: 1
|
|
775
|
-
}, 8, ["rules"])) :
|
|
771
|
+
}, 8, ["rules"])) : A("", !0)])]),
|
|
776
772
|
_: 1
|
|
777
773
|
}, 8, ["model", "size"])]));
|
|
778
774
|
}
|
|
779
|
-
}),
|
|
775
|
+
}), Ct = /* @__PURE__ */ U(Vt, [["__scopeId", "data-v-1e935b15"]]), Ut = {
|
|
780
776
|
class: "SignInPhone"
|
|
781
|
-
},
|
|
777
|
+
}, $t = {
|
|
782
778
|
class: "content"
|
|
783
|
-
},
|
|
779
|
+
}, Rt = {
|
|
784
780
|
class: "sendVerifyCodeItem"
|
|
785
|
-
},
|
|
781
|
+
}, Tt = {
|
|
786
782
|
class: "handle"
|
|
787
|
-
},
|
|
783
|
+
}, qt = /* @__PURE__ */ C({
|
|
788
784
|
__name: "AuthkitSignInPhone",
|
|
789
785
|
props: {
|
|
790
786
|
size: {
|
|
@@ -798,41 +794,41 @@ const At = {
|
|
|
798
794
|
}
|
|
799
795
|
},
|
|
800
796
|
emits: ["submit"],
|
|
801
|
-
setup(
|
|
797
|
+
setup(w, {
|
|
802
798
|
emit: r
|
|
803
799
|
}) {
|
|
804
800
|
const u = r, {
|
|
805
801
|
useTermsFormField: o
|
|
806
|
-
} =
|
|
802
|
+
} = L(), {
|
|
807
803
|
showTermsField: h,
|
|
808
804
|
termsRules: g
|
|
809
|
-
} = o("signIn"), a =
|
|
805
|
+
} = o("signIn"), a = w, s = I(), d = I(!1), f = I(), t = I({
|
|
810
806
|
phone: void 0,
|
|
811
807
|
code: void 0,
|
|
812
808
|
acceptedTerms: !1
|
|
813
809
|
});
|
|
814
|
-
async function
|
|
815
|
-
if (!await
|
|
810
|
+
async function c() {
|
|
811
|
+
if (!await f.value.validateField(["phone"])) {
|
|
816
812
|
d.value = !0;
|
|
817
|
-
const
|
|
813
|
+
const m = await x().auth.verify.sms.send.post({
|
|
818
814
|
phone: t.value.phone,
|
|
819
815
|
purpose: "signIn"
|
|
820
816
|
});
|
|
821
|
-
d.value = !1,
|
|
817
|
+
d.value = !1, W(s.value, m);
|
|
822
818
|
}
|
|
823
819
|
}
|
|
824
|
-
async function
|
|
825
|
-
|
|
826
|
-
|
|
820
|
+
async function l() {
|
|
821
|
+
f.value.validate().then((_) => {
|
|
822
|
+
_ || u("submit", {
|
|
827
823
|
identifier: t.value.phone,
|
|
828
824
|
code: t.value.code,
|
|
829
825
|
method: "code"
|
|
830
826
|
});
|
|
831
827
|
});
|
|
832
828
|
}
|
|
833
|
-
return (
|
|
829
|
+
return (_, m) => (n(), S("div", Ut, [k("div", $t, [i(e(D), {
|
|
834
830
|
ref_key: "formRef",
|
|
835
|
-
ref:
|
|
831
|
+
ref: f,
|
|
836
832
|
model: t.value,
|
|
837
833
|
size: a.size,
|
|
838
834
|
"auto-label-width": ""
|
|
@@ -849,11 +845,11 @@ const At = {
|
|
|
849
845
|
message: "请输入有效的手机号"
|
|
850
846
|
}]
|
|
851
847
|
}, {
|
|
852
|
-
default: p(() => [i(e(
|
|
848
|
+
default: p(() => [i(e(V), {
|
|
853
849
|
modelValue: t.value.phone,
|
|
854
|
-
"onUpdate:modelValue":
|
|
850
|
+
"onUpdate:modelValue": m[0] || (m[0] = (b) => t.value.phone = b),
|
|
855
851
|
placeholder: "请输入手机号",
|
|
856
|
-
autocomplete: "
|
|
852
|
+
autocomplete: "username webauthn",
|
|
857
853
|
type: "tel"
|
|
858
854
|
}, null, 8, ["modelValue"])]),
|
|
859
855
|
_: 1
|
|
@@ -866,12 +862,12 @@ const At = {
|
|
|
866
862
|
message: "请输入验证码"
|
|
867
863
|
}]
|
|
868
864
|
}, {
|
|
869
|
-
default: p(() => [
|
|
865
|
+
default: p(() => [k("div", Rt, [i(e(V), {
|
|
870
866
|
modelValue: t.value.code,
|
|
871
|
-
"onUpdate:modelValue":
|
|
867
|
+
"onUpdate:modelValue": m[1] || (m[1] = (b) => t.value.code = b),
|
|
872
868
|
placeholder: "请输入验证码",
|
|
873
869
|
autocomplete: "one-time-code"
|
|
874
|
-
}, null, 8, ["modelValue"]), i(
|
|
870
|
+
}, null, 8, ["modelValue"]), i(j, {
|
|
875
871
|
ref_key: "SendVerifyCodeRef",
|
|
876
872
|
ref: s,
|
|
877
873
|
size: a.size,
|
|
@@ -879,41 +875,41 @@ const At = {
|
|
|
879
875
|
style: {
|
|
880
876
|
"margin-left": "10px"
|
|
881
877
|
},
|
|
882
|
-
onSend:
|
|
878
|
+
onSend: c
|
|
883
879
|
}, null, 8, ["size", "loading"])])]),
|
|
884
880
|
_: 1
|
|
885
|
-
}),
|
|
881
|
+
}), k("div", Tt, [i(e(O), {
|
|
886
882
|
type: "primary",
|
|
887
883
|
loading: a.loading,
|
|
888
884
|
long: "",
|
|
889
885
|
size: a.size,
|
|
890
|
-
onClick:
|
|
886
|
+
onClick: l
|
|
891
887
|
}, {
|
|
892
|
-
default: p(() => [...
|
|
888
|
+
default: p(() => [...m[3] || (m[3] = [T(" 登录 ", -1)])]),
|
|
893
889
|
_: 1
|
|
894
|
-
}, 8, ["loading", "size"]), e(h) ? (
|
|
890
|
+
}, 8, ["loading", "size"]), e(h) ? (n(), z(e(P), {
|
|
895
891
|
key: 0,
|
|
896
892
|
field: "acceptedTerms",
|
|
897
893
|
"hide-label": "",
|
|
898
894
|
rules: e(g)
|
|
899
895
|
}, {
|
|
900
|
-
default: p(() => [i(
|
|
896
|
+
default: p(() => [i(X, {
|
|
901
897
|
"accepted-terms": t.value.acceptedTerms,
|
|
902
|
-
"onUpdate:acceptedTerms":
|
|
898
|
+
"onUpdate:acceptedTerms": m[2] || (m[2] = (b) => t.value.acceptedTerms = b),
|
|
903
899
|
"current-view": "signIn"
|
|
904
900
|
}, null, 8, ["accepted-terms"])]),
|
|
905
901
|
_: 1
|
|
906
|
-
}, 8, ["rules"])) :
|
|
902
|
+
}, 8, ["rules"])) : A("", !0)])]),
|
|
907
903
|
_: 1
|
|
908
904
|
}, 8, ["model", "size"])])]));
|
|
909
905
|
}
|
|
910
|
-
}),
|
|
906
|
+
}), Ot = /* @__PURE__ */ U(qt, [["__scopeId", "data-v-fa7bbccf"]]), xt = {
|
|
911
907
|
class: "SignInEmailCode"
|
|
912
|
-
},
|
|
908
|
+
}, Bt = {
|
|
913
909
|
class: "sendVerifyCodeItem"
|
|
914
|
-
},
|
|
910
|
+
}, Lt = {
|
|
915
911
|
class: "handle"
|
|
916
|
-
},
|
|
912
|
+
}, Ft = /* @__PURE__ */ C({
|
|
917
913
|
__name: "AuthkitSignInEmailCode",
|
|
918
914
|
props: {
|
|
919
915
|
size: {
|
|
@@ -927,34 +923,34 @@ const At = {
|
|
|
927
923
|
}
|
|
928
924
|
},
|
|
929
925
|
emits: ["submit"],
|
|
930
|
-
setup(
|
|
926
|
+
setup(w, {
|
|
931
927
|
emit: r
|
|
932
928
|
}) {
|
|
933
929
|
const u = r, {
|
|
934
930
|
useTermsFormField: o
|
|
935
|
-
} =
|
|
931
|
+
} = L(), {
|
|
936
932
|
showTermsField: h,
|
|
937
933
|
termsRules: g
|
|
938
|
-
} = o("signIn"), a =
|
|
934
|
+
} = o("signIn"), a = w, s = I(), d = I(!1), f = I(), t = I({
|
|
939
935
|
email: void 0,
|
|
940
936
|
code: void 0,
|
|
941
937
|
emailVerifyId: "",
|
|
942
938
|
acceptedTerms: !1
|
|
943
939
|
});
|
|
944
|
-
async function
|
|
945
|
-
var
|
|
946
|
-
if (!await
|
|
940
|
+
async function c() {
|
|
941
|
+
var m;
|
|
942
|
+
if (!await f.value.validateField(["email"])) {
|
|
947
943
|
d.value = !0;
|
|
948
|
-
const
|
|
944
|
+
const b = await x().auth.verify.email.retry.post({
|
|
949
945
|
email: t.value.email,
|
|
950
946
|
purpose: "signIn"
|
|
951
947
|
});
|
|
952
|
-
d.value = !1, (
|
|
948
|
+
d.value = !1, (m = b.data) != null && m.emailVerifyId && (t.value.emailVerifyId = b.data.emailVerifyId), W(s.value, b);
|
|
953
949
|
}
|
|
954
950
|
}
|
|
955
|
-
async function
|
|
956
|
-
|
|
957
|
-
|
|
951
|
+
async function l() {
|
|
952
|
+
f.value.validate().then((_) => {
|
|
953
|
+
_ || u("submit", {
|
|
958
954
|
identifier: t.value.email,
|
|
959
955
|
code: t.value.code,
|
|
960
956
|
emailVerifyId: t.value.emailVerifyId,
|
|
@@ -962,9 +958,9 @@ const At = {
|
|
|
962
958
|
});
|
|
963
959
|
});
|
|
964
960
|
}
|
|
965
|
-
return (
|
|
961
|
+
return (_, m) => (n(), S("div", xt, [i(e(D), {
|
|
966
962
|
ref_key: "formRef",
|
|
967
|
-
ref:
|
|
963
|
+
ref: f,
|
|
968
964
|
model: t.value,
|
|
969
965
|
size: a.size,
|
|
970
966
|
"auto-label-width": ""
|
|
@@ -980,11 +976,11 @@ const At = {
|
|
|
980
976
|
message: "请输入有效的邮箱"
|
|
981
977
|
}]
|
|
982
978
|
}, {
|
|
983
|
-
default: p(() => [i(e(
|
|
979
|
+
default: p(() => [i(e(V), {
|
|
984
980
|
modelValue: t.value.email,
|
|
985
|
-
"onUpdate:modelValue":
|
|
981
|
+
"onUpdate:modelValue": m[0] || (m[0] = (b) => t.value.email = b),
|
|
986
982
|
placeholder: "请输入邮箱",
|
|
987
|
-
autocomplete: "
|
|
983
|
+
autocomplete: "username webauthn"
|
|
988
984
|
}, null, 8, ["modelValue"])]),
|
|
989
985
|
_: 1
|
|
990
986
|
}), i(e(P), {
|
|
@@ -995,12 +991,12 @@ const At = {
|
|
|
995
991
|
message: "请输入验证码"
|
|
996
992
|
}]
|
|
997
993
|
}, {
|
|
998
|
-
default: p(() => [
|
|
994
|
+
default: p(() => [k("div", Bt, [i(e(V), {
|
|
999
995
|
modelValue: t.value.code,
|
|
1000
|
-
"onUpdate:modelValue":
|
|
996
|
+
"onUpdate:modelValue": m[1] || (m[1] = (b) => t.value.code = b),
|
|
1001
997
|
placeholder: "请输入验证码",
|
|
1002
998
|
autocomplete: "one-time-code"
|
|
1003
|
-
}, null, 8, ["modelValue"]), i(
|
|
999
|
+
}, null, 8, ["modelValue"]), i(j, {
|
|
1004
1000
|
ref_key: "SendVerifyCodeRef",
|
|
1005
1001
|
ref: s,
|
|
1006
1002
|
size: a.size,
|
|
@@ -1008,39 +1004,39 @@ const At = {
|
|
|
1008
1004
|
style: {
|
|
1009
1005
|
"margin-left": "10px"
|
|
1010
1006
|
},
|
|
1011
|
-
onSend:
|
|
1007
|
+
onSend: c
|
|
1012
1008
|
}, null, 8, ["size", "loading"])])]),
|
|
1013
1009
|
_: 1
|
|
1014
|
-
}),
|
|
1010
|
+
}), k("div", Lt, [i(e(O), {
|
|
1015
1011
|
type: "primary",
|
|
1016
1012
|
loading: a.loading,
|
|
1017
1013
|
long: "",
|
|
1018
1014
|
size: a.size,
|
|
1019
|
-
onClick:
|
|
1015
|
+
onClick: l
|
|
1020
1016
|
}, {
|
|
1021
|
-
default: p(() => [...
|
|
1017
|
+
default: p(() => [...m[3] || (m[3] = [T(" 登录 ", -1)])]),
|
|
1022
1018
|
_: 1
|
|
1023
|
-
}, 8, ["loading", "size"]), e(h) ? (
|
|
1019
|
+
}, 8, ["loading", "size"]), e(h) ? (n(), z(e(P), {
|
|
1024
1020
|
key: 0,
|
|
1025
1021
|
field: "acceptedTerms",
|
|
1026
1022
|
"hide-label": "",
|
|
1027
1023
|
rules: e(g)
|
|
1028
1024
|
}, {
|
|
1029
|
-
default: p(() => [i(
|
|
1025
|
+
default: p(() => [i(X, {
|
|
1030
1026
|
"accepted-terms": t.value.acceptedTerms,
|
|
1031
|
-
"onUpdate:acceptedTerms":
|
|
1027
|
+
"onUpdate:acceptedTerms": m[2] || (m[2] = (b) => t.value.acceptedTerms = b),
|
|
1032
1028
|
"current-view": "signIn"
|
|
1033
1029
|
}, null, 8, ["accepted-terms"])]),
|
|
1034
1030
|
_: 1
|
|
1035
|
-
}, 8, ["rules"])) :
|
|
1031
|
+
}, 8, ["rules"])) : A("", !0)])]),
|
|
1036
1032
|
_: 1
|
|
1037
1033
|
}, 8, ["model", "size"])]));
|
|
1038
1034
|
}
|
|
1039
|
-
}),
|
|
1035
|
+
}), Mt = /* @__PURE__ */ U(Ft, [["__scopeId", "data-v-2f4189ae"]]), Dt = {
|
|
1040
1036
|
class: "SwitchSignUpOrResetPassword"
|
|
1041
|
-
},
|
|
1037
|
+
}, Et = {
|
|
1042
1038
|
key: 0
|
|
1043
|
-
},
|
|
1039
|
+
}, Ht = /* @__PURE__ */ C({
|
|
1044
1040
|
__name: "AuthkitSwitchSignUpOrResetPassword",
|
|
1045
1041
|
props: {
|
|
1046
1042
|
showSignUp: {
|
|
@@ -1053,41 +1049,41 @@ const At = {
|
|
|
1053
1049
|
}
|
|
1054
1050
|
},
|
|
1055
1051
|
emits: ["switchSignUp", "switchResetPassword"],
|
|
1056
|
-
setup(
|
|
1052
|
+
setup(w, {
|
|
1057
1053
|
emit: r
|
|
1058
1054
|
}) {
|
|
1059
|
-
const u =
|
|
1055
|
+
const u = w, o = r;
|
|
1060
1056
|
function h() {
|
|
1061
1057
|
o("switchSignUp");
|
|
1062
1058
|
}
|
|
1063
1059
|
function g() {
|
|
1064
1060
|
o("switchResetPassword");
|
|
1065
1061
|
}
|
|
1066
|
-
return (a, s) => (
|
|
1062
|
+
return (a, s) => (n(), S("div", Dt, [u.showSignUp ? (n(), S("span", Et, [s[1] || (s[1] = k("span", null, " 还没有账户?", -1)), i(e(J), {
|
|
1067
1063
|
style: {
|
|
1068
1064
|
padding: "0px"
|
|
1069
1065
|
},
|
|
1070
1066
|
onClick: h
|
|
1071
1067
|
}, {
|
|
1072
|
-
default: p(() => [...s[0] || (s[0] = [
|
|
1068
|
+
default: p(() => [...s[0] || (s[0] = [T("去注册?", -1)])]),
|
|
1073
1069
|
_: 1
|
|
1074
|
-
})])) :
|
|
1070
|
+
})])) : A("", !0), u.showResetPassword ? (n(), z(e(J), {
|
|
1075
1071
|
key: 1,
|
|
1076
1072
|
style: {
|
|
1077
1073
|
padding: "0px"
|
|
1078
1074
|
},
|
|
1079
1075
|
onClick: g
|
|
1080
1076
|
}, {
|
|
1081
|
-
default: p(() => [...s[2] || (s[2] = [
|
|
1077
|
+
default: p(() => [...s[2] || (s[2] = [T(" 忘记密码? ", -1)])]),
|
|
1082
1078
|
_: 1
|
|
1083
|
-
})) :
|
|
1079
|
+
})) : A("", !0)]));
|
|
1084
1080
|
}
|
|
1085
|
-
}),
|
|
1081
|
+
}), Gt = /* @__PURE__ */ U(Ht, [["__scopeId", "data-v-6ca7b1f2"]]), Nt = {
|
|
1086
1082
|
class: "SignIn"
|
|
1087
|
-
},
|
|
1083
|
+
}, jt = {
|
|
1088
1084
|
key: 0,
|
|
1089
1085
|
class: "tabsContainer"
|
|
1090
|
-
},
|
|
1086
|
+
}, Wt = /* @__PURE__ */ C({
|
|
1091
1087
|
__name: "AuthkitSignIn",
|
|
1092
1088
|
props: {
|
|
1093
1089
|
size: {
|
|
@@ -1101,83 +1097,90 @@ const At = {
|
|
|
1101
1097
|
}
|
|
1102
1098
|
},
|
|
1103
1099
|
emits: ["submit", "switchSignUp", "switchResetPassword"],
|
|
1104
|
-
setup(
|
|
1100
|
+
setup(w, {
|
|
1105
1101
|
emit: r
|
|
1106
1102
|
}) {
|
|
1107
|
-
const u = r, o =
|
|
1103
|
+
const u = r, o = w, h = Re(), g = R(() => !!h.OAuth), {
|
|
1108
1104
|
appsData: a
|
|
1109
|
-
} =
|
|
1105
|
+
} = N(), {
|
|
1110
1106
|
signUpAuthEnabled: s
|
|
1111
|
-
} =
|
|
1112
|
-
const
|
|
1113
|
-
return (d.value.login.emailPassword || d.value.login.phonePassword) &&
|
|
1107
|
+
} = L(), d = R(() => a.value.authMethods), f = R(() => s.value && (d.value.signUp.email || d.value.signUp.phone)), t = R(() => d.value.login.emailPassword || d.value.login.phonePassword), c = R(() => {
|
|
1108
|
+
const v = [];
|
|
1109
|
+
return (d.value.login.emailPassword || d.value.login.phonePassword) && v.push({
|
|
1114
1110
|
key: "password",
|
|
1115
1111
|
title: "密码登录"
|
|
1116
|
-
}), d.value.login.phoneCode &&
|
|
1112
|
+
}), d.value.login.phoneCode && v.push({
|
|
1117
1113
|
key: "phoneCode",
|
|
1118
1114
|
title: "手机验证码登录"
|
|
1119
|
-
}), d.value.login.emailCode &&
|
|
1115
|
+
}), d.value.login.emailCode && v.push({
|
|
1120
1116
|
key: "emailCode",
|
|
1121
1117
|
title: "邮箱验证码登录"
|
|
1122
|
-
}),
|
|
1123
|
-
}),
|
|
1124
|
-
|
|
1125
|
-
var
|
|
1126
|
-
|
|
1118
|
+
}), v;
|
|
1119
|
+
}), l = I("password"), _ = I("");
|
|
1120
|
+
re(() => {
|
|
1121
|
+
var v;
|
|
1122
|
+
c.value.some(($) => $.key === l.value) || (l.value = ((v = c.value[0]) == null ? void 0 : v.key) || "password");
|
|
1127
1123
|
});
|
|
1128
|
-
function
|
|
1124
|
+
function m() {
|
|
1129
1125
|
u("switchSignUp");
|
|
1130
1126
|
}
|
|
1131
|
-
function
|
|
1127
|
+
function b() {
|
|
1132
1128
|
u("switchResetPassword");
|
|
1133
1129
|
}
|
|
1134
|
-
async function
|
|
1130
|
+
async function y(v) {
|
|
1135
1131
|
u("submit", {
|
|
1136
|
-
method:
|
|
1137
|
-
...
|
|
1132
|
+
method: l.value === "password" ? "password" : "code",
|
|
1133
|
+
...v
|
|
1138
1134
|
});
|
|
1139
1135
|
}
|
|
1140
|
-
return (
|
|
1141
|
-
"active-key":
|
|
1142
|
-
"onUpdate:activeKey":
|
|
1136
|
+
return (v, $) => (n(), S("div", Nt, [c.value.length > 1 ? (n(), S("div", jt, [i(e(ce), {
|
|
1137
|
+
"active-key": l.value,
|
|
1138
|
+
"onUpdate:activeKey": $[0] || ($[0] = (q) => l.value = q)
|
|
1143
1139
|
}, {
|
|
1144
|
-
default: p(() => [(
|
|
1140
|
+
default: p(() => [(n(!0), S(F, null, ue(c.value, (q) => (n(), z(e(pe), {
|
|
1145
1141
|
key: q.key,
|
|
1146
1142
|
title: q.title
|
|
1147
1143
|
}, null, 8, ["title"]))), 128))]),
|
|
1148
1144
|
_: 1
|
|
1149
|
-
}, 8, ["active-key"])])) :
|
|
1145
|
+
}, 8, ["active-key"])])) : A("", !0), l.value === "password" && (d.value.login.emailPassword || d.value.login.phonePassword) ? (n(), z(Ct, {
|
|
1150
1146
|
key: 1,
|
|
1151
1147
|
loading: o.loading,
|
|
1152
1148
|
size: o.size,
|
|
1153
1149
|
"allow-phone": d.value.login.phonePassword,
|
|
1154
|
-
onSubmit:
|
|
1155
|
-
}, null, 8, ["loading", "size", "allow-phone"])) :
|
|
1150
|
+
onSubmit: y
|
|
1151
|
+
}, null, 8, ["loading", "size", "allow-phone"])) : l.value === "phoneCode" ? (n(), z(Ot, {
|
|
1156
1152
|
key: 2,
|
|
1157
1153
|
loading: o.loading,
|
|
1158
1154
|
size: o.size,
|
|
1159
|
-
onSubmit:
|
|
1160
|
-
}, null, 8, ["loading", "size"])) :
|
|
1155
|
+
onSubmit: y
|
|
1156
|
+
}, null, 8, ["loading", "size"])) : l.value === "emailCode" ? (n(), z(Mt, {
|
|
1161
1157
|
key: 3,
|
|
1162
1158
|
loading: o.loading,
|
|
1163
1159
|
size: o.size,
|
|
1164
|
-
onSubmit:
|
|
1165
|
-
}, null, 8, ["loading", "size"])) :
|
|
1166
|
-
key: 4
|
|
1167
|
-
|
|
1168
|
-
"
|
|
1160
|
+
onSubmit: y
|
|
1161
|
+
}, null, 8, ["loading", "size"])) : d.value.login.passkey ? (n(), z(e(V), {
|
|
1162
|
+
key: 4,
|
|
1163
|
+
modelValue: _.value,
|
|
1164
|
+
"onUpdate:modelValue": $[1] || ($[1] = (q) => _.value = q),
|
|
1165
|
+
size: o.size,
|
|
1166
|
+
autocomplete: "username webauthn",
|
|
1167
|
+
placeholder: "请选择已绑定的通行密钥"
|
|
1168
|
+
}, null, 8, ["modelValue", "size"])) : A("", !0), g.value ? Q(v.$slots, "OAuth", {
|
|
1169
|
+
key: 5
|
|
1170
|
+
}, void 0, !0) : A("", !0), i(Gt, {
|
|
1171
|
+
"show-sign-up": f.value,
|
|
1169
1172
|
"show-reset-password": t.value,
|
|
1170
|
-
onSwitchSignUp:
|
|
1171
|
-
onSwitchResetPassword:
|
|
1173
|
+
onSwitchSignUp: m,
|
|
1174
|
+
onSwitchResetPassword: b
|
|
1172
1175
|
}, null, 8, ["show-sign-up", "show-reset-password"])]));
|
|
1173
1176
|
}
|
|
1174
|
-
}),
|
|
1177
|
+
}), Kt = /* @__PURE__ */ U(Wt, [["__scopeId", "data-v-c3eb10b3"]]), Jt = {
|
|
1175
1178
|
class: "content"
|
|
1176
|
-
},
|
|
1179
|
+
}, Qt = {
|
|
1177
1180
|
class: "sendVerifyCodeItem"
|
|
1178
|
-
},
|
|
1181
|
+
}, Xt = {
|
|
1179
1182
|
class: "handle"
|
|
1180
|
-
},
|
|
1183
|
+
}, Yt = /* @__PURE__ */ C({
|
|
1181
1184
|
__name: "AuthkitEmailUpdate",
|
|
1182
1185
|
props: {
|
|
1183
1186
|
size: {
|
|
@@ -1195,15 +1198,15 @@ const At = {
|
|
|
1195
1198
|
}
|
|
1196
1199
|
},
|
|
1197
1200
|
emits: ["submit"],
|
|
1198
|
-
setup(
|
|
1201
|
+
setup(w, {
|
|
1199
1202
|
emit: r
|
|
1200
1203
|
}) {
|
|
1201
1204
|
const u = r, {
|
|
1202
1205
|
useTermsFormField: o
|
|
1203
|
-
} =
|
|
1206
|
+
} = L(), {
|
|
1204
1207
|
showTermsField: h,
|
|
1205
1208
|
termsRules: g
|
|
1206
|
-
} = o("signUp"), a =
|
|
1209
|
+
} = o("signUp"), a = w, s = I(), d = I(!1), f = I(), t = I({
|
|
1207
1210
|
email: void 0,
|
|
1208
1211
|
userToken: void 0,
|
|
1209
1212
|
emailVerifyId: void 0,
|
|
@@ -1212,28 +1215,28 @@ const At = {
|
|
|
1212
1215
|
inviteCode: void 0,
|
|
1213
1216
|
acceptedTerms: !1
|
|
1214
1217
|
});
|
|
1215
|
-
|
|
1216
|
-
const
|
|
1217
|
-
|
|
1218
|
+
M(() => {
|
|
1219
|
+
const _ = Se();
|
|
1220
|
+
_ && (t.value.inviteCode = _);
|
|
1218
1221
|
});
|
|
1219
|
-
async function
|
|
1220
|
-
if (!await
|
|
1222
|
+
async function c() {
|
|
1223
|
+
if (!await f.value.validateField(["email"])) {
|
|
1221
1224
|
d.value = !0;
|
|
1222
|
-
const
|
|
1225
|
+
const m = await x().auth.verify.email.retry.post({
|
|
1223
1226
|
email: t.value.email,
|
|
1224
1227
|
purpose: a.purpose
|
|
1225
1228
|
});
|
|
1226
|
-
d.value = !1,
|
|
1229
|
+
d.value = !1, m.data && (t.value.emailVerifyId = m.data.emailVerifyId), W(s.value, m);
|
|
1227
1230
|
}
|
|
1228
1231
|
}
|
|
1229
|
-
async function
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
+
async function l() {
|
|
1233
|
+
f.value.validate().then((_) => {
|
|
1234
|
+
_ || u("submit", t.value);
|
|
1232
1235
|
});
|
|
1233
1236
|
}
|
|
1234
|
-
return (
|
|
1237
|
+
return (_, m) => (n(), S("div", Jt, [i(e(D), {
|
|
1235
1238
|
ref_key: "formRef",
|
|
1236
|
-
ref:
|
|
1239
|
+
ref: f,
|
|
1237
1240
|
model: t.value,
|
|
1238
1241
|
size: a.size,
|
|
1239
1242
|
"auto-label-width": ""
|
|
@@ -1250,9 +1253,9 @@ const At = {
|
|
|
1250
1253
|
message: "请输入有效的邮箱"
|
|
1251
1254
|
}]
|
|
1252
1255
|
}, {
|
|
1253
|
-
default: p(() => [i(e(
|
|
1256
|
+
default: p(() => [i(e(V), {
|
|
1254
1257
|
modelValue: t.value.email,
|
|
1255
|
-
"onUpdate:modelValue":
|
|
1258
|
+
"onUpdate:modelValue": m[0] || (m[0] = (b) => t.value.email = b),
|
|
1256
1259
|
placeholder: "请输入邮箱",
|
|
1257
1260
|
autocomplete: "email username",
|
|
1258
1261
|
type: "email"
|
|
@@ -1267,12 +1270,12 @@ const At = {
|
|
|
1267
1270
|
message: "请输入验证码"
|
|
1268
1271
|
}]
|
|
1269
1272
|
}, {
|
|
1270
|
-
default: p(() => [
|
|
1273
|
+
default: p(() => [k("div", Qt, [i(e(V), {
|
|
1271
1274
|
modelValue: t.value.userToken,
|
|
1272
|
-
"onUpdate:modelValue":
|
|
1275
|
+
"onUpdate:modelValue": m[1] || (m[1] = (b) => t.value.userToken = b),
|
|
1273
1276
|
placeholder: "请输入验证码",
|
|
1274
1277
|
autocomplete: "one-time-code"
|
|
1275
|
-
}, null, 8, ["modelValue"]), i(
|
|
1278
|
+
}, null, 8, ["modelValue"]), i(j, {
|
|
1276
1279
|
ref_key: "SendVerifyCodeRef",
|
|
1277
1280
|
ref: s,
|
|
1278
1281
|
size: a.size,
|
|
@@ -1280,7 +1283,7 @@ const At = {
|
|
|
1280
1283
|
style: {
|
|
1281
1284
|
"margin-left": "10px"
|
|
1282
1285
|
},
|
|
1283
|
-
onSend:
|
|
1286
|
+
onSend: c
|
|
1284
1287
|
}, null, 8, ["size", "loading"])])]),
|
|
1285
1288
|
_: 1
|
|
1286
1289
|
}), i(e(P), {
|
|
@@ -1295,9 +1298,9 @@ const At = {
|
|
|
1295
1298
|
message: "密码不能少于10字符"
|
|
1296
1299
|
}]
|
|
1297
1300
|
}, {
|
|
1298
|
-
default: p(() => [i(e(
|
|
1301
|
+
default: p(() => [i(e(V), {
|
|
1299
1302
|
modelValue: t.value.password,
|
|
1300
|
-
"onUpdate:modelValue":
|
|
1303
|
+
"onUpdate:modelValue": m[2] || (m[2] = (b) => t.value.password = b),
|
|
1301
1304
|
placeholder: "请输入密码",
|
|
1302
1305
|
type: "password",
|
|
1303
1306
|
autocomplete: "new-password"
|
|
@@ -1314,14 +1317,14 @@ const At = {
|
|
|
1314
1317
|
minLength: 10,
|
|
1315
1318
|
message: "确认密码不能少于10字符"
|
|
1316
1319
|
}, {
|
|
1317
|
-
validator: (
|
|
1318
|
-
|
|
1320
|
+
validator: (b, y) => {
|
|
1321
|
+
b !== t.value.password ? y("两次密码输入不一致,请重新输入") : y();
|
|
1319
1322
|
}
|
|
1320
1323
|
}]
|
|
1321
1324
|
}, {
|
|
1322
|
-
default: p(() => [i(e(
|
|
1325
|
+
default: p(() => [i(e(V), {
|
|
1323
1326
|
modelValue: t.value.confirmPassword,
|
|
1324
|
-
"onUpdate:modelValue":
|
|
1327
|
+
"onUpdate:modelValue": m[3] || (m[3] = (b) => t.value.confirmPassword = b),
|
|
1325
1328
|
placeholder: "请输入确认密码密码",
|
|
1326
1329
|
type: "password",
|
|
1327
1330
|
autocomplete: "new-password"
|
|
@@ -1335,47 +1338,47 @@ const At = {
|
|
|
1335
1338
|
required: !1
|
|
1336
1339
|
}]
|
|
1337
1340
|
}, {
|
|
1338
|
-
default: p(() => [i(e(
|
|
1341
|
+
default: p(() => [i(e(V), {
|
|
1339
1342
|
modelValue: t.value.inviteCode,
|
|
1340
|
-
"onUpdate:modelValue":
|
|
1343
|
+
"onUpdate:modelValue": m[4] || (m[4] = (b) => t.value.inviteCode = b),
|
|
1341
1344
|
placeholder: "邀请码(可选)",
|
|
1342
1345
|
autocomplete: "off"
|
|
1343
1346
|
}, null, 8, ["modelValue"])]),
|
|
1344
1347
|
_: 1
|
|
1345
|
-
}),
|
|
1348
|
+
}), k("div", Xt, [i(e(O), {
|
|
1346
1349
|
type: "primary",
|
|
1347
1350
|
loading: a.loading,
|
|
1348
1351
|
long: "",
|
|
1349
1352
|
size: a.size,
|
|
1350
|
-
onClick:
|
|
1353
|
+
onClick: l
|
|
1351
1354
|
}, {
|
|
1352
|
-
default: p(() => [...
|
|
1355
|
+
default: p(() => [...m[6] || (m[6] = [T(" 提交 ", -1)])]),
|
|
1353
1356
|
_: 1
|
|
1354
|
-
}, 8, ["loading", "size"]), e(h) ? (
|
|
1357
|
+
}, 8, ["loading", "size"]), e(h) ? (n(), z(e(P), {
|
|
1355
1358
|
key: 0,
|
|
1356
1359
|
field: "acceptedTerms",
|
|
1357
1360
|
"hide-label": "",
|
|
1358
1361
|
rules: e(g)
|
|
1359
1362
|
}, {
|
|
1360
|
-
default: p(() => [i(
|
|
1363
|
+
default: p(() => [i(X, {
|
|
1361
1364
|
"accepted-terms": t.value.acceptedTerms,
|
|
1362
|
-
"onUpdate:acceptedTerms":
|
|
1365
|
+
"onUpdate:acceptedTerms": m[5] || (m[5] = (b) => t.value.acceptedTerms = b),
|
|
1363
1366
|
"current-view": "signUp"
|
|
1364
1367
|
}, null, 8, ["accepted-terms"])]),
|
|
1365
1368
|
_: 1
|
|
1366
|
-
}, 8, ["rules"])) :
|
|
1369
|
+
}, 8, ["rules"])) : A("", !0)])]),
|
|
1367
1370
|
_: 1
|
|
1368
1371
|
}, 8, ["model", "size"])]));
|
|
1369
1372
|
}
|
|
1370
|
-
}),
|
|
1373
|
+
}), Zt = /* @__PURE__ */ U(Yt, [["__scopeId", "data-v-07ef9d49"]]), es = {
|
|
1371
1374
|
class: "SignUpPhone"
|
|
1372
|
-
},
|
|
1375
|
+
}, ts = {
|
|
1373
1376
|
class: "content"
|
|
1374
|
-
},
|
|
1377
|
+
}, ss = {
|
|
1375
1378
|
class: "sendVerifyCodeItem"
|
|
1376
|
-
},
|
|
1379
|
+
}, is = {
|
|
1377
1380
|
class: "handle"
|
|
1378
|
-
},
|
|
1381
|
+
}, as = /* @__PURE__ */ C({
|
|
1379
1382
|
__name: "AuthkitSignUpPhone",
|
|
1380
1383
|
props: {
|
|
1381
1384
|
size: {
|
|
@@ -1394,15 +1397,15 @@ const At = {
|
|
|
1394
1397
|
}
|
|
1395
1398
|
},
|
|
1396
1399
|
emits: ["switchSignIn", "submit"],
|
|
1397
|
-
setup(
|
|
1400
|
+
setup(w, {
|
|
1398
1401
|
emit: r
|
|
1399
1402
|
}) {
|
|
1400
1403
|
const u = r, {
|
|
1401
1404
|
useTermsFormField: o
|
|
1402
|
-
} =
|
|
1405
|
+
} = L(), {
|
|
1403
1406
|
showTermsField: h,
|
|
1404
1407
|
termsRules: g
|
|
1405
|
-
} = o("signUp"), a =
|
|
1408
|
+
} = o("signUp"), a = w, s = I(), d = I(!1), f = I(), t = I({
|
|
1406
1409
|
phone: void 0,
|
|
1407
1410
|
code: void 0,
|
|
1408
1411
|
password: void 0,
|
|
@@ -1410,34 +1413,34 @@ const At = {
|
|
|
1410
1413
|
inviteCode: void 0,
|
|
1411
1414
|
acceptedTerms: !1
|
|
1412
1415
|
});
|
|
1413
|
-
|
|
1414
|
-
const
|
|
1415
|
-
|
|
1416
|
+
M(() => {
|
|
1417
|
+
const b = Se();
|
|
1418
|
+
b && (t.value.inviteCode = b);
|
|
1416
1419
|
});
|
|
1417
|
-
const
|
|
1420
|
+
const c = [{
|
|
1418
1421
|
required: !0,
|
|
1419
1422
|
message: "请输入确认密码"
|
|
1420
1423
|
}, {
|
|
1421
|
-
validator: (
|
|
1422
|
-
t.value.password &&
|
|
1424
|
+
validator: (b, y) => {
|
|
1425
|
+
t.value.password && b !== t.value.password ? y("两次密码输入不一致") : y();
|
|
1423
1426
|
}
|
|
1424
1427
|
}];
|
|
1425
|
-
function
|
|
1428
|
+
function l() {
|
|
1426
1429
|
u("switchSignIn");
|
|
1427
1430
|
}
|
|
1428
|
-
async function
|
|
1429
|
-
if (!await
|
|
1431
|
+
async function _() {
|
|
1432
|
+
if (!await f.value.validateField(["phone"])) {
|
|
1430
1433
|
d.value = !0;
|
|
1431
|
-
const y = await
|
|
1434
|
+
const y = await x().auth.verify.sms.send.post({
|
|
1432
1435
|
phone: t.value.phone,
|
|
1433
1436
|
purpose: "signUp"
|
|
1434
1437
|
});
|
|
1435
|
-
d.value = !1,
|
|
1438
|
+
d.value = !1, W(s.value, y);
|
|
1436
1439
|
}
|
|
1437
1440
|
}
|
|
1438
|
-
async function
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
+
async function m() {
|
|
1442
|
+
f.value.validate().then((b) => {
|
|
1443
|
+
b || u("submit", {
|
|
1441
1444
|
type: "phone",
|
|
1442
1445
|
phone: t.value.phone,
|
|
1443
1446
|
code: t.value.code,
|
|
@@ -1446,9 +1449,9 @@ const At = {
|
|
|
1446
1449
|
});
|
|
1447
1450
|
});
|
|
1448
1451
|
}
|
|
1449
|
-
return (
|
|
1452
|
+
return (b, y) => (n(), S("div", es, [k("div", ts, [i(e(D), {
|
|
1450
1453
|
ref_key: "formRef",
|
|
1451
|
-
ref:
|
|
1454
|
+
ref: f,
|
|
1452
1455
|
model: t.value,
|
|
1453
1456
|
size: a.size,
|
|
1454
1457
|
"auto-label-width": ""
|
|
@@ -1465,9 +1468,9 @@ const At = {
|
|
|
1465
1468
|
message: "请输入有效的手机号"
|
|
1466
1469
|
}]
|
|
1467
1470
|
}, {
|
|
1468
|
-
default: p(() => [i(e(
|
|
1471
|
+
default: p(() => [i(e(V), {
|
|
1469
1472
|
modelValue: t.value.phone,
|
|
1470
|
-
"onUpdate:modelValue": y[0] || (y[0] = (
|
|
1473
|
+
"onUpdate:modelValue": y[0] || (y[0] = (v) => t.value.phone = v),
|
|
1471
1474
|
placeholder: "请输入手机号",
|
|
1472
1475
|
autocomplete: "tel",
|
|
1473
1476
|
type: "tel"
|
|
@@ -1482,12 +1485,12 @@ const At = {
|
|
|
1482
1485
|
message: "请输入验证码"
|
|
1483
1486
|
}]
|
|
1484
1487
|
}, {
|
|
1485
|
-
default: p(() => [
|
|
1488
|
+
default: p(() => [k("div", ss, [i(e(V), {
|
|
1486
1489
|
modelValue: t.value.code,
|
|
1487
|
-
"onUpdate:modelValue": y[1] || (y[1] = (
|
|
1490
|
+
"onUpdate:modelValue": y[1] || (y[1] = (v) => t.value.code = v),
|
|
1488
1491
|
placeholder: "请输入验证码",
|
|
1489
1492
|
autocomplete: "one-time-code"
|
|
1490
|
-
}, null, 8, ["modelValue"]), i(
|
|
1493
|
+
}, null, 8, ["modelValue"]), i(j, {
|
|
1491
1494
|
ref_key: "SendVerifyCodeRef",
|
|
1492
1495
|
ref: s,
|
|
1493
1496
|
size: a.size,
|
|
@@ -1495,10 +1498,10 @@ const At = {
|
|
|
1495
1498
|
style: {
|
|
1496
1499
|
"margin-left": "10px"
|
|
1497
1500
|
},
|
|
1498
|
-
onSend:
|
|
1501
|
+
onSend: _
|
|
1499
1502
|
}, null, 8, ["size", "loading"])])]),
|
|
1500
1503
|
_: 1
|
|
1501
|
-
}), a.requirePassword ? (
|
|
1504
|
+
}), a.requirePassword ? (n(), z(e(P), {
|
|
1502
1505
|
key: 0,
|
|
1503
1506
|
field: "password",
|
|
1504
1507
|
label: "密码",
|
|
@@ -1511,30 +1514,30 @@ const At = {
|
|
|
1511
1514
|
message: "密码不能少于10字符"
|
|
1512
1515
|
}]
|
|
1513
1516
|
}, {
|
|
1514
|
-
default: p(() => [i(e(
|
|
1517
|
+
default: p(() => [i(e(V), {
|
|
1515
1518
|
modelValue: t.value.password,
|
|
1516
|
-
"onUpdate:modelValue": y[2] || (y[2] = (
|
|
1519
|
+
"onUpdate:modelValue": y[2] || (y[2] = (v) => t.value.password = v),
|
|
1517
1520
|
placeholder: "请输入密码(可选)",
|
|
1518
1521
|
type: "password",
|
|
1519
1522
|
autocomplete: "new-password"
|
|
1520
1523
|
}, null, 8, ["modelValue"])]),
|
|
1521
1524
|
_: 1
|
|
1522
|
-
}, 8, ["rules"])) :
|
|
1525
|
+
}, 8, ["rules"])) : A("", !0), a.requirePassword && t.value.password ? (n(), z(e(P), {
|
|
1523
1526
|
key: 1,
|
|
1524
1527
|
field: "confirmPassword",
|
|
1525
1528
|
label: "确认密码",
|
|
1526
1529
|
"hide-label": "",
|
|
1527
|
-
rules:
|
|
1530
|
+
rules: c
|
|
1528
1531
|
}, {
|
|
1529
|
-
default: p(() => [i(e(
|
|
1532
|
+
default: p(() => [i(e(V), {
|
|
1530
1533
|
modelValue: t.value.confirmPassword,
|
|
1531
|
-
"onUpdate:modelValue": y[3] || (y[3] = (
|
|
1534
|
+
"onUpdate:modelValue": y[3] || (y[3] = (v) => t.value.confirmPassword = v),
|
|
1532
1535
|
placeholder: "请输入确认密码",
|
|
1533
1536
|
type: "password",
|
|
1534
1537
|
autocomplete: "new-password"
|
|
1535
1538
|
}, null, 8, ["modelValue"])]),
|
|
1536
1539
|
_: 1
|
|
1537
|
-
})) :
|
|
1540
|
+
})) : A("", !0), i(e(P), {
|
|
1538
1541
|
field: "inviteCode",
|
|
1539
1542
|
label: "邀请码",
|
|
1540
1543
|
"hide-label": "",
|
|
@@ -1542,55 +1545,55 @@ const At = {
|
|
|
1542
1545
|
required: !1
|
|
1543
1546
|
}]
|
|
1544
1547
|
}, {
|
|
1545
|
-
default: p(() => [i(e(
|
|
1548
|
+
default: p(() => [i(e(V), {
|
|
1546
1549
|
modelValue: t.value.inviteCode,
|
|
1547
|
-
"onUpdate:modelValue": y[4] || (y[4] = (
|
|
1550
|
+
"onUpdate:modelValue": y[4] || (y[4] = (v) => t.value.inviteCode = v),
|
|
1548
1551
|
placeholder: "邀请码(可选)",
|
|
1549
1552
|
autocomplete: "off"
|
|
1550
1553
|
}, null, 8, ["modelValue"])]),
|
|
1551
1554
|
_: 1
|
|
1552
|
-
}),
|
|
1555
|
+
}), k("div", is, [i(e(O), {
|
|
1553
1556
|
type: "primary",
|
|
1554
1557
|
loading: a.loading,
|
|
1555
1558
|
long: "",
|
|
1556
1559
|
size: a.size,
|
|
1557
|
-
onClick:
|
|
1560
|
+
onClick: m
|
|
1558
1561
|
}, {
|
|
1559
|
-
default: p(() => [...y[6] || (y[6] = [
|
|
1562
|
+
default: p(() => [...y[6] || (y[6] = [T(" 注册 ", -1)])]),
|
|
1560
1563
|
_: 1
|
|
1561
|
-
}, 8, ["loading", "size"]), e(h) ? (
|
|
1564
|
+
}, 8, ["loading", "size"]), e(h) ? (n(), z(e(P), {
|
|
1562
1565
|
key: 0,
|
|
1563
1566
|
field: "acceptedTerms",
|
|
1564
1567
|
"hide-label": "",
|
|
1565
1568
|
rules: e(g)
|
|
1566
1569
|
}, {
|
|
1567
|
-
default: p(() => [i(
|
|
1570
|
+
default: p(() => [i(X, {
|
|
1568
1571
|
"accepted-terms": t.value.acceptedTerms,
|
|
1569
|
-
"onUpdate:acceptedTerms": y[5] || (y[5] = (
|
|
1572
|
+
"onUpdate:acceptedTerms": y[5] || (y[5] = (v) => t.value.acceptedTerms = v),
|
|
1570
1573
|
"current-view": "signUp"
|
|
1571
1574
|
}, null, 8, ["accepted-terms"])]),
|
|
1572
1575
|
_: 1
|
|
1573
|
-
}, 8, ["rules"])) :
|
|
1576
|
+
}, 8, ["rules"])) : A("", !0)])]),
|
|
1574
1577
|
_: 1
|
|
1575
|
-
}, 8, ["model", "size"])]), i(
|
|
1576
|
-
onSwitchSignIn:
|
|
1578
|
+
}, 8, ["model", "size"])]), i(fe, {
|
|
1579
|
+
onSwitchSignIn: l
|
|
1577
1580
|
})]));
|
|
1578
1581
|
}
|
|
1579
|
-
}),
|
|
1582
|
+
}), os = /* @__PURE__ */ U(as, [["__scopeId", "data-v-d0af58fd"]]), ls = {
|
|
1580
1583
|
class: "SignUp"
|
|
1581
|
-
},
|
|
1584
|
+
}, ns = {
|
|
1582
1585
|
key: 0,
|
|
1583
1586
|
class: "tabsContainer"
|
|
1584
|
-
},
|
|
1587
|
+
}, rs = {
|
|
1585
1588
|
key: 1,
|
|
1586
1589
|
class: "empty"
|
|
1587
|
-
},
|
|
1590
|
+
}, us = {
|
|
1588
1591
|
key: 2,
|
|
1589
1592
|
class: "empty"
|
|
1590
|
-
},
|
|
1593
|
+
}, ds = {
|
|
1591
1594
|
key: 2,
|
|
1592
1595
|
class: "empty"
|
|
1593
|
-
},
|
|
1596
|
+
}, cs = /* @__PURE__ */ C({
|
|
1594
1597
|
__name: "AuthkitSignUp",
|
|
1595
1598
|
props: {
|
|
1596
1599
|
size: {
|
|
@@ -1604,65 +1607,65 @@ const At = {
|
|
|
1604
1607
|
}
|
|
1605
1608
|
},
|
|
1606
1609
|
emits: ["switchSignIn", "submit"],
|
|
1607
|
-
setup(
|
|
1610
|
+
setup(w, {
|
|
1608
1611
|
emit: r
|
|
1609
1612
|
}) {
|
|
1610
|
-
const u = r, o =
|
|
1613
|
+
const u = r, o = w, {
|
|
1611
1614
|
appsData: h
|
|
1612
|
-
} =
|
|
1615
|
+
} = N(), {
|
|
1613
1616
|
registrationBlocked: g,
|
|
1614
1617
|
signUpAuthEnabled: a
|
|
1615
|
-
} =
|
|
1616
|
-
const
|
|
1617
|
-
return s.value.signUp.email &&
|
|
1618
|
+
} = L(), s = R(() => h.value.authMethods), d = R(() => {
|
|
1619
|
+
const l = [];
|
|
1620
|
+
return s.value.signUp.email && l.push({
|
|
1618
1621
|
key: "email",
|
|
1619
1622
|
title: "邮箱注册"
|
|
1620
|
-
}), s.value.signUp.phone &&
|
|
1623
|
+
}), s.value.signUp.phone && l.push({
|
|
1621
1624
|
key: "phone",
|
|
1622
1625
|
title: "手机号注册"
|
|
1623
|
-
}),
|
|
1624
|
-
}),
|
|
1625
|
-
|
|
1626
|
-
var
|
|
1627
|
-
d.value.some((
|
|
1626
|
+
}), l;
|
|
1627
|
+
}), f = I("email");
|
|
1628
|
+
re(() => {
|
|
1629
|
+
var l;
|
|
1630
|
+
d.value.some((_) => _.key === f.value) || (f.value = ((l = d.value[0]) == null ? void 0 : l.key) || "email");
|
|
1628
1631
|
});
|
|
1629
1632
|
function t() {
|
|
1630
1633
|
u("switchSignIn");
|
|
1631
1634
|
}
|
|
1632
|
-
async function
|
|
1635
|
+
async function c(l) {
|
|
1633
1636
|
u("submit", {
|
|
1634
|
-
type:
|
|
1635
|
-
...
|
|
1637
|
+
type: f.value,
|
|
1638
|
+
...l
|
|
1636
1639
|
});
|
|
1637
1640
|
}
|
|
1638
|
-
return (
|
|
1639
|
-
"active-key":
|
|
1640
|
-
"onUpdate:activeKey":
|
|
1641
|
+
return (l, _) => (n(), S("div", ls, [d.value.length > 1 ? (n(), S("div", ns, [i(e(ce), {
|
|
1642
|
+
"active-key": f.value,
|
|
1643
|
+
"onUpdate:activeKey": _[0] || (_[0] = (m) => f.value = m)
|
|
1641
1644
|
}, {
|
|
1642
|
-
default: p(() => [(
|
|
1643
|
-
key:
|
|
1644
|
-
title:
|
|
1645
|
+
default: p(() => [(n(!0), S(F, null, ue(d.value, (m) => (n(), z(e(pe), {
|
|
1646
|
+
key: m.key,
|
|
1647
|
+
title: m.title
|
|
1645
1648
|
}, null, 8, ["title"]))), 128))]),
|
|
1646
1649
|
_: 1
|
|
1647
|
-
}, 8, ["active-key"])])) :
|
|
1650
|
+
}, 8, ["active-key"])])) : A("", !0), e(a) ? e(g) ? (n(), S("div", us, " 管理员尚未配置用户协议或隐私政策,暂无法注册。 ")) : (n(), S(F, {
|
|
1648
1651
|
key: 3
|
|
1649
|
-
}, [
|
|
1652
|
+
}, [f.value === "email" && s.value.signUp.email ? (n(), z(Zt, {
|
|
1650
1653
|
key: 0,
|
|
1651
1654
|
size: o.size,
|
|
1652
|
-
loading:
|
|
1653
|
-
onSubmit:
|
|
1654
|
-
}, null, 8, ["size", "loading"])) :
|
|
1655
|
+
loading: w.loading,
|
|
1656
|
+
onSubmit: c
|
|
1657
|
+
}, null, 8, ["size", "loading"])) : f.value === "phone" && s.value.signUp.phone ? (n(), z(os, {
|
|
1655
1658
|
key: 1,
|
|
1656
1659
|
size: o.size,
|
|
1657
|
-
loading:
|
|
1658
|
-
onSubmit:
|
|
1660
|
+
loading: w.loading,
|
|
1661
|
+
onSubmit: c,
|
|
1659
1662
|
onSwitchSignIn: t
|
|
1660
|
-
}, null, 8, ["size", "loading"])) : (
|
|
1663
|
+
}, null, 8, ["size", "loading"])) : (n(), S("div", ds, " 当前应用未开放用户注册 ")), f.value === "email" ? (n(), z(fe, {
|
|
1661
1664
|
key: 3,
|
|
1662
1665
|
onSwitchSignIn: t
|
|
1663
|
-
})) :
|
|
1666
|
+
})) : A("", !0)], 64)) : (n(), S("div", rs, " 系统已停止用户注册 "))]));
|
|
1664
1667
|
}
|
|
1665
|
-
}),
|
|
1668
|
+
}), ps = /* @__PURE__ */ U(cs, [["__scopeId", "data-v-b211d5ef"]]), ms = ["src"], fs = /* @__PURE__ */ C({
|
|
1666
1669
|
__name: "AuthkitAuthTitle",
|
|
1667
1670
|
props: {
|
|
1668
1671
|
size: {
|
|
@@ -1681,32 +1684,32 @@ const At = {
|
|
|
1681
1684
|
default: 60
|
|
1682
1685
|
}
|
|
1683
1686
|
},
|
|
1684
|
-
setup(
|
|
1685
|
-
const r =
|
|
1687
|
+
setup(w) {
|
|
1688
|
+
const r = w, u = `${r.size}px`, o = `${r.fontSize}px`, h = `${r.lineHeight}px`, {
|
|
1686
1689
|
currentView: g
|
|
1687
|
-
} =
|
|
1690
|
+
} = G(), {
|
|
1688
1691
|
appsData: a
|
|
1689
|
-
} =
|
|
1690
|
-
return (d,
|
|
1692
|
+
} = N(), s = R(() => g.value === "signIn" ? `${a.value.name}登录` : g.value === "signUp" ? `${a.value.name}账号注册` : g.value === "resetPassword" ? `${a.value.name}密码重置` : "");
|
|
1693
|
+
return (d, f) => (n(), S("div", {
|
|
1691
1694
|
class: "Title",
|
|
1692
|
-
style:
|
|
1695
|
+
style: H({
|
|
1693
1696
|
fontSize: o,
|
|
1694
1697
|
lineHeight: h
|
|
1695
1698
|
})
|
|
1696
|
-
}, [e(a).applicationLogoUrl ? (
|
|
1699
|
+
}, [e(a).applicationLogoUrl ? (n(), S("img", {
|
|
1697
1700
|
key: 0,
|
|
1698
1701
|
src: e(a).applicationLogoUrl,
|
|
1699
1702
|
srcset: "",
|
|
1700
|
-
style:
|
|
1703
|
+
style: H({
|
|
1701
1704
|
width: u
|
|
1702
1705
|
})
|
|
1703
|
-
}, null, 12,
|
|
1706
|
+
}, null, 12, ms)) : A("", !0), k("span", null, B(s.value), 1), Q(d.$slots, "default", {}, void 0, !0)], 4));
|
|
1704
1707
|
}
|
|
1705
|
-
}), Pe = /* @__PURE__ */ U(
|
|
1708
|
+
}), Pe = /* @__PURE__ */ U(fs, [["__scopeId", "data-v-8ebe7939"]]), vs = {
|
|
1706
1709
|
class: "Auth"
|
|
1707
|
-
},
|
|
1710
|
+
}, gs = {
|
|
1708
1711
|
class: "body"
|
|
1709
|
-
},
|
|
1712
|
+
}, hs = /* @__PURE__ */ C({
|
|
1710
1713
|
__name: "AuthkitAuth",
|
|
1711
1714
|
props: {
|
|
1712
1715
|
size: {
|
|
@@ -1718,8 +1721,8 @@ const At = {
|
|
|
1718
1721
|
default: () => !0
|
|
1719
1722
|
}
|
|
1720
1723
|
},
|
|
1721
|
-
setup(
|
|
1722
|
-
const r =
|
|
1724
|
+
setup(w) {
|
|
1725
|
+
const r = w, {
|
|
1723
1726
|
signInSubmit: u,
|
|
1724
1727
|
passkeySignInSubmit: o,
|
|
1725
1728
|
signUpSubmit: h,
|
|
@@ -1727,43 +1730,43 @@ const At = {
|
|
|
1727
1730
|
currentView: a,
|
|
1728
1731
|
authSignInLoading: s,
|
|
1729
1732
|
authSignUpLoading: d,
|
|
1730
|
-
resetPasswordLoading:
|
|
1733
|
+
resetPasswordLoading: f,
|
|
1731
1734
|
switchSignUp: t,
|
|
1732
|
-
switchResetPassword:
|
|
1733
|
-
switchSignIn:
|
|
1734
|
-
} =
|
|
1735
|
-
return (
|
|
1735
|
+
switchResetPassword: c,
|
|
1736
|
+
switchSignIn: l
|
|
1737
|
+
} = G();
|
|
1738
|
+
return (_, m) => (n(), S("div", vs, [w.showTitle ? (n(), z(Pe, {
|
|
1736
1739
|
key: 0,
|
|
1737
1740
|
size: 32,
|
|
1738
1741
|
"font-size": 20
|
|
1739
|
-
})) :
|
|
1742
|
+
})) : A("", !0), k("div", gs, [e(a) === "signIn" ? (n(), z(Kt, {
|
|
1740
1743
|
key: 0,
|
|
1741
1744
|
size: r.size,
|
|
1742
1745
|
loading: e(s),
|
|
1743
1746
|
onSwitchSignUp: e(t),
|
|
1744
|
-
onSwitchResetPassword: e(
|
|
1745
|
-
onSubmit:
|
|
1747
|
+
onSwitchResetPassword: e(c),
|
|
1748
|
+
onSubmit: m[0] || (m[0] = (b) => e(u)(b))
|
|
1746
1749
|
}, {
|
|
1747
|
-
OAuth: p(() => [i(
|
|
1750
|
+
OAuth: p(() => [i(at, {
|
|
1748
1751
|
size: r.size,
|
|
1749
1752
|
onPasskeySubmit: e(o)
|
|
1750
1753
|
}, null, 8, ["size", "onPasskeySubmit"])]),
|
|
1751
1754
|
_: 1
|
|
1752
|
-
}, 8, ["size", "loading", "onSwitchSignUp", "onSwitchResetPassword"])) : e(a) === "signUp" ? (
|
|
1755
|
+
}, 8, ["size", "loading", "onSwitchSignUp", "onSwitchResetPassword"])) : e(a) === "signUp" ? (n(), z(ps, {
|
|
1753
1756
|
key: 1,
|
|
1754
1757
|
size: r.size,
|
|
1755
1758
|
loading: e(d),
|
|
1756
|
-
onSwitchSignIn: e(
|
|
1757
|
-
onSubmit:
|
|
1758
|
-
}, null, 8, ["size", "loading", "onSwitchSignIn"])) : e(a) === "resetPassword" ? (
|
|
1759
|
+
onSwitchSignIn: e(l),
|
|
1760
|
+
onSubmit: m[1] || (m[1] = (b) => e(h)(b))
|
|
1761
|
+
}, null, 8, ["size", "loading", "onSwitchSignIn"])) : e(a) === "resetPassword" ? (n(), z(wt, {
|
|
1759
1762
|
key: 2,
|
|
1760
1763
|
size: r.size,
|
|
1761
|
-
loading: e(
|
|
1762
|
-
onSwitchSignIn: e(
|
|
1763
|
-
onSubmit:
|
|
1764
|
-
}, null, 8, ["size", "loading", "onSwitchSignIn"])) :
|
|
1764
|
+
loading: e(f),
|
|
1765
|
+
onSwitchSignIn: e(l),
|
|
1766
|
+
onSubmit: m[2] || (m[2] = (b) => e(g)(b))
|
|
1767
|
+
}, null, 8, ["size", "loading", "onSwitchSignIn"])) : A("", !0)])]));
|
|
1765
1768
|
}
|
|
1766
|
-
}),
|
|
1769
|
+
}), ys = /* @__PURE__ */ U(hs, [["__scopeId", "data-v-60874d88"]]), bs = /* @__PURE__ */ C({
|
|
1767
1770
|
__name: "AuthkitAuthModal",
|
|
1768
1771
|
props: {
|
|
1769
1772
|
size: {
|
|
@@ -1771,28 +1774,28 @@ const At = {
|
|
|
1771
1774
|
}
|
|
1772
1775
|
},
|
|
1773
1776
|
emits: ["close"],
|
|
1774
|
-
setup(
|
|
1777
|
+
setup(w, {
|
|
1775
1778
|
emit: r
|
|
1776
1779
|
}) {
|
|
1777
1780
|
const u = r, {
|
|
1778
1781
|
onSignIn: o,
|
|
1779
1782
|
switchSignIn: h
|
|
1780
|
-
} =
|
|
1783
|
+
} = G(), {
|
|
1781
1784
|
close: g
|
|
1782
1785
|
} = we();
|
|
1783
1786
|
let a = null;
|
|
1784
|
-
|
|
1787
|
+
M(() => {
|
|
1785
1788
|
a = o(() => g());
|
|
1786
|
-
}),
|
|
1789
|
+
}), de(() => {
|
|
1787
1790
|
a == null || a(), a = null;
|
|
1788
1791
|
});
|
|
1789
|
-
function s(
|
|
1790
|
-
|
|
1792
|
+
function s(f) {
|
|
1793
|
+
f || d();
|
|
1791
1794
|
}
|
|
1792
1795
|
function d() {
|
|
1793
1796
|
h(), g(), u("close");
|
|
1794
1797
|
}
|
|
1795
|
-
return (
|
|
1798
|
+
return (f, t) => (n(), z(e(xe), {
|
|
1796
1799
|
visible: !0,
|
|
1797
1800
|
footer: !1,
|
|
1798
1801
|
"mask-closable": !1,
|
|
@@ -1803,51 +1806,51 @@ const At = {
|
|
|
1803
1806
|
onClose: d
|
|
1804
1807
|
}, {
|
|
1805
1808
|
title: p(() => [i(Pe)]),
|
|
1806
|
-
default: p(() => [i(
|
|
1809
|
+
default: p(() => [i(ys, {
|
|
1807
1810
|
"show-title": !1,
|
|
1808
|
-
size:
|
|
1811
|
+
size: w.size
|
|
1809
1812
|
}, null, 8, ["size"])]),
|
|
1810
1813
|
_: 1
|
|
1811
1814
|
}));
|
|
1812
1815
|
}
|
|
1813
|
-
}),
|
|
1814
|
-
function Ve(
|
|
1816
|
+
}), ws = /* @__PURE__ */ U(bs, [["__scopeId", "data-v-19a4d5d0"]]);
|
|
1817
|
+
function Ve(w, r = {}) {
|
|
1815
1818
|
const {
|
|
1816
1819
|
bindIdentityRedirect: u = "",
|
|
1817
1820
|
closePopupOnBindSuccess: o = !0,
|
|
1818
1821
|
restoreRedirectAfterSignIn: h = !0,
|
|
1819
1822
|
defaultRedirect: g = ""
|
|
1820
|
-
} = r, a =
|
|
1823
|
+
} = r, a = I(!1), {
|
|
1821
1824
|
completeSignIn: s
|
|
1822
|
-
} =
|
|
1825
|
+
} = G();
|
|
1823
1826
|
async function d() {
|
|
1824
1827
|
if (typeof window > "u")
|
|
1825
1828
|
return !1;
|
|
1826
|
-
const
|
|
1827
|
-
if (!ze(
|
|
1829
|
+
const f = new URL(window.location.href);
|
|
1830
|
+
if (!ze(f))
|
|
1828
1831
|
return !1;
|
|
1829
|
-
const t =
|
|
1832
|
+
const t = f.searchParams.get("error");
|
|
1830
1833
|
if (t)
|
|
1831
|
-
return window.history.replaceState({}, "",
|
|
1832
|
-
if (
|
|
1833
|
-
const
|
|
1834
|
-
return window.history.replaceState({}, "",
|
|
1834
|
+
return window.history.replaceState({}, "", oe(f)), le.error(t), !0;
|
|
1835
|
+
if (f.searchParams.get("bindSuccess") === "true") {
|
|
1836
|
+
const l = f.searchParams.get("provider");
|
|
1837
|
+
return window.history.replaceState({}, "", oe(f)), le.success(l ? `${l} 绑定成功` : "绑定成功"), o && window.opener && setTimeout(() => window.close(), 800), !0;
|
|
1835
1838
|
}
|
|
1836
|
-
const
|
|
1837
|
-
if (!
|
|
1839
|
+
const c = f.searchParams.get("token");
|
|
1840
|
+
if (!c)
|
|
1838
1841
|
return !1;
|
|
1839
1842
|
a.value = !0;
|
|
1840
1843
|
try {
|
|
1841
|
-
const
|
|
1842
|
-
if (window.history.replaceState({}, "",
|
|
1843
|
-
jwtToken:
|
|
1844
|
-
userId:
|
|
1845
|
-
appId:
|
|
1846
|
-
needBindIdentity:
|
|
1847
|
-
}),
|
|
1848
|
-
return await
|
|
1849
|
-
const y =
|
|
1850
|
-
return y && await
|
|
1844
|
+
const l = f.searchParams.get("userId"), _ = f.searchParams.get("appId"), m = f.searchParams.get("needBindIdentity") === "true";
|
|
1845
|
+
if (window.history.replaceState({}, "", oe(f)), s({
|
|
1846
|
+
jwtToken: c,
|
|
1847
|
+
userId: l,
|
|
1848
|
+
appId: _,
|
|
1849
|
+
needBindIdentity: m
|
|
1850
|
+
}), m && u)
|
|
1851
|
+
return await w.replace(u), !0;
|
|
1852
|
+
const y = Ge(h) || g;
|
|
1853
|
+
return y && await w.replace(y), !0;
|
|
1851
1854
|
} finally {
|
|
1852
1855
|
a.value = !1;
|
|
1853
1856
|
}
|
|
@@ -1857,12 +1860,12 @@ function Ve(b, r = {}) {
|
|
|
1857
1860
|
handleOAuthCallback: d
|
|
1858
1861
|
};
|
|
1859
1862
|
}
|
|
1860
|
-
const
|
|
1863
|
+
const _s = {
|
|
1861
1864
|
key: 0,
|
|
1862
1865
|
class: "AuthkitOAuthCallbackOverlay",
|
|
1863
1866
|
"aria-live": "polite",
|
|
1864
1867
|
"aria-busy": "true"
|
|
1865
|
-
},
|
|
1868
|
+
}, ks = /* @__PURE__ */ C({
|
|
1866
1869
|
__name: "AuthkitOAuthCallbackProvider",
|
|
1867
1870
|
props: {
|
|
1868
1871
|
bindIdentityRedirect: {
|
|
@@ -1877,8 +1880,8 @@ const Ss = {
|
|
|
1877
1880
|
default: !0
|
|
1878
1881
|
}
|
|
1879
1882
|
},
|
|
1880
|
-
setup(
|
|
1881
|
-
const r =
|
|
1883
|
+
setup(w) {
|
|
1884
|
+
const r = w, u = be(), {
|
|
1882
1885
|
processing: o,
|
|
1883
1886
|
handleOAuthCallback: h
|
|
1884
1887
|
} = Ve(u, {
|
|
@@ -1886,19 +1889,19 @@ const Ss = {
|
|
|
1886
1889
|
closePopupOnBindSuccess: r.closePopupOnBindSuccess,
|
|
1887
1890
|
restoreRedirectAfterSignIn: r.restoreRedirectAfterSignIn
|
|
1888
1891
|
});
|
|
1889
|
-
return
|
|
1892
|
+
return M(() => {
|
|
1890
1893
|
h();
|
|
1891
|
-
}), (g, a) => (
|
|
1894
|
+
}), (g, a) => (n(), z(Te, {
|
|
1892
1895
|
to: "body"
|
|
1893
|
-
}, [e(o) ? (
|
|
1896
|
+
}, [e(o) ? (n(), S("div", _s, [...a[0] || (a[0] = [k("div", {
|
|
1894
1897
|
class: "AuthkitOAuthCallbackOverlay__panel"
|
|
1895
|
-
}, [
|
|
1898
|
+
}, [k("div", {
|
|
1896
1899
|
class: "AuthkitOAuthCallbackOverlay__spinner"
|
|
1897
|
-
}),
|
|
1900
|
+
}), k("p", {
|
|
1898
1901
|
class: "AuthkitOAuthCallbackOverlay__text"
|
|
1899
|
-
}, "正在登录...")], -1)])])) :
|
|
1902
|
+
}, "正在登录...")], -1)])])) : A("", !0)]));
|
|
1900
1903
|
}
|
|
1901
|
-
}),
|
|
1904
|
+
}), Ss = /* @__PURE__ */ U(ks, [["__scopeId", "data-v-7162b776"]]), vi = /* @__PURE__ */ C({
|
|
1902
1905
|
__name: "AuthkitProvider",
|
|
1903
1906
|
props: {
|
|
1904
1907
|
handleOAuthCallback: {
|
|
@@ -1933,12 +1936,12 @@ const Ss = {
|
|
|
1933
1936
|
}
|
|
1934
1937
|
},
|
|
1935
1938
|
emits: ["toPrivacyPolicy", "toUserServiceAgreement"],
|
|
1936
|
-
setup(
|
|
1939
|
+
setup(w, {
|
|
1937
1940
|
emit: r
|
|
1938
1941
|
}) {
|
|
1939
1942
|
const {
|
|
1940
1943
|
config: u
|
|
1941
|
-
} =
|
|
1944
|
+
} = me(), o = w, h = r, g = qe(), {
|
|
1942
1945
|
openLegalDoc: a
|
|
1943
1946
|
} = Ie({
|
|
1944
1947
|
route: g
|
|
@@ -1946,70 +1949,70 @@ const Ss = {
|
|
|
1946
1949
|
isOpen: s
|
|
1947
1950
|
} = we(), {
|
|
1948
1951
|
restoreSession: d,
|
|
1949
|
-
onSignIn:
|
|
1952
|
+
onSignIn: f,
|
|
1950
1953
|
onSignOut: t
|
|
1951
|
-
} =
|
|
1952
|
-
fetchUserProfile:
|
|
1953
|
-
clearUserProfile:
|
|
1954
|
-
markAuthSessionBootstrapped:
|
|
1954
|
+
} = G(), {
|
|
1955
|
+
fetchUserProfile: c,
|
|
1956
|
+
clearUserProfile: l,
|
|
1957
|
+
markAuthSessionBootstrapped: _
|
|
1955
1958
|
} = Ae(), {
|
|
1956
|
-
appsAuthPageInfoApi:
|
|
1957
|
-
} =
|
|
1958
|
-
|
|
1959
|
+
appsAuthPageInfoApi: m
|
|
1960
|
+
} = N(), b = f(() => {
|
|
1961
|
+
c();
|
|
1959
1962
|
}), y = t(() => {
|
|
1960
|
-
|
|
1963
|
+
l();
|
|
1961
1964
|
});
|
|
1962
|
-
function
|
|
1965
|
+
function v() {
|
|
1963
1966
|
if (u.legalDocsMode === "builtin") {
|
|
1964
1967
|
a("privacyPolicy");
|
|
1965
1968
|
return;
|
|
1966
1969
|
}
|
|
1967
1970
|
h("toPrivacyPolicy");
|
|
1968
1971
|
}
|
|
1969
|
-
function
|
|
1972
|
+
function $() {
|
|
1970
1973
|
if (u.legalDocsMode === "builtin") {
|
|
1971
1974
|
a("userServiceAgreement");
|
|
1972
1975
|
return;
|
|
1973
1976
|
}
|
|
1974
1977
|
h("toUserServiceAgreement");
|
|
1975
1978
|
}
|
|
1976
|
-
let
|
|
1977
|
-
async function
|
|
1979
|
+
let q = null;
|
|
1980
|
+
async function E() {
|
|
1978
1981
|
try {
|
|
1979
|
-
if (o.fetchAppInfo &&
|
|
1980
|
-
await
|
|
1982
|
+
if (o.fetchAppInfo && m(), o.restoreSession && d()) {
|
|
1983
|
+
await c();
|
|
1981
1984
|
return;
|
|
1982
1985
|
}
|
|
1983
|
-
|
|
1986
|
+
l();
|
|
1984
1987
|
} finally {
|
|
1985
|
-
|
|
1988
|
+
_();
|
|
1986
1989
|
}
|
|
1987
1990
|
}
|
|
1988
|
-
function
|
|
1989
|
-
return
|
|
1991
|
+
function Y() {
|
|
1992
|
+
return q || (q = E()), q;
|
|
1990
1993
|
}
|
|
1991
|
-
return typeof window < "u" &&
|
|
1992
|
-
|
|
1993
|
-
onPrivacyPolicy:
|
|
1994
|
-
onUserServiceAgreement:
|
|
1994
|
+
return typeof window < "u" && Y(), M(() => {
|
|
1995
|
+
_t({
|
|
1996
|
+
onPrivacyPolicy: v,
|
|
1997
|
+
onUserServiceAgreement: $
|
|
1995
1998
|
});
|
|
1996
|
-
}),
|
|
1997
|
-
|
|
1998
|
-
}), (Ce,
|
|
1999
|
+
}), de(() => {
|
|
2000
|
+
b(), y();
|
|
2001
|
+
}), (Ce, Ns) => (n(), S(F, null, [Q(Ce.$slots, "default"), o.handleOAuthCallback ? (n(), z(Ss, {
|
|
1999
2002
|
key: 0,
|
|
2000
2003
|
"bind-identity-redirect": o.bindIdentityRedirect,
|
|
2001
2004
|
"close-popup-on-bind-success": o.closePopupOnBindSuccess,
|
|
2002
2005
|
"restore-redirect-after-sign-in": o.restoreRedirectAfterSignIn
|
|
2003
|
-
}, null, 8, ["bind-identity-redirect", "close-popup-on-bind-success", "restore-redirect-after-sign-in"])) :
|
|
2006
|
+
}, null, 8, ["bind-identity-redirect", "close-popup-on-bind-success", "restore-redirect-after-sign-in"])) : A("", !0), o.showAuthModal && e(s) ? (n(), z(ws, {
|
|
2004
2007
|
key: 1,
|
|
2005
2008
|
size: o.authModalSize
|
|
2006
|
-
}, null, 8, ["size"])) :
|
|
2009
|
+
}, null, 8, ["size"])) : A("", !0)], 64));
|
|
2007
2010
|
}
|
|
2008
|
-
}),
|
|
2011
|
+
}), zs = {
|
|
2009
2012
|
class: "header"
|
|
2010
|
-
},
|
|
2013
|
+
}, Is = ["href"], As = {
|
|
2011
2014
|
class: "container"
|
|
2012
|
-
},
|
|
2015
|
+
}, Ps = /* @__PURE__ */ C({
|
|
2013
2016
|
__name: "AuthkitAuthContainer",
|
|
2014
2017
|
props: {
|
|
2015
2018
|
applicationLogoUrl: {
|
|
@@ -2051,39 +2054,39 @@ const Ss = {
|
|
|
2051
2054
|
default: "color"
|
|
2052
2055
|
}
|
|
2053
2056
|
},
|
|
2054
|
-
setup(
|
|
2055
|
-
const r =
|
|
2057
|
+
setup(w) {
|
|
2058
|
+
const r = w, u = R(() => r.backgroundType === "color" ? {
|
|
2056
2059
|
backgroundColor: r.backgroundColor
|
|
2057
2060
|
} : {
|
|
2058
2061
|
backgroundImage: `url(${r.backgroundImage})`
|
|
2059
2062
|
});
|
|
2060
|
-
return (o, h) => (
|
|
2063
|
+
return (o, h) => (n(), S("div", {
|
|
2061
2064
|
class: "auth",
|
|
2062
|
-
style:
|
|
2063
|
-
}, [
|
|
2065
|
+
style: H(u.value)
|
|
2066
|
+
}, [k("div", zs, [r.name ? (n(), S("a", {
|
|
2064
2067
|
key: 0,
|
|
2065
2068
|
href: r.appHomePage,
|
|
2066
2069
|
target: "_self",
|
|
2067
2070
|
class: "link",
|
|
2068
|
-
style:
|
|
2071
|
+
style: H({
|
|
2069
2072
|
color: r.linkColor
|
|
2070
2073
|
})
|
|
2071
|
-
}, " 返回主页 ", 12,
|
|
2074
|
+
}, " 返回主页 ", 12, Is)) : A("", !0)]), k("div", As, [Q(o.$slots, "default", {}, void 0, !0)])], 4));
|
|
2072
2075
|
}
|
|
2073
|
-
}),
|
|
2076
|
+
}), gi = /* @__PURE__ */ U(Ps, [["__scopeId", "data-v-0e13d3ff"]]), Vs = {
|
|
2074
2077
|
class: "box"
|
|
2075
|
-
},
|
|
2078
|
+
}, Cs = {
|
|
2076
2079
|
class: "title"
|
|
2077
|
-
},
|
|
2080
|
+
}, Us = {
|
|
2078
2081
|
class: "content"
|
|
2079
|
-
},
|
|
2082
|
+
}, $s = {
|
|
2080
2083
|
class: "redirect"
|
|
2081
|
-
},
|
|
2084
|
+
}, Rs = {
|
|
2082
2085
|
style: {
|
|
2083
2086
|
"font-weight": "bold",
|
|
2084
2087
|
"font-size": "12px"
|
|
2085
2088
|
}
|
|
2086
|
-
},
|
|
2089
|
+
}, Ts = /* @__PURE__ */ C({
|
|
2087
2090
|
__name: "AuthkitAuthorize",
|
|
2088
2091
|
props: {
|
|
2089
2092
|
size: {
|
|
@@ -2131,8 +2134,8 @@ const Ss = {
|
|
|
2131
2134
|
default: () => ""
|
|
2132
2135
|
}
|
|
2133
2136
|
},
|
|
2134
|
-
setup(
|
|
2135
|
-
const r =
|
|
2137
|
+
setup(w) {
|
|
2138
|
+
const r = I(!1), u = w, o = I({
|
|
2136
2139
|
name: "",
|
|
2137
2140
|
homePageUrl: "",
|
|
2138
2141
|
createAt: "",
|
|
@@ -2142,7 +2145,7 @@ const Ss = {
|
|
|
2142
2145
|
const {
|
|
2143
2146
|
data: a,
|
|
2144
2147
|
error: s
|
|
2145
|
-
} = await
|
|
2148
|
+
} = await x().auth.apps.authPageInfo.post({});
|
|
2146
2149
|
s || !a || (o.value = {
|
|
2147
2150
|
name: a.name,
|
|
2148
2151
|
homePageUrl: a.homePageUrl || "",
|
|
@@ -2156,7 +2159,7 @@ const Ss = {
|
|
|
2156
2159
|
const {
|
|
2157
2160
|
data: a,
|
|
2158
2161
|
error: s
|
|
2159
|
-
} = await
|
|
2162
|
+
} = await x().auth.oauth2.authorize.post({
|
|
2160
2163
|
client_id: u.clientId,
|
|
2161
2164
|
response_type: u.responseType,
|
|
2162
2165
|
scope: u.scope,
|
|
@@ -2168,34 +2171,34 @@ const Ss = {
|
|
|
2168
2171
|
const d = a;
|
|
2169
2172
|
window.location.href = d.authorizeUrl;
|
|
2170
2173
|
}
|
|
2171
|
-
return (a, s) => (
|
|
2172
|
-
default: p(() => [i(e(
|
|
2174
|
+
return (a, s) => (n(), S("div", Vs, [k("div", Cs, B(`授权 ${o.value.name}`), 1), k("div", Us, [i(e(Be), null, {
|
|
2175
|
+
default: p(() => [i(e(ie), null, {
|
|
2173
2176
|
default: p(() => {
|
|
2174
2177
|
var d;
|
|
2175
|
-
return [i(e(
|
|
2178
|
+
return [i(e(ae), {
|
|
2176
2179
|
title: o.value.name,
|
|
2177
2180
|
description: `想要使用您的${(d = u.userInfo) == null ? void 0 : d.nickname}账户`
|
|
2178
2181
|
}, {
|
|
2179
2182
|
avatar: p(() => {
|
|
2180
|
-
var
|
|
2181
|
-
return [i(e(
|
|
2183
|
+
var f;
|
|
2184
|
+
return [i(e(ee), {
|
|
2182
2185
|
shape: "square",
|
|
2183
|
-
"image-url": (
|
|
2186
|
+
"image-url": (f = u.userInfo) == null ? void 0 : f.avatar
|
|
2184
2187
|
}, null, 8, ["image-url"])];
|
|
2185
2188
|
}),
|
|
2186
2189
|
_: 1
|
|
2187
2190
|
}, 8, ["title", "description"])];
|
|
2188
2191
|
}),
|
|
2189
2192
|
_: 1
|
|
2190
|
-
}), i(e(
|
|
2191
|
-
default: p(() => [i(e(
|
|
2193
|
+
}), i(e(ie), null, {
|
|
2194
|
+
default: p(() => [i(e(ae), {
|
|
2192
2195
|
title: "公开信息",
|
|
2193
2196
|
description: "头像、昵称"
|
|
2194
2197
|
}, {
|
|
2195
|
-
avatar: p(() => [i(e(
|
|
2198
|
+
avatar: p(() => [i(e(ee), {
|
|
2196
2199
|
shape: "square"
|
|
2197
2200
|
}, {
|
|
2198
|
-
default: p(() => [...s[0] || (s[0] = [
|
|
2201
|
+
default: p(() => [...s[0] || (s[0] = [k("img", {
|
|
2199
2202
|
alt: "avatar",
|
|
2200
2203
|
src: "https://p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/3ee5f13fb09879ecb5185e440cef6eb9.png~tplv-uwbnlip3yd-webp.webp"
|
|
2201
2204
|
}, null, -1)])]),
|
|
@@ -2204,15 +2207,15 @@ const Ss = {
|
|
|
2204
2207
|
_: 1
|
|
2205
2208
|
})]),
|
|
2206
2209
|
_: 1
|
|
2207
|
-
}), i(e(
|
|
2208
|
-
default: p(() => [i(e(
|
|
2210
|
+
}), i(e(ie), null, {
|
|
2211
|
+
default: p(() => [i(e(ae), {
|
|
2209
2212
|
title: "个人用户数据",
|
|
2210
2213
|
description: "电子邮件地址"
|
|
2211
2214
|
}, {
|
|
2212
|
-
avatar: p(() => [i(e(
|
|
2215
|
+
avatar: p(() => [i(e(ee), {
|
|
2213
2216
|
shape: "square"
|
|
2214
2217
|
}, {
|
|
2215
|
-
default: p(() => [...s[1] || (s[1] = [
|
|
2218
|
+
default: p(() => [...s[1] || (s[1] = [k("img", {
|
|
2216
2219
|
alt: "avatar",
|
|
2217
2220
|
src: "https://p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/3ee5f13fb09879ecb5185e440cef6eb9.png~tplv-uwbnlip3yd-webp.webp"
|
|
2218
2221
|
}, null, -1)])]),
|
|
@@ -2223,30 +2226,30 @@ const Ss = {
|
|
|
2223
2226
|
_: 1
|
|
2224
2227
|
})]),
|
|
2225
2228
|
_: 1
|
|
2226
|
-
}), i(e(
|
|
2229
|
+
}), i(e(O), {
|
|
2227
2230
|
type: "primary",
|
|
2228
2231
|
size: u.size,
|
|
2229
2232
|
loading: r.value,
|
|
2230
2233
|
onClick: g
|
|
2231
2234
|
}, {
|
|
2232
|
-
default: p(() => [...s[2] || (s[2] = [
|
|
2235
|
+
default: p(() => [...s[2] || (s[2] = [T(" 授权 ", -1)])]),
|
|
2233
2236
|
_: 1
|
|
2234
|
-
}, 8, ["size", "loading"]),
|
|
2237
|
+
}, 8, ["size", "loading"]), k("div", $s, [s[3] || (s[3] = k("div", {
|
|
2235
2238
|
class: "redirect-hint"
|
|
2236
|
-
}, "授权后将跳转至", -1)),
|
|
2239
|
+
}, "授权后将跳转至", -1)), k("div", Rs, B(o.value.authorizationCallback), 1)])])]));
|
|
2237
2240
|
}
|
|
2238
|
-
}),
|
|
2241
|
+
}), hi = /* @__PURE__ */ U(Ts, [["__scopeId", "data-v-6c1792d3"]]), qs = {
|
|
2239
2242
|
class: "oauth-callback"
|
|
2240
|
-
},
|
|
2243
|
+
}, Os = {
|
|
2241
2244
|
key: 0,
|
|
2242
2245
|
class: "callback-loading"
|
|
2243
|
-
},
|
|
2246
|
+
}, xs = {
|
|
2244
2247
|
key: 1,
|
|
2245
2248
|
class: "callback-error"
|
|
2246
|
-
},
|
|
2249
|
+
}, Bs = {
|
|
2247
2250
|
key: 2,
|
|
2248
2251
|
class: "callback-success"
|
|
2249
|
-
},
|
|
2252
|
+
}, Ls = /* @__PURE__ */ C({
|
|
2250
2253
|
__name: "AuthkitOauthCallback",
|
|
2251
2254
|
props: {
|
|
2252
2255
|
defaultRedirect: {},
|
|
@@ -2254,21 +2257,21 @@ const Ss = {
|
|
|
2254
2257
|
bindIdentityRedirect: {}
|
|
2255
2258
|
},
|
|
2256
2259
|
emits: ["success", "error", "needBindIdentity"],
|
|
2257
|
-
setup(
|
|
2260
|
+
setup(w, {
|
|
2258
2261
|
emit: r
|
|
2259
2262
|
}) {
|
|
2260
|
-
const u =
|
|
2263
|
+
const u = w, o = r, h = I("登录成功,正在跳转..."), g = I(""), {
|
|
2261
2264
|
restoreSession: a
|
|
2262
|
-
} =
|
|
2265
|
+
} = G(), s = be(), {
|
|
2263
2266
|
processing: d,
|
|
2264
|
-
handleOAuthCallback:
|
|
2267
|
+
handleOAuthCallback: f
|
|
2265
2268
|
} = Ve(s, {
|
|
2266
2269
|
bindIdentityRedirect: u.bindIdentityRedirect,
|
|
2267
2270
|
defaultRedirect: u.defaultRedirect
|
|
2268
2271
|
});
|
|
2269
2272
|
async function t() {
|
|
2270
|
-
const
|
|
2271
|
-
if (!ze(
|
|
2273
|
+
const l = new URL(window.location.href);
|
|
2274
|
+
if (!ze(l)) {
|
|
2272
2275
|
if (a()) {
|
|
2273
2276
|
await s.replace(u.defaultRedirect || "/");
|
|
2274
2277
|
return;
|
|
@@ -2276,40 +2279,40 @@ const Ss = {
|
|
|
2276
2279
|
g.value = "无效的访问";
|
|
2277
2280
|
return;
|
|
2278
2281
|
}
|
|
2279
|
-
const
|
|
2280
|
-
if (
|
|
2281
|
-
g.value =
|
|
2282
|
+
const _ = l.searchParams.get("error");
|
|
2283
|
+
if (_) {
|
|
2284
|
+
g.value = _, o("error", _), await f();
|
|
2282
2285
|
return;
|
|
2283
2286
|
}
|
|
2284
|
-
await
|
|
2287
|
+
await f() || (g.value = "登录失败:未收到认证令牌", o("error", g.value));
|
|
2285
2288
|
}
|
|
2286
|
-
function
|
|
2289
|
+
function c() {
|
|
2287
2290
|
s.replace(u.defaultRedirect || "/");
|
|
2288
2291
|
}
|
|
2289
|
-
return
|
|
2292
|
+
return M(() => {
|
|
2290
2293
|
t();
|
|
2291
|
-
}), (
|
|
2294
|
+
}), (l, _) => (n(), S("div", qs, [e(d) ? (n(), S("div", Os, [_[0] || (_[0] = k("div", {
|
|
2292
2295
|
class: "spinner"
|
|
2293
|
-
}, null, -1)),
|
|
2296
|
+
}, null, -1)), k("p", null, B(u.loadingText ?? "正在登录..."), 1)])) : g.value ? (n(), S("div", xs, [_[1] || (_[1] = k("div", {
|
|
2294
2297
|
class: "error-icon"
|
|
2295
|
-
}, "✕", -1)),
|
|
2298
|
+
}, "✕", -1)), _[2] || (_[2] = k("h2", null, "登录失败", -1)), k("p", null, B(g.value), 1), k("button", {
|
|
2296
2299
|
class: "retry-btn",
|
|
2297
2300
|
type: "button",
|
|
2298
|
-
onClick:
|
|
2299
|
-
}, "返回重试")])) : (
|
|
2301
|
+
onClick: c
|
|
2302
|
+
}, "返回重试")])) : (n(), S("div", Bs, [_[3] || (_[3] = k("div", {
|
|
2300
2303
|
class: "success-icon"
|
|
2301
|
-
}, "✓", -1)),
|
|
2304
|
+
}, "✓", -1)), k("p", null, B(h.value), 1)]))]));
|
|
2302
2305
|
}
|
|
2303
|
-
}),
|
|
2306
|
+
}), yi = /* @__PURE__ */ U(Ls, [["__scopeId", "data-v-98babf68"]]), Fs = {
|
|
2304
2307
|
class: "oauth-binding-account"
|
|
2305
|
-
},
|
|
2308
|
+
}, Ms = {
|
|
2306
2309
|
key: 1,
|
|
2307
2310
|
class: "oauth-binding-account__icon"
|
|
2308
|
-
},
|
|
2311
|
+
}, Ds = {
|
|
2309
2312
|
class: "oauth-binding-account__info"
|
|
2310
|
-
},
|
|
2313
|
+
}, Es = {
|
|
2311
2314
|
class: "oauth-binding-account__name"
|
|
2312
|
-
},
|
|
2315
|
+
}, Hs = /* @__PURE__ */ C({
|
|
2313
2316
|
__name: "AuthkitGithubBinding",
|
|
2314
2317
|
props: {
|
|
2315
2318
|
size: {
|
|
@@ -2317,181 +2320,181 @@ const Ss = {
|
|
|
2317
2320
|
required: !0
|
|
2318
2321
|
}
|
|
2319
2322
|
},
|
|
2320
|
-
setup(
|
|
2323
|
+
setup(w) {
|
|
2321
2324
|
const {
|
|
2322
2325
|
config: r
|
|
2323
|
-
} =
|
|
2326
|
+
} = me(), {
|
|
2324
2327
|
userProfile: u,
|
|
2325
2328
|
fetchUserProfile: o
|
|
2326
|
-
} = Ae(), h =
|
|
2329
|
+
} = Ae(), h = I("hidden"), g = I(!1);
|
|
2327
2330
|
let a;
|
|
2328
|
-
const s =
|
|
2329
|
-
var
|
|
2330
|
-
return ((y = (
|
|
2331
|
+
const s = w, d = R(() => {
|
|
2332
|
+
var b, y, v;
|
|
2333
|
+
return ((y = (b = u.value) == null ? void 0 : b.github) == null ? void 0 : y.avatar_url) || ((v = u.value) == null ? void 0 : v.avatar) || "";
|
|
2331
2334
|
}), {
|
|
2332
|
-
buildBindOauthRedirectUri:
|
|
2335
|
+
buildBindOauthRedirectUri: f
|
|
2333
2336
|
} = ke();
|
|
2334
|
-
function t(
|
|
2335
|
-
h.value =
|
|
2337
|
+
function t(b) {
|
|
2338
|
+
h.value = b;
|
|
2336
2339
|
}
|
|
2337
|
-
async function
|
|
2338
|
-
const
|
|
2339
|
-
if (!
|
|
2340
|
+
async function c() {
|
|
2341
|
+
const b = r.appId;
|
|
2342
|
+
if (!b) {
|
|
2340
2343
|
console.error("GitHub OAuth 失败: appId 未配置");
|
|
2341
2344
|
return;
|
|
2342
2345
|
}
|
|
2343
2346
|
const {
|
|
2344
2347
|
data: y,
|
|
2345
|
-
error:
|
|
2346
|
-
} = await
|
|
2347
|
-
appId:
|
|
2348
|
+
error: v
|
|
2349
|
+
} = await x().auth.oauth.github.login.get({
|
|
2350
|
+
appId: b,
|
|
2348
2351
|
mode: "bind",
|
|
2349
|
-
redirectUri:
|
|
2352
|
+
redirectUri: f()
|
|
2350
2353
|
});
|
|
2351
|
-
|
|
2354
|
+
v || !y || (g.value = !0, window.open(y.redirectUri, "_blank"));
|
|
2352
2355
|
}
|
|
2353
|
-
async function
|
|
2356
|
+
async function l() {
|
|
2354
2357
|
const {
|
|
2355
|
-
error:
|
|
2356
|
-
} = await
|
|
2358
|
+
error: b
|
|
2359
|
+
} = await x().auth.users.unbind.oauth.post({
|
|
2357
2360
|
provider: "github"
|
|
2358
2361
|
});
|
|
2359
|
-
|
|
2362
|
+
b || (le.success("解绑成功"), h.value = "hidden", o());
|
|
2360
2363
|
}
|
|
2361
|
-
function
|
|
2362
|
-
h.value === "bind" && (h.value = "hidden",
|
|
2364
|
+
function _() {
|
|
2365
|
+
h.value === "bind" && (h.value = "hidden", c()), h.value === "unbind" && l();
|
|
2363
2366
|
}
|
|
2364
|
-
function
|
|
2367
|
+
function m() {
|
|
2365
2368
|
g.value && o();
|
|
2366
2369
|
}
|
|
2367
|
-
return
|
|
2368
|
-
u.value || o(), a = setInterval(
|
|
2369
|
-
}),
|
|
2370
|
+
return M(() => {
|
|
2371
|
+
u.value || o(), a = setInterval(m, 1e3);
|
|
2372
|
+
}), de(() => {
|
|
2370
2373
|
a && clearInterval(a);
|
|
2371
|
-
}), (
|
|
2372
|
-
var
|
|
2373
|
-
return
|
|
2374
|
+
}), (b, y) => {
|
|
2375
|
+
var v, $, q;
|
|
2376
|
+
return n(), S(F, null, [!((v = e(u)) != null && v.github) && h.value === "hidden" ? (n(), z(e(ve), {
|
|
2374
2377
|
key: 0,
|
|
2375
2378
|
title: "绑定GitHub"
|
|
2376
2379
|
}, {
|
|
2377
|
-
action: p(() => [i(e(
|
|
2380
|
+
action: p(() => [i(e(O), {
|
|
2378
2381
|
size: s.size,
|
|
2379
2382
|
type: "primary",
|
|
2380
|
-
onClick: y[0] || (y[0] = (
|
|
2383
|
+
onClick: y[0] || (y[0] = (E) => t("bind"))
|
|
2381
2384
|
}, {
|
|
2382
|
-
default: p(() => [...y[2] || (y[2] = [
|
|
2385
|
+
default: p(() => [...y[2] || (y[2] = [T(" 绑定GitHub ", -1)])]),
|
|
2383
2386
|
_: 1
|
|
2384
2387
|
}, 8, ["size"])]),
|
|
2385
|
-
default: p(() => [y[3] || (y[3] =
|
|
2388
|
+
default: p(() => [y[3] || (y[3] = T(" 您还未绑定GitHub账号,请点击绑定。 ", -1))]),
|
|
2386
2389
|
_: 1
|
|
2387
|
-
})) :
|
|
2390
|
+
})) : A("", !0), ($ = e(u)) != null && $.github && h.value === "hidden" ? (n(), z(e(ve), {
|
|
2388
2391
|
key: 1,
|
|
2389
2392
|
title: "解绑GitHub"
|
|
2390
2393
|
}, {
|
|
2391
|
-
action: p(() => [i(e(
|
|
2394
|
+
action: p(() => [i(e(O), {
|
|
2392
2395
|
size: s.size,
|
|
2393
2396
|
type: "primary",
|
|
2394
|
-
onClick: y[1] || (y[1] = (
|
|
2397
|
+
onClick: y[1] || (y[1] = (E) => t("unbind"))
|
|
2395
2398
|
}, {
|
|
2396
|
-
default: p(() => [...y[5] || (y[5] = [
|
|
2399
|
+
default: p(() => [...y[5] || (y[5] = [T(" 解绑GitHub ", -1)])]),
|
|
2397
2400
|
_: 1
|
|
2398
2401
|
}, 8, ["size"])]),
|
|
2399
2402
|
default: p(() => {
|
|
2400
|
-
var
|
|
2401
|
-
return [
|
|
2403
|
+
var E, Y;
|
|
2404
|
+
return [k("div", Fs, [d.value ? (n(), z(e(ee), {
|
|
2402
2405
|
key: 0,
|
|
2403
2406
|
class: "oauth-binding-account__avatar",
|
|
2404
2407
|
"image-url": d.value,
|
|
2405
2408
|
size: 42
|
|
2406
|
-
}, null, 8, ["image-url"])) : (
|
|
2407
|
-
icon: e(
|
|
2408
|
-
size: e(
|
|
2409
|
+
}, null, 8, ["image-url"])) : (n(), S("div", Ms, [i(_e, {
|
|
2410
|
+
icon: e(K).github,
|
|
2411
|
+
size: e(Ne),
|
|
2409
2412
|
alt: "GitHub"
|
|
2410
|
-
}, null, 8, ["icon", "size"])])),
|
|
2413
|
+
}, null, 8, ["icon", "size"])])), k("div", Ds, [y[4] || (y[4] = k("div", {
|
|
2411
2414
|
class: "oauth-binding-account__provider"
|
|
2412
|
-
}, "GitHub", -1)),
|
|
2415
|
+
}, "GitHub", -1)), k("div", Es, B(((Y = (E = e(u)) == null ? void 0 : E.github) == null ? void 0 : Y.login) || "GitHub"), 1)])])];
|
|
2413
2416
|
}),
|
|
2414
2417
|
_: 1
|
|
2415
|
-
})) :
|
|
2418
|
+
})) : A("", !0), h.value === "bind" || h.value === "unbind" ? (n(), z(je, {
|
|
2416
2419
|
key: 2,
|
|
2417
2420
|
size: s.size,
|
|
2418
|
-
email: (
|
|
2419
|
-
onNext:
|
|
2420
|
-
}, null, 8, ["size", "email"])) :
|
|
2421
|
+
email: (q = e(u)) == null ? void 0 : q.email,
|
|
2422
|
+
onNext: _
|
|
2423
|
+
}, null, 8, ["size", "email"])) : A("", !0)], 64);
|
|
2421
2424
|
};
|
|
2422
2425
|
}
|
|
2423
|
-
}),
|
|
2426
|
+
}), bi = /* @__PURE__ */ U(Hs, [["__scopeId", "data-v-1cfa8892"]]), Gs = /* @__PURE__ */ C({
|
|
2424
2427
|
__name: "LegalDocViewer",
|
|
2425
2428
|
props: {
|
|
2426
2429
|
type: {},
|
|
2427
2430
|
appId: {}
|
|
2428
2431
|
},
|
|
2429
|
-
setup(
|
|
2430
|
-
const r =
|
|
2432
|
+
setup(w) {
|
|
2433
|
+
const r = w, u = R(() => We[r.type] ?? ""), o = I(!1), h = I(null);
|
|
2431
2434
|
async function g() {
|
|
2432
2435
|
if (!r.type || !r.appId) {
|
|
2433
2436
|
h.value = null;
|
|
2434
2437
|
return;
|
|
2435
2438
|
}
|
|
2436
2439
|
o.value = !0;
|
|
2437
|
-
const a = await
|
|
2440
|
+
const a = await Xe(r.appId);
|
|
2438
2441
|
if (o.value = !1, !a) {
|
|
2439
2442
|
h.value = null;
|
|
2440
2443
|
return;
|
|
2441
2444
|
}
|
|
2442
2445
|
const s = a[r.type];
|
|
2443
|
-
h.value =
|
|
2446
|
+
h.value = Ke(s) ? s : null;
|
|
2444
2447
|
}
|
|
2445
|
-
return
|
|
2448
|
+
return ne(() => [r.type, r.appId], () => {
|
|
2446
2449
|
g();
|
|
2447
2450
|
}, {
|
|
2448
2451
|
immediate: !0
|
|
2449
|
-
}), (a, s) => o.value ? (
|
|
2452
|
+
}), (a, s) => o.value ? (n(), z(e(Le), {
|
|
2450
2453
|
key: 0,
|
|
2451
2454
|
loading: o.value,
|
|
2452
2455
|
class: "legal-doc-viewer-loading"
|
|
2453
|
-
}, null, 8, ["loading"])) : h.value ? (
|
|
2456
|
+
}, null, 8, ["loading"])) : h.value ? (n(), z(e(Je), {
|
|
2454
2457
|
key: 2,
|
|
2455
2458
|
modelValue: h.value,
|
|
2456
2459
|
"onUpdate:modelValue": s[1] || (s[1] = (d) => h.value = d),
|
|
2457
2460
|
editable: !1
|
|
2458
2461
|
}, {
|
|
2459
|
-
title: p(() => [i(e(
|
|
2462
|
+
title: p(() => [i(e(Qe), {
|
|
2460
2463
|
modelValue: u.value,
|
|
2461
2464
|
"onUpdate:modelValue": s[0] || (s[0] = (d) => u.value = d),
|
|
2462
2465
|
editable: !1,
|
|
2463
2466
|
class: "legal-doc-viewer-title"
|
|
2464
2467
|
}, null, 8, ["modelValue"])]),
|
|
2465
2468
|
_: 1
|
|
2466
|
-
}, 8, ["modelValue"])) : (
|
|
2469
|
+
}, 8, ["modelValue"])) : (n(), z(e(Fe), {
|
|
2467
2470
|
key: 1,
|
|
2468
2471
|
description: "暂无内容"
|
|
2469
2472
|
}));
|
|
2470
2473
|
}
|
|
2471
|
-
}),
|
|
2474
|
+
}), wi = /* @__PURE__ */ U(Gs, [["__scopeId", "data-v-fe9a3621"]]);
|
|
2472
2475
|
export {
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2476
|
+
ys as A,
|
|
2477
|
+
Zt as E,
|
|
2478
|
+
wi as L,
|
|
2479
|
+
Z as O,
|
|
2480
|
+
Ct as P,
|
|
2481
|
+
wt as R,
|
|
2482
|
+
X as S,
|
|
2483
|
+
vi as _,
|
|
2484
|
+
gi as a,
|
|
2485
|
+
ws as b,
|
|
2483
2486
|
Pe as c,
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2487
|
+
hi as d,
|
|
2488
|
+
bi as e,
|
|
2489
|
+
Ss as f,
|
|
2490
|
+
yi as g,
|
|
2491
|
+
at as h,
|
|
2492
|
+
ut as i,
|
|
2493
|
+
mt as j,
|
|
2494
|
+
Kt as k,
|
|
2495
|
+
Ot as l,
|
|
2496
|
+
ps as m,
|
|
2497
|
+
os as n,
|
|
2498
|
+
fe as o,
|
|
2499
|
+
Gt as p
|
|
2497
2500
|
};
|