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