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