@huyooo/ui 0.5.60 → 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-DOJxOU01.js → AuthkitAuthModal-BfwODnpI.js} +470 -461
- package/dist/AuthkitSignInPhone-b7O8zxA8.js +931 -0
- package/dist/{UserAccountMenu-DgvdmbWH.js → UserAccountMenu-DqwouFOD.js} +1 -1
- package/dist/{WidthContainer-BoQWHreP.js → WidthContainer-CD44QZfP.js} +1 -1
- package/dist/api/Authkit/auth.d.ts +43 -0
- package/dist/api/Authkit/verify.d.ts +9 -0
- package/dist/authkit.d.ts +4 -0
- package/dist/authkit.js +32 -28
- 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 +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/index.js +152 -148
- package/dist/style.css +1 -1
- package/dist/user.js +1 -1
- package/package.json +1 -1
- package/dist/AuthkitOauthCallback-BnHgrReE.js +0 -330
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/* empty css */
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
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
|
|
5
|
-
import { Form as H, FormItem as I, Avatar 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
9
|
import { u as qe } from "./useUploadCos-_xwV40NS.js";
|
|
10
|
-
import { b as
|
|
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
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
13
|
import { M as He } from "./Menu-BjWB9hre.js";
|
|
@@ -28,30 +28,30 @@ const je = A({
|
|
|
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 = Ne("icon"),
|
|
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
|
-
cls:
|
|
54
|
+
cls: a,
|
|
55
55
|
innerStyle: o,
|
|
56
56
|
onClick: (t) => {
|
|
57
57
|
r("click", t);
|
|
@@ -59,28 +59,28 @@ const je = A({
|
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
61
|
}), We = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
|
|
62
|
-
function Ke(
|
|
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: ze(
|
|
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
76
|
}, null, -1)]), 14, We);
|
|
77
77
|
}
|
|
78
78
|
var te = /* @__PURE__ */ De(je, [["render", Ke]]);
|
|
79
79
|
const Ze = Object.assign(te, {
|
|
80
|
-
install: (
|
|
80
|
+
install: (l, r) => {
|
|
81
81
|
var u;
|
|
82
|
-
const
|
|
83
|
-
|
|
82
|
+
const a = (u = r == null ? void 0 : r.iconPrefix) != null ? u : "";
|
|
83
|
+
l.component(a + te.name, te);
|
|
84
84
|
}
|
|
85
85
|
}), Je = {
|
|
86
86
|
class: "handle"
|
|
@@ -93,29 +93,29 @@ const Ze = 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,
|
|
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 Ze = 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,7 +135,7 @@ const Ze = Object.assign(te, {
|
|
|
135
135
|
y();
|
|
136
136
|
const p = () => {
|
|
137
137
|
const {
|
|
138
|
-
uploadFile:
|
|
138
|
+
uploadFile: m
|
|
139
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 $;
|
|
@@ -143,10 +143,10 @@ const Ze = Object.assign(te, {
|
|
|
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 Ze = 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
|
-
size:
|
|
179
|
+
size: a.size
|
|
180
180
|
}, {
|
|
181
|
-
default:
|
|
181
|
+
default: n(() => [i(e(I), {
|
|
182
182
|
field: "avatar",
|
|
183
183
|
label: "头像",
|
|
184
184
|
rules: [{
|
|
@@ -186,7 +186,7 @@ const Ze = Object.assign(te, {
|
|
|
186
186
|
message: "请上传头像"
|
|
187
187
|
}]
|
|
188
188
|
}, {
|
|
189
|
-
default:
|
|
189
|
+
default: n(() => [i(e(me), {
|
|
190
190
|
"image-url": o.value.avatarUrl,
|
|
191
191
|
size: 42,
|
|
192
192
|
"object-fit": "cover",
|
|
@@ -195,7 +195,7 @@ const Ze = Object.assign(te, {
|
|
|
195
195
|
},
|
|
196
196
|
onClick: p
|
|
197
197
|
}, {
|
|
198
|
-
"trigger-icon":
|
|
198
|
+
"trigger-icon": n(() => [i(e(Ze))]),
|
|
199
199
|
_: 1
|
|
200
200
|
}, 8, ["image-url"])]),
|
|
201
201
|
_: 1
|
|
@@ -207,7 +207,7 @@ const Ze = Object.assign(te, {
|
|
|
207
207
|
message: "请输入昵称"
|
|
208
208
|
}]
|
|
209
209
|
}, {
|
|
210
|
-
default:
|
|
210
|
+
default: n(() => [i(e(q), {
|
|
211
211
|
modelValue: o.value.nickname,
|
|
212
212
|
"onUpdate:modelValue": f[0] || (f[0] = (v) => o.value.nickname = v),
|
|
213
213
|
placeholder: "请输入昵称"
|
|
@@ -221,7 +221,7 @@ const Ze = Object.assign(te, {
|
|
|
221
221
|
message: "请输入描述"
|
|
222
222
|
}]
|
|
223
223
|
}, {
|
|
224
|
-
default:
|
|
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: "请输入描述",
|
|
@@ -236,12 +236,12 @@ const Ze = Object.assign(te, {
|
|
|
236
236
|
label: "",
|
|
237
237
|
rules: []
|
|
238
238
|
}, {
|
|
239
|
-
default:
|
|
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
|
-
default:
|
|
244
|
+
default: n(() => [...f[2] || (f[2] = [_(" 提交 ", -1)])]),
|
|
245
245
|
_: 1
|
|
246
246
|
}, 8, ["loading"])])]),
|
|
247
247
|
_: 1
|
|
@@ -250,25 +250,32 @@ const Ze = Object.assign(te, {
|
|
|
250
250
|
}, 8, ["model", "size"]));
|
|
251
251
|
}
|
|
252
252
|
}), Xe = /* @__PURE__ */ C(Qe, [["__scopeId", "data-v-c241b7f8"]]);
|
|
253
|
-
function Ye(
|
|
254
|
-
return
|
|
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 et(
|
|
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
281
|
const tt = /* @__PURE__ */ A({
|
|
@@ -285,20 +292,20 @@ const tt = /* @__PURE__ */ A({
|
|
|
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
|
|
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
|
|
298
|
-
|
|
304
|
+
function m() {
|
|
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,17 +316,17 @@ const tt = /* @__PURE__ */ A({
|
|
|
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:
|
|
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
|
-
}),
|
|
329
|
+
}), ne = /* @__PURE__ */ C(tt, [["__scopeId", "data-v-2883dc6d"]]), it = {
|
|
323
330
|
class: "sendVerifyCodeItem"
|
|
324
331
|
}, lt = {
|
|
325
332
|
class: "handle"
|
|
@@ -337,37 +344,37 @@ const tt = /* @__PURE__ */ A({
|
|
|
337
344
|
}
|
|
338
345
|
},
|
|
339
346
|
emits: ["next"],
|
|
340
|
-
setup(
|
|
347
|
+
setup(l, {
|
|
341
348
|
emit: r
|
|
342
349
|
}) {
|
|
343
|
-
const u = r,
|
|
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
|
});
|
|
347
354
|
async function p() {
|
|
348
355
|
t.value = !0, X({
|
|
349
|
-
email:
|
|
356
|
+
email: a.email
|
|
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
|
-
email:
|
|
364
|
-
userToken:
|
|
365
|
-
emailVerifyId:
|
|
370
|
+
email: a.email,
|
|
371
|
+
userToken: c.value.userToken,
|
|
372
|
+
emailVerifyId: c.value.emailVerifyId
|
|
366
373
|
};
|
|
367
374
|
Ye(v).then(() => {
|
|
368
|
-
|
|
375
|
+
s.value = !1, u("next");
|
|
369
376
|
}).catch(() => {
|
|
370
|
-
|
|
377
|
+
s.value = !1;
|
|
371
378
|
});
|
|
372
379
|
}
|
|
373
380
|
});
|
|
@@ -375,11 +382,11 @@ const tt = /* @__PURE__ */ A({
|
|
|
375
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
|
-
size:
|
|
387
|
+
size: a.size
|
|
381
388
|
}, {
|
|
382
|
-
default:
|
|
389
|
+
default: n(() => [i(e(I), {
|
|
383
390
|
field: "email",
|
|
384
391
|
label: "邮箱",
|
|
385
392
|
rules: [{
|
|
@@ -390,7 +397,7 @@ const tt = /* @__PURE__ */ A({
|
|
|
390
397
|
message: "请输入有效的邮箱"
|
|
391
398
|
}]
|
|
392
399
|
}, {
|
|
393
|
-
default:
|
|
400
|
+
default: n(() => [_(T(o.value), 1)]),
|
|
394
401
|
_: 1
|
|
395
402
|
}), i(e(I), {
|
|
396
403
|
field: "userToken",
|
|
@@ -401,14 +408,14 @@ const tt = /* @__PURE__ */ A({
|
|
|
401
408
|
message: "请输入验证码"
|
|
402
409
|
}]
|
|
403
410
|
}, {
|
|
404
|
-
default:
|
|
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
|
-
}, null, 8, ["modelValue"]), i(
|
|
415
|
+
}, null, 8, ["modelValue"]), i(ne, {
|
|
409
416
|
ref_key: "SendVerifyCodeRef",
|
|
410
417
|
ref: d,
|
|
411
|
-
size:
|
|
418
|
+
size: a.size,
|
|
412
419
|
loading: t.value,
|
|
413
420
|
style: {
|
|
414
421
|
"margin-left": "10px"
|
|
@@ -421,12 +428,12 @@ const tt = /* @__PURE__ */ A({
|
|
|
421
428
|
label: "",
|
|
422
429
|
rules: []
|
|
423
430
|
}, {
|
|
424
|
-
default:
|
|
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
|
-
default:
|
|
436
|
+
default: n(() => [...v[1] || (v[1] = [_(" 提交 ", -1)])]),
|
|
430
437
|
_: 1
|
|
431
438
|
}, 8, ["loading"])])]),
|
|
432
439
|
_: 1
|
|
@@ -434,9 +441,9 @@ const tt = /* @__PURE__ */ A({
|
|
|
434
441
|
_: 1
|
|
435
442
|
}, 8, ["model", "size"]));
|
|
436
443
|
}
|
|
437
|
-
}),
|
|
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 tt = /* @__PURE__ */ A({
|
|
|
445
452
|
}
|
|
446
453
|
},
|
|
447
454
|
emits: ["submit"],
|
|
448
|
-
setup(
|
|
455
|
+
setup(l, {
|
|
449
456
|
emit: r
|
|
450
457
|
}) {
|
|
451
|
-
const u = r,
|
|
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
|
-
|
|
463
|
-
|
|
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:
|
|
484
|
+
default: n(() => [i(e(I), {
|
|
478
485
|
field: "oldPassword",
|
|
479
486
|
label: "当前密码",
|
|
480
487
|
"hide-label": "",
|
|
@@ -483,9 +490,9 @@ const tt = /* @__PURE__ */ A({
|
|
|
483
490
|
message: "请输入当前密码"
|
|
484
491
|
}]
|
|
485
492
|
}, {
|
|
486
|
-
default:
|
|
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"])]),
|
|
@@ -502,9 +509,9 @@ const tt = /* @__PURE__ */ A({
|
|
|
502
509
|
message: "新密码不能少于10字符"
|
|
503
510
|
}]
|
|
504
511
|
}, {
|
|
505
|
-
default:
|
|
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"])]),
|
|
@@ -520,14 +527,14 @@ const tt = /* @__PURE__ */ A({
|
|
|
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
|
-
default:
|
|
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"])]),
|
|
@@ -537,12 +544,12 @@ const tt = /* @__PURE__ */ A({
|
|
|
537
544
|
label: "",
|
|
538
545
|
rules: []
|
|
539
546
|
}, {
|
|
540
|
-
default:
|
|
547
|
+
default: n(() => [z("div", nt, [i(e(P), {
|
|
541
548
|
type: "primary",
|
|
542
|
-
loading:
|
|
543
|
-
onClick:
|
|
549
|
+
loading: a.value,
|
|
550
|
+
onClick: s
|
|
544
551
|
}, {
|
|
545
|
-
default:
|
|
552
|
+
default: n(() => [...c[3] || (c[3] = [_(" 提交 ", -1)])]),
|
|
546
553
|
_: 1
|
|
547
554
|
}, 8, ["loading"])])]),
|
|
548
555
|
_: 1
|
|
@@ -550,7 +557,7 @@ const tt = /* @__PURE__ */ A({
|
|
|
550
557
|
_: 1
|
|
551
558
|
}, 8, ["model", "size"]));
|
|
552
559
|
}
|
|
553
|
-
}), ot = /* @__PURE__ */ C(
|
|
560
|
+
}), ot = /* @__PURE__ */ C(at, [["__scopeId", "data-v-a9e25b03"]]), rt = /* @__PURE__ */ A({
|
|
554
561
|
__name: "AuthkitSetPassword",
|
|
555
562
|
props: {
|
|
556
563
|
size: {
|
|
@@ -558,64 +565,64 @@ const tt = /* @__PURE__ */ A({
|
|
|
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
|
-
fetchUserProfile:
|
|
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
|
-
N.success("密码修改成功"), d.value = "hidden",
|
|
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
|
-
o.value && !r.value &&
|
|
579
|
-
}), (p,
|
|
585
|
+
o.value && !r.value && a();
|
|
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
|
-
action:
|
|
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:
|
|
597
|
+
default: n(() => [...m[2] || (m[2] = [_(" 去绑定邮箱 ", -1)])]),
|
|
591
598
|
_: 1
|
|
592
599
|
}, 8, ["size"])]),
|
|
593
|
-
default:
|
|
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,
|
|
597
604
|
title: "更改密码"
|
|
598
605
|
}, {
|
|
599
|
-
action:
|
|
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:
|
|
611
|
+
default: n(() => [...m[4] || (m[4] = [_("更改密码", -1)])]),
|
|
605
612
|
_: 1
|
|
606
613
|
}, 8, ["size"])]),
|
|
607
|
-
default:
|
|
614
|
+
default: n(() => [m[5] || (m[5] = _(" 为了账户安全修改密码前会先验证身份 ", -1))]),
|
|
608
615
|
_: 1
|
|
609
616
|
})) : S("", !0), d.value === "update" ? (g(), k(ot, {
|
|
610
617
|
key: 2,
|
|
611
618
|
size: t.size,
|
|
612
619
|
loading: e(u),
|
|
613
620
|
onSubmit: y
|
|
614
|
-
}, null, 8, ["size", "loading"])) : S("", !0), d.value === "verify" ? (g(), k(
|
|
621
|
+
}, null, 8, ["size", "loading"])) : S("", !0), d.value === "verify" ? (g(), k(ae, {
|
|
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
|
}
|
|
@@ -623,9 +630,9 @@ const tt = /* @__PURE__ */ A({
|
|
|
623
630
|
class: "content"
|
|
624
631
|
}, dt = {
|
|
625
632
|
class: "sendVerifyCodeItem"
|
|
626
|
-
},
|
|
633
|
+
}, mt = {
|
|
627
634
|
class: "handle"
|
|
628
|
-
},
|
|
635
|
+
}, ct = /* @__PURE__ */ A({
|
|
629
636
|
__name: "AuthkitEmailUpdate",
|
|
630
637
|
props: {
|
|
631
638
|
size: {
|
|
@@ -639,10 +646,10 @@ const tt = /* @__PURE__ */ A({
|
|
|
639
646
|
}
|
|
640
647
|
},
|
|
641
648
|
emits: ["submit"],
|
|
642
|
-
setup(
|
|
649
|
+
setup(l, {
|
|
643
650
|
emit: r
|
|
644
651
|
}) {
|
|
645
|
-
const u = r,
|
|
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 tt = /* @__PURE__ */ A({
|
|
|
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:
|
|
675
|
-
size:
|
|
681
|
+
model: s.value,
|
|
682
|
+
size: a.size,
|
|
676
683
|
"auto-label-width": ""
|
|
677
684
|
}, {
|
|
678
|
-
default:
|
|
685
|
+
default: n(() => [i(e(I), {
|
|
679
686
|
field: "email",
|
|
680
687
|
label: "邮箱",
|
|
681
688
|
"hide-label": "",
|
|
@@ -687,9 +694,9 @@ const tt = /* @__PURE__ */ A({
|
|
|
687
694
|
message: "请输入有效的邮箱"
|
|
688
695
|
}]
|
|
689
696
|
}, {
|
|
690
|
-
default:
|
|
691
|
-
modelValue:
|
|
692
|
-
"onUpdate:modelValue":
|
|
697
|
+
default: n(() => [i(e(q), {
|
|
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"
|
|
@@ -704,15 +711,15 @@ const tt = /* @__PURE__ */ A({
|
|
|
704
711
|
message: "请输入验证码"
|
|
705
712
|
}]
|
|
706
713
|
}, {
|
|
707
|
-
default:
|
|
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
|
-
}, null, 8, ["modelValue"]), i(
|
|
719
|
+
}, null, 8, ["modelValue"]), i(ne, {
|
|
713
720
|
ref_key: "SendVerifyCodeRef",
|
|
714
721
|
ref: o,
|
|
715
|
-
size:
|
|
722
|
+
size: a.size,
|
|
716
723
|
loading: d.value,
|
|
717
724
|
style: {
|
|
718
725
|
"margin-left": "10px"
|
|
@@ -732,9 +739,9 @@ const tt = /* @__PURE__ */ A({
|
|
|
732
739
|
message: "密码不能少于10字符"
|
|
733
740
|
}]
|
|
734
741
|
}, {
|
|
735
|
-
default:
|
|
736
|
-
modelValue:
|
|
737
|
-
"onUpdate:modelValue":
|
|
742
|
+
default: n(() => [i(e(q), {
|
|
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"
|
|
@@ -752,13 +759,13 @@ const tt = /* @__PURE__ */ A({
|
|
|
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
|
-
default:
|
|
760
|
-
modelValue:
|
|
761
|
-
"onUpdate:modelValue":
|
|
766
|
+
default: n(() => [i(e(q), {
|
|
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"
|
|
@@ -773,27 +780,27 @@ const tt = /* @__PURE__ */ A({
|
|
|
773
780
|
message: "请输入邀请人ID"
|
|
774
781
|
}]
|
|
775
782
|
}, {
|
|
776
|
-
default:
|
|
777
|
-
modelValue:
|
|
778
|
-
"onUpdate:modelValue":
|
|
783
|
+
default: n(() => [i(e(q), {
|
|
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
|
-
loading:
|
|
792
|
+
loading: a.loading,
|
|
786
793
|
long: "",
|
|
787
|
-
size:
|
|
788
|
-
onClick:
|
|
794
|
+
size: a.size,
|
|
795
|
+
onClick: c
|
|
789
796
|
}, {
|
|
790
|
-
default:
|
|
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(
|
|
803
|
+
}), pe = /* @__PURE__ */ C(ct, [["__scopeId", "data-v-5b701953"]]), ft = /* @__PURE__ */ A({
|
|
797
804
|
__name: "AuthkitEmailBinding",
|
|
798
805
|
props: {
|
|
799
806
|
size: {
|
|
@@ -801,24 +808,24 @@ const tt = /* @__PURE__ */ A({
|
|
|
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
|
-
fetchUserProfile:
|
|
809
|
-
} = J(), o = w("hidden"), d =
|
|
810
|
-
function t(
|
|
811
|
-
o.value =
|
|
815
|
+
fetchUserProfile: a
|
|
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
|
-
u.value = !1, N.success("绑定成功"), o.value = "hidden",
|
|
828
|
+
u.value = !1, N.success("绑定成功"), o.value = "hidden", a();
|
|
822
829
|
}).catch(() => {
|
|
823
830
|
u.value = !1;
|
|
824
831
|
});
|
|
@@ -827,46 +834,46 @@ const tt = /* @__PURE__ */ A({
|
|
|
827
834
|
o.value = "update";
|
|
828
835
|
}
|
|
829
836
|
return Z(() => {
|
|
830
|
-
r.value ||
|
|
831
|
-
}), (
|
|
832
|
-
var
|
|
833
|
-
return g(), V(
|
|
837
|
+
r.value || a();
|
|
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
|
}, {
|
|
837
|
-
action:
|
|
844
|
+
action: n(() => [i(e(P), {
|
|
838
845
|
size: d.size,
|
|
839
846
|
type: "primary",
|
|
840
847
|
onClick: p[0] || (p[0] = (b) => t("update"))
|
|
841
848
|
}, {
|
|
842
|
-
default:
|
|
849
|
+
default: n(() => [...p[2] || (p[2] = [_(" 绑定邮箱 ", -1)])]),
|
|
843
850
|
_: 1
|
|
844
851
|
}, 8, ["size"])]),
|
|
845
|
-
default:
|
|
852
|
+
default: n(() => [p[3] || (p[3] = _(" 您还未绑定邮箱,请点击绑定邮箱 ", -1))]),
|
|
846
853
|
_: 1
|
|
847
854
|
})) : S("", !0), (f = e(r)) != null && f.email && o.value === "hidden" ? (g(), k(e(D), {
|
|
848
855
|
key: 1,
|
|
849
856
|
title: "更改邮箱"
|
|
850
857
|
}, {
|
|
851
|
-
action:
|
|
858
|
+
action: n(() => [i(e(P), {
|
|
852
859
|
size: d.size,
|
|
853
860
|
type: "primary",
|
|
854
861
|
onClick: p[1] || (p[1] = (b) => t("verify"))
|
|
855
862
|
}, {
|
|
856
|
-
default:
|
|
863
|
+
default: n(() => [...p[4] || (p[4] = [_(" 更改邮箱 ", -1)])]),
|
|
857
864
|
_: 1
|
|
858
865
|
}, 8, ["size"])]),
|
|
859
|
-
default:
|
|
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:
|
|
869
|
-
}, null, 8, ["loading", "size"])) : S("", !0), o.value === "verify" ? (g(), k(
|
|
875
|
+
onSubmit: s
|
|
876
|
+
}, null, 8, ["loading", "size"])) : S("", !0), o.value === "verify" ? (g(), k(ae, {
|
|
870
877
|
key: 3,
|
|
871
878
|
size: d.size,
|
|
872
879
|
email: (v = e(r)) == null ? void 0 : v.email,
|
|
@@ -875,25 +882,25 @@ const tt = /* @__PURE__ */ A({
|
|
|
875
882
|
};
|
|
876
883
|
}
|
|
877
884
|
}), pt = /* @__PURE__ */ C(ft, [["__scopeId", "data-v-b2663ea1"]]);
|
|
878
|
-
function ve(
|
|
879
|
-
return
|
|
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 vt(
|
|
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 gt(
|
|
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
906
|
const yt = /* @__PURE__ */ A({
|
|
@@ -904,15 +911,15 @@ const yt = /* @__PURE__ */ A({
|
|
|
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
|
-
} = J(),
|
|
918
|
+
} = J(), a = w("hidden"), o = w(!1);
|
|
912
919
|
let d;
|
|
913
|
-
const t =
|
|
914
|
-
function
|
|
915
|
-
|
|
920
|
+
const t = l;
|
|
921
|
+
function s(f) {
|
|
922
|
+
a.value = f;
|
|
916
923
|
}
|
|
917
924
|
function y() {
|
|
918
925
|
const f = E.appId;
|
|
@@ -931,58 +938,58 @@ const yt = /* @__PURE__ */ A({
|
|
|
931
938
|
o.value = !0, window.open(b, "_blank");
|
|
932
939
|
});
|
|
933
940
|
}
|
|
934
|
-
function
|
|
941
|
+
function c() {
|
|
935
942
|
Be().then(() => {
|
|
936
|
-
N.success("解绑成功"),
|
|
943
|
+
N.success("解绑成功"), a.value = "hidden", u();
|
|
937
944
|
});
|
|
938
945
|
}
|
|
939
946
|
function p() {
|
|
940
|
-
|
|
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
|
-
action:
|
|
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
|
-
default:
|
|
967
|
+
default: n(() => [...v[2] || (v[2] = [_(" 绑定GitHUb ", -1)])]),
|
|
961
968
|
_: 1
|
|
962
969
|
}, 8, ["size"])]),
|
|
963
|
-
default:
|
|
970
|
+
default: n(() => [v[3] || (v[3] = _(" 请尚未绑定GitHub,请点击绑定GitHUb ", -1))]),
|
|
964
971
|
_: 1
|
|
965
|
-
})) : S("", !0), (U = e(r)) != null && U.github &&
|
|
972
|
+
})) : S("", !0), (U = e(r)) != null && U.github && a.value === "hidden" ? (g(), k(e(D), {
|
|
966
973
|
key: 1,
|
|
967
974
|
title: "解绑GitHub"
|
|
968
975
|
}, {
|
|
969
|
-
action:
|
|
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
|
-
default:
|
|
981
|
+
default: n(() => [...v[4] || (v[4] = [_(" 解绑GitHUb ", -1)])]),
|
|
975
982
|
_: 1
|
|
976
983
|
}, 8, ["size"])]),
|
|
977
|
-
default:
|
|
978
|
-
var
|
|
979
|
-
return [z("span", null,
|
|
984
|
+
default: n(() => {
|
|
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"])];
|
|
983
990
|
}),
|
|
984
991
|
_: 1
|
|
985
|
-
})) : S("", !0),
|
|
992
|
+
})) : S("", !0), a.value === "bind" || a.value === "unbind" ? (g(), k(ae, {
|
|
986
993
|
key: 2,
|
|
987
994
|
size: t.size,
|
|
988
995
|
email: ($ = e(r)) == null ? void 0 : $.email,
|
|
@@ -1007,15 +1014,15 @@ const yt = /* @__PURE__ */ A({
|
|
|
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 yt = /* @__PURE__ */ A({
|
|
|
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
|
}
|
|
@@ -1040,13 +1047,13 @@ const yt = /* @__PURE__ */ A({
|
|
|
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,7 +1072,7 @@ const yt = /* @__PURE__ */ A({
|
|
|
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 {
|
|
@@ -1080,69 +1087,69 @@ const yt = /* @__PURE__ */ A({
|
|
|
1080
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
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
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: "注销账号"
|
|
1105
1112
|
}, {
|
|
1106
|
-
action:
|
|
1113
|
+
action: n(() => [i(e(P), {
|
|
1107
1114
|
size: u.size,
|
|
1108
1115
|
type: "primary",
|
|
1109
1116
|
status: "danger",
|
|
1110
1117
|
loading: y.value,
|
|
1111
1118
|
onClick: O
|
|
1112
1119
|
}, {
|
|
1113
|
-
default:
|
|
1120
|
+
default: n(() => [_(T(y.value ? "检查中..." : "开始注销"), 1)]),
|
|
1114
1121
|
_: 1
|
|
1115
1122
|
}, 8, ["size", "loading"])]),
|
|
1116
|
-
default:
|
|
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",
|
|
1122
1129
|
title: "无法注销账号"
|
|
1123
1130
|
}, {
|
|
1124
|
-
default:
|
|
1131
|
+
default: n(() => [...h[7] || (h[7] = [_(" 您的账号下还有以下资源,请先处理后再注销: ", -1)])]),
|
|
1125
1132
|
_: 1
|
|
1126
|
-
}), z("div", ht, [(g(!0), V(
|
|
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", wt,
|
|
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
|
-
default:
|
|
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: "身份验证"
|
|
1139
1146
|
}, {
|
|
1140
|
-
action:
|
|
1141
|
-
default:
|
|
1147
|
+
action: n(() => [i(e(ee), null, {
|
|
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
|
-
default:
|
|
1152
|
+
default: n(() => [...h[9] || (h[9] = [_("取消", -1)])]),
|
|
1146
1153
|
_: 1
|
|
1147
1154
|
}, 8, ["size"]), i(e(P), {
|
|
1148
1155
|
size: u.size,
|
|
@@ -1150,20 +1157,20 @@ const yt = /* @__PURE__ */ A({
|
|
|
1150
1157
|
loading: p.value,
|
|
1151
1158
|
onClick: W
|
|
1152
1159
|
}, {
|
|
1153
|
-
default:
|
|
1160
|
+
default: n(() => [_(T(p.value ? "发送中..." : "发送验证码"), 1)]),
|
|
1154
1161
|
_: 1
|
|
1155
1162
|
}, 8, ["size", "loading"])]),
|
|
1156
1163
|
_: 1
|
|
1157
1164
|
})]),
|
|
1158
|
-
default:
|
|
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:
|
|
1173
|
+
default: n(() => [_(" 验证码已发送至 " + T(b.value) + ",此操作不可逆,请谨慎操作 ", 1)]),
|
|
1167
1174
|
_: 1
|
|
1168
1175
|
}), i(e(H), {
|
|
1169
1176
|
ref_key: "formRef",
|
|
@@ -1173,7 +1180,7 @@ const yt = /* @__PURE__ */ A({
|
|
|
1173
1180
|
class: "confirm-form",
|
|
1174
1181
|
layout: "vertical"
|
|
1175
1182
|
}, {
|
|
1176
|
-
default:
|
|
1183
|
+
default: n(() => [i(e(I), {
|
|
1177
1184
|
field: "userToken",
|
|
1178
1185
|
label: "邮箱验证码",
|
|
1179
1186
|
rules: [{
|
|
@@ -1181,8 +1188,8 @@ const yt = /* @__PURE__ */ A({
|
|
|
1181
1188
|
message: "请输入验证码"
|
|
1182
1189
|
}]
|
|
1183
1190
|
}, {
|
|
1184
|
-
default:
|
|
1185
|
-
default:
|
|
1191
|
+
default: n(() => [i(e(ee), null, {
|
|
1192
|
+
default: n(() => [i(e(q), {
|
|
1186
1193
|
modelValue: $.value.userToken,
|
|
1187
1194
|
"onUpdate:modelValue": h[2] || (h[2] = (x) => $.value.userToken = x),
|
|
1188
1195
|
placeholder: "请输入6位验证码",
|
|
@@ -1196,7 +1203,7 @@ const yt = /* @__PURE__ */ A({
|
|
|
1196
1203
|
loading: p.value,
|
|
1197
1204
|
onClick: W
|
|
1198
1205
|
}, {
|
|
1199
|
-
default:
|
|
1206
|
+
default: n(() => [_(T(f.value > 0 ? `${f.value}s 后重发` : "重新发送"), 1)]),
|
|
1200
1207
|
_: 1
|
|
1201
1208
|
}, 8, ["disabled", "loading"])]),
|
|
1202
1209
|
_: 1
|
|
@@ -1210,7 +1217,7 @@ const yt = /* @__PURE__ */ A({
|
|
|
1210
1217
|
message: "请输入密码"
|
|
1211
1218
|
}]
|
|
1212
1219
|
}, {
|
|
1213
|
-
default:
|
|
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: "请输入您的登录密码",
|
|
@@ -1227,7 +1234,7 @@ const yt = /* @__PURE__ */ A({
|
|
|
1227
1234
|
validator: B
|
|
1228
1235
|
}]
|
|
1229
1236
|
}, {
|
|
1230
|
-
default:
|
|
1237
|
+
default: n(() => [i(e(q), {
|
|
1231
1238
|
modelValue: $.value.confirmText,
|
|
1232
1239
|
"onUpdate:modelValue": h[4] || (h[4] = (x) => $.value.confirmText = x),
|
|
1233
1240
|
placeholder: "注销",
|
|
@@ -1235,19 +1242,19 @@ const yt = /* @__PURE__ */ A({
|
|
|
1235
1242
|
}, null, 8, ["modelValue"])]),
|
|
1236
1243
|
_: 1
|
|
1237
1244
|
}, 8, ["rules"]), i(e(I), null, {
|
|
1238
|
-
default:
|
|
1239
|
-
default:
|
|
1240
|
-
onClick: h[5] || (h[5] = (x) =>
|
|
1245
|
+
default: n(() => [i(e(ee), null, {
|
|
1246
|
+
default: n(() => [i(e(P), {
|
|
1247
|
+
onClick: h[5] || (h[5] = (x) => s.value = "check")
|
|
1241
1248
|
}, {
|
|
1242
|
-
default:
|
|
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:
|
|
1254
|
+
loading: R.value,
|
|
1248
1255
|
onClick: be
|
|
1249
1256
|
}, {
|
|
1250
|
-
default:
|
|
1257
|
+
default: n(() => [_(T(R.value ? "注销中..." : "确认注销"), 1)]),
|
|
1251
1258
|
_: 1
|
|
1252
1259
|
}, 8, ["loading"])]),
|
|
1253
1260
|
_: 1
|
|
@@ -1255,17 +1262,17 @@ const yt = /* @__PURE__ */ A({
|
|
|
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: "账号已注销"
|
|
1262
1269
|
}, {
|
|
1263
|
-
subtitle:
|
|
1264
|
-
extra:
|
|
1270
|
+
subtitle: n(() => [...h[11] || (h[11] = [_(" 您的账号已成功注销,感谢您的使用 ", -1)])]),
|
|
1271
|
+
extra: n(() => [i(e(P), {
|
|
1265
1272
|
type: "primary",
|
|
1266
1273
|
onClick: ke
|
|
1267
1274
|
}, {
|
|
1268
|
-
default:
|
|
1275
|
+
default: n(() => [...h[12] || (h[12] = [_("返回首页", -1)])]),
|
|
1269
1276
|
_: 1
|
|
1270
1277
|
})]),
|
|
1271
1278
|
_: 1
|
|
@@ -1280,18 +1287,18 @@ const yt = /* @__PURE__ */ A({
|
|
|
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
|
}) {
|
|
1287
|
-
const
|
|
1294
|
+
const a = u;
|
|
1288
1295
|
function o() {
|
|
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 yt = /* @__PURE__ */ A({
|
|
|
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
|
-
} = Me(
|
|
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,
|
|
@@ -1367,25 +1374,25 @@ const yt = /* @__PURE__ */ A({
|
|
|
1367
1374
|
width: "700px",
|
|
1368
1375
|
onCancel: o
|
|
1369
1376
|
}, {
|
|
1370
|
-
title:
|
|
1371
|
-
default:
|
|
1372
|
-
"selected-keys":
|
|
1373
|
-
"onUpdate:selectedKeys": b[0] || (b[0] = (U) =>
|
|
1377
|
+
title: n(() => [...b[2] || (b[2] = [_(" 系统设置 ", -1)])]),
|
|
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,24 +1400,24 @@ const yt = /* @__PURE__ */ A({
|
|
|
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
1407
|
function Vt() {
|
|
1401
|
-
const
|
|
1402
|
-
|
|
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
|
-
const
|
|
1417
|
+
const a = ge(), o = {
|
|
1411
1418
|
appId: u,
|
|
1412
1419
|
referrerId: r == null ? void 0 : r.referrerId,
|
|
1413
|
-
redirectUri:
|
|
1420
|
+
redirectUri: a
|
|
1414
1421
|
};
|
|
1415
1422
|
Vt();
|
|
1416
1423
|
const d = {
|
|
@@ -1421,25 +1428,25 @@ async function Y(s, r) {
|
|
|
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 Ut(
|
|
1437
|
+
function Ut(l) {
|
|
1431
1438
|
Y("github", {
|
|
1432
|
-
referrerId:
|
|
1439
|
+
referrerId: l
|
|
1433
1440
|
});
|
|
1434
1441
|
}
|
|
1435
|
-
function $t(
|
|
1442
|
+
function $t(l) {
|
|
1436
1443
|
Y("google", {
|
|
1437
|
-
referrerId:
|
|
1444
|
+
referrerId: l
|
|
1438
1445
|
});
|
|
1439
1446
|
}
|
|
1440
|
-
function Ct(
|
|
1447
|
+
function Ct(l) {
|
|
1441
1448
|
Y("microsoft", {
|
|
1442
|
-
referrerId:
|
|
1449
|
+
referrerId: l
|
|
1443
1450
|
});
|
|
1444
1451
|
}
|
|
1445
1452
|
function ye() {
|
|
@@ -1451,7 +1458,7 @@ function ye() {
|
|
|
1451
1458
|
getOauthCallbackUrl: ge
|
|
1452
1459
|
};
|
|
1453
1460
|
}
|
|
1454
|
-
const
|
|
1461
|
+
const Ri = ye, ie = /* @__PURE__ */ A({
|
|
1455
1462
|
__name: "AuthkitOauthItem",
|
|
1456
1463
|
props: {
|
|
1457
1464
|
size: {
|
|
@@ -1470,19 +1477,19 @@ const qi = ye, ie = /* @__PURE__ */ A({
|
|
|
1470
1477
|
}
|
|
1471
1478
|
},
|
|
1472
1479
|
emits: [],
|
|
1473
|
-
setup(
|
|
1480
|
+
setup(l, {
|
|
1474
1481
|
emit: r
|
|
1475
1482
|
}) {
|
|
1476
|
-
const u =
|
|
1477
|
-
return (
|
|
1483
|
+
const u = l;
|
|
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:
|
|
1489
|
+
icon: n(() => [i(e(Ge), {
|
|
1483
1490
|
icon: u.icon
|
|
1484
1491
|
}, null, 8, ["icon"])]),
|
|
1485
|
-
default:
|
|
1492
|
+
default: n(() => [z("span", null, T(u.label), 1)]),
|
|
1486
1493
|
_: 1
|
|
1487
1494
|
}, 8, ["size"]));
|
|
1488
1495
|
}
|
|
@@ -1490,7 +1497,7 @@ const qi = ye, ie = /* @__PURE__ */ A({
|
|
|
1490
1497
|
class: "OAuthList"
|
|
1491
1498
|
}, qt = {
|
|
1492
1499
|
class: "OAuthList"
|
|
1493
|
-
},
|
|
1500
|
+
}, Rt = /* @__PURE__ */ A({
|
|
1494
1501
|
__name: "AuthkitOauthList",
|
|
1495
1502
|
props: {
|
|
1496
1503
|
size: {
|
|
@@ -1502,41 +1509,41 @@ const qi = ye, ie = /* @__PURE__ */ A({
|
|
|
1502
1509
|
default: () => ""
|
|
1503
1510
|
}
|
|
1504
1511
|
},
|
|
1505
|
-
setup(
|
|
1512
|
+
setup(l) {
|
|
1506
1513
|
const {
|
|
1507
1514
|
appsData: r
|
|
1508
|
-
} = se(), u =
|
|
1509
|
-
githubAuth:
|
|
1515
|
+
} = se(), u = l, {
|
|
1516
|
+
githubAuth: a,
|
|
1510
1517
|
googleAuth: o,
|
|
1511
1518
|
microsoftAuth: d
|
|
1512
1519
|
} = ye(), t = F(() => !(!r.value.oauth.google.enabled && !r.value.oauth.microsoft.enabled && !r.value.oauth.github.enabled && !r.value.oauth.wechat.enabled));
|
|
1513
|
-
return (
|
|
1520
|
+
return (s, y) => (g(), V("div", xt, [t.value ? (g(), k(e(Ce), {
|
|
1514
1521
|
key: 0,
|
|
1515
1522
|
orientation: "center"
|
|
1516
1523
|
}, {
|
|
1517
|
-
default:
|
|
1524
|
+
default: n(() => [...y[3] || (y[3] = [_("OAuth登陆", -1)])]),
|
|
1518
1525
|
_: 1
|
|
1519
1526
|
})) : S("", !0), z("div", qt, [e(r).oauth.github.enabled ? (g(), k(ie, {
|
|
1520
1527
|
key: 0,
|
|
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"
|
|
@@ -1556,10 +1563,10 @@ const qi = ye, ie = /* @__PURE__ */ A({
|
|
|
1556
1563
|
}
|
|
1557
1564
|
},
|
|
1558
1565
|
emits: ["signIn", "submit"],
|
|
1559
|
-
setup(
|
|
1566
|
+
setup(l, {
|
|
1560
1567
|
emit: r
|
|
1561
1568
|
}) {
|
|
1562
|
-
const u = r,
|
|
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 qi = ye, ie = /* @__PURE__ */ A({
|
|
|
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:
|
|
1591
|
-
size:
|
|
1597
|
+
model: s.value,
|
|
1598
|
+
size: a.size,
|
|
1592
1599
|
"auto-label-width": ""
|
|
1593
1600
|
}, {
|
|
1594
|
-
default:
|
|
1601
|
+
default: n(() => [i(e(I), {
|
|
1595
1602
|
field: "email",
|
|
1596
1603
|
label: "邮箱",
|
|
1597
1604
|
"hide-label": "",
|
|
@@ -1603,9 +1610,9 @@ const qi = ye, ie = /* @__PURE__ */ A({
|
|
|
1603
1610
|
message: "请输入有效的邮箱"
|
|
1604
1611
|
}]
|
|
1605
1612
|
}, {
|
|
1606
|
-
default:
|
|
1607
|
-
modelValue:
|
|
1608
|
-
"onUpdate:modelValue":
|
|
1613
|
+
default: n(() => [i(e(q), {
|
|
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
|
|
@@ -1618,14 +1625,14 @@ const qi = ye, ie = /* @__PURE__ */ A({
|
|
|
1618
1625
|
message: "请输入验证码"
|
|
1619
1626
|
}]
|
|
1620
1627
|
}, {
|
|
1621
|
-
default:
|
|
1622
|
-
modelValue:
|
|
1623
|
-
"onUpdate:modelValue":
|
|
1628
|
+
default: n(() => [z("div", Bt, [i(e(q), {
|
|
1629
|
+
modelValue: s.value.userToken,
|
|
1630
|
+
"onUpdate:modelValue": m[1] || (m[1] = (f) => s.value.userToken = f),
|
|
1624
1631
|
placeholder: "请输入验证码"
|
|
1625
|
-
}, null, 8, ["modelValue"]), i(
|
|
1632
|
+
}, null, 8, ["modelValue"]), i(ne, {
|
|
1626
1633
|
ref_key: "SendVerifyCodeRef",
|
|
1627
1634
|
ref: o,
|
|
1628
|
-
size:
|
|
1635
|
+
size: a.size,
|
|
1629
1636
|
loading: d.value,
|
|
1630
1637
|
style: {
|
|
1631
1638
|
"margin-left": "10px"
|
|
@@ -1645,9 +1652,9 @@ const qi = ye, ie = /* @__PURE__ */ A({
|
|
|
1645
1652
|
message: "密码不能少于10字符"
|
|
1646
1653
|
}]
|
|
1647
1654
|
}, {
|
|
1648
|
-
default:
|
|
1649
|
-
modelValue:
|
|
1650
|
-
"onUpdate:modelValue":
|
|
1655
|
+
default: n(() => [i(e(q), {
|
|
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: ""
|
|
@@ -1665,13 +1672,13 @@ const qi = ye, ie = /* @__PURE__ */ A({
|
|
|
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
|
-
default:
|
|
1673
|
-
modelValue:
|
|
1674
|
-
"onUpdate:modelValue":
|
|
1679
|
+
default: n(() => [i(e(q), {
|
|
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: ""
|
|
@@ -1679,12 +1686,12 @@ const qi = ye, ie = /* @__PURE__ */ A({
|
|
|
1679
1686
|
_: 1
|
|
1680
1687
|
}, 8, ["rules"]), z("div", Ot, [i(e(P), {
|
|
1681
1688
|
type: "primary",
|
|
1682
|
-
loading:
|
|
1689
|
+
loading: a.loading,
|
|
1683
1690
|
long: "",
|
|
1684
|
-
size:
|
|
1685
|
-
onClick:
|
|
1691
|
+
size: a.size,
|
|
1692
|
+
onClick: c
|
|
1686
1693
|
}, {
|
|
1687
|
-
default:
|
|
1694
|
+
default: n(() => [...m[4] || (m[4] = [_(" 提交 ", -1)])]),
|
|
1688
1695
|
_: 1
|
|
1689
1696
|
}, 8, ["loading", "size"])])]),
|
|
1690
1697
|
_: 1
|
|
@@ -1695,20 +1702,20 @@ const qi = ye, ie = /* @__PURE__ */ A({
|
|
|
1695
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;
|
|
1702
|
-
function
|
|
1709
|
+
function a() {
|
|
1703
1710
|
u("switchSignIn");
|
|
1704
1711
|
}
|
|
1705
1712
|
return (o, d) => (g(), V("div", Nt, [z("span", null, [d[1] || (d[1] = z("span", null, "已经有账号?", -1)), i(e(j), {
|
|
1706
1713
|
style: {
|
|
1707
1714
|
padding: "0px"
|
|
1708
1715
|
},
|
|
1709
|
-
onClick:
|
|
1716
|
+
onClick: a
|
|
1710
1717
|
}, {
|
|
1711
|
-
default:
|
|
1718
|
+
default: n(() => [...d[0] || (d[0] = [_("去登陆", -1)])]),
|
|
1712
1719
|
_: 1
|
|
1713
1720
|
})])]));
|
|
1714
1721
|
}
|
|
@@ -1729,19 +1736,19 @@ const qi = ye, ie = /* @__PURE__ */ A({
|
|
|
1729
1736
|
}
|
|
1730
1737
|
},
|
|
1731
1738
|
emits: ["switchSignIn", "submit"],
|
|
1732
|
-
setup(
|
|
1739
|
+
setup(l, {
|
|
1733
1740
|
emit: r
|
|
1734
1741
|
}) {
|
|
1735
|
-
const u = r,
|
|
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:
|
|
1744
|
-
size:
|
|
1749
|
+
return (t, s) => (g(), V("div", Ht, [i(Dt, {
|
|
1750
|
+
loading: l.loading,
|
|
1751
|
+
size: a.size,
|
|
1745
1752
|
onSubmit: d
|
|
1746
1753
|
}, null, 8, ["loading", "size"]), i(he, {
|
|
1747
1754
|
onSwitchSignIn: o
|
|
@@ -1752,25 +1759,25 @@ const qi = ye, ie = /* @__PURE__ */ A({
|
|
|
1752
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;
|
|
1759
|
-
function
|
|
1766
|
+
function a() {
|
|
1760
1767
|
u("toUserServiceAgreement");
|
|
1761
1768
|
}
|
|
1762
1769
|
function o() {
|
|
1763
1770
|
u("toPrivacyPolicy");
|
|
1764
1771
|
}
|
|
1765
1772
|
return (d, t) => (g(), V("div", jt, [t[2] || (t[2] = z("span", null, " 注册登陆即表示同意", -1)), i(e(j), {
|
|
1766
|
-
onClick:
|
|
1773
|
+
onClick: a
|
|
1767
1774
|
}, {
|
|
1768
|
-
default:
|
|
1775
|
+
default: n(() => [...t[0] || (t[0] = [_("用户服务协议", -1)])]),
|
|
1769
1776
|
_: 1
|
|
1770
1777
|
}), t[3] || (t[3] = z("span", null, " 和 ", -1)), i(e(j), {
|
|
1771
1778
|
onClick: o
|
|
1772
1779
|
}, {
|
|
1773
|
-
default:
|
|
1780
|
+
default: n(() => [...t[1] || (t[1] = [_("隐私协议", -1)])]),
|
|
1774
1781
|
_: 1
|
|
1775
1782
|
})]));
|
|
1776
1783
|
}
|
|
@@ -1792,38 +1799,38 @@ const qi = ye, ie = /* @__PURE__ */ A({
|
|
|
1792
1799
|
}
|
|
1793
1800
|
},
|
|
1794
1801
|
emits: ["submit"],
|
|
1795
|
-
setup(
|
|
1802
|
+
setup(l, {
|
|
1796
1803
|
emit: r
|
|
1797
1804
|
}) {
|
|
1798
|
-
const u = r,
|
|
1799
|
-
async function o(y,
|
|
1805
|
+
const u = r, a = l;
|
|
1806
|
+
async function o(y, c) {
|
|
1800
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
|
-
size:
|
|
1830
|
+
size: a.size,
|
|
1824
1831
|
"auto-label-width": ""
|
|
1825
1832
|
}, {
|
|
1826
|
-
default:
|
|
1833
|
+
default: n(() => [i(e(I), {
|
|
1827
1834
|
field: "email",
|
|
1828
1835
|
label: "邮箱",
|
|
1829
1836
|
"hide-label": "",
|
|
@@ -1835,9 +1842,9 @@ const qi = ye, ie = /* @__PURE__ */ A({
|
|
|
1835
1842
|
message: "请输入有效的邮箱"
|
|
1836
1843
|
}]
|
|
1837
1844
|
}, {
|
|
1838
|
-
default:
|
|
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"
|
|
@@ -1854,9 +1861,9 @@ const qi = ye, ie = /* @__PURE__ */ A({
|
|
|
1854
1861
|
validator: o
|
|
1855
1862
|
}]
|
|
1856
1863
|
}, {
|
|
1857
|
-
default:
|
|
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"
|
|
@@ -1864,12 +1871,12 @@ const qi = ye, ie = /* @__PURE__ */ A({
|
|
|
1864
1871
|
_: 1
|
|
1865
1872
|
}, 8, ["rules"]), z("div", Jt, [i(e(P), {
|
|
1866
1873
|
type: "primary",
|
|
1867
|
-
loading:
|
|
1874
|
+
loading: a.loading,
|
|
1868
1875
|
long: "",
|
|
1869
|
-
size:
|
|
1870
|
-
onClick:
|
|
1876
|
+
size: a.size,
|
|
1877
|
+
onClick: s
|
|
1871
1878
|
}, {
|
|
1872
|
-
default:
|
|
1879
|
+
default: n(() => [...c[2] || (c[2] = [_(" 登陆 ", -1)])]),
|
|
1873
1880
|
_: 1
|
|
1874
1881
|
}, 8, ["loading", "size"])])]),
|
|
1875
1882
|
_: 1
|
|
@@ -1880,11 +1887,11 @@ const qi = ye, ie = /* @__PURE__ */ A({
|
|
|
1880
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;
|
|
1887
|
-
function
|
|
1894
|
+
function a() {
|
|
1888
1895
|
u("switchSignUp");
|
|
1889
1896
|
}
|
|
1890
1897
|
function o() {
|
|
@@ -1894,9 +1901,9 @@ const qi = ye, ie = /* @__PURE__ */ A({
|
|
|
1894
1901
|
style: {
|
|
1895
1902
|
padding: "0px"
|
|
1896
1903
|
},
|
|
1897
|
-
onClick:
|
|
1904
|
+
onClick: a
|
|
1898
1905
|
}, {
|
|
1899
|
-
default:
|
|
1906
|
+
default: n(() => [...t[0] || (t[0] = [_("去注册?", -1)])]),
|
|
1900
1907
|
_: 1
|
|
1901
1908
|
})]), i(e(j), {
|
|
1902
1909
|
style: {
|
|
@@ -1904,7 +1911,7 @@ const qi = ye, ie = /* @__PURE__ */ A({
|
|
|
1904
1911
|
},
|
|
1905
1912
|
onClick: o
|
|
1906
1913
|
}, {
|
|
1907
|
-
default:
|
|
1914
|
+
default: n(() => [...t[2] || (t[2] = [_(" 忘记密码?", -1)])]),
|
|
1908
1915
|
_: 1
|
|
1909
1916
|
})]));
|
|
1910
1917
|
}
|
|
@@ -1924,33 +1931,33 @@ const qi = ye, ie = /* @__PURE__ */ A({
|
|
|
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,
|
|
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 (
|
|
1941
|
-
loading:
|
|
1942
|
-
size:
|
|
1947
|
+
return (c, p) => (g(), V("div", ii, [S("", !0), i(Xt, {
|
|
1948
|
+
loading: a.loading,
|
|
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
|
-
}), si = /* @__PURE__ */ C(li, [["__scopeId", "data-v-f52ce3b3"]]),
|
|
1958
|
+
}), si = /* @__PURE__ */ C(li, [["__scopeId", "data-v-f52ce3b3"]]), ni = {
|
|
1952
1959
|
class: "SignUp"
|
|
1953
|
-
},
|
|
1960
|
+
}, ai = /* @__PURE__ */ A({
|
|
1954
1961
|
__name: "AuthkitSignUp",
|
|
1955
1962
|
props: {
|
|
1956
1963
|
size: {
|
|
@@ -1964,25 +1971,25 @@ const qi = ye, ie = /* @__PURE__ */ A({
|
|
|
1964
1971
|
}
|
|
1965
1972
|
},
|
|
1966
1973
|
emits: ["switchSignIn", "submit"],
|
|
1967
|
-
setup(
|
|
1974
|
+
setup(l, {
|
|
1968
1975
|
emit: r
|
|
1969
1976
|
}) {
|
|
1970
|
-
const u = r,
|
|
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,
|
|
1978
|
-
size:
|
|
1979
|
-
loading:
|
|
1984
|
+
return (t, s) => (g(), V("div", ni, [i(pe, {
|
|
1985
|
+
size: a.size,
|
|
1986
|
+
loading: l.loading,
|
|
1980
1987
|
onSubmit: d
|
|
1981
1988
|
}, null, 8, ["size", "loading"]), i(he, {
|
|
1982
1989
|
onSwitchSignIn: o
|
|
1983
1990
|
})]));
|
|
1984
1991
|
}
|
|
1985
|
-
}), oi = /* @__PURE__ */ C(
|
|
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,16 +2008,16 @@ const qi = ye, ie = /* @__PURE__ */ A({
|
|
|
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
|
-
fontSize:
|
|
2020
|
+
fontSize: a,
|
|
2014
2021
|
lineHeight: o
|
|
2015
2022
|
})
|
|
2016
2023
|
}, [e(t).applicationLogoUrl ? (g(), V("img", {
|
|
@@ -2020,13 +2027,13 @@ const qi = ye, ie = /* @__PURE__ */ A({
|
|
|
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,52 +2046,52 @@ const qi = ye, ie = /* @__PURE__ */ A({
|
|
|
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(), {
|
|
2057
2064
|
appsAuthPageInfoApi: b
|
|
2058
2065
|
} = se();
|
|
2059
2066
|
function U() {
|
|
2060
|
-
|
|
2067
|
+
a("toPrivacyPolicy");
|
|
2061
2068
|
}
|
|
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:
|
|
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 qi = ye, ie = /* @__PURE__ */ A({
|
|
|
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 qi = ye, ie = /* @__PURE__ */ A({
|
|
|
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
|
-
show:
|
|
2118
|
-
} = xe(), o =
|
|
2124
|
+
show: a
|
|
2125
|
+
} = xe(), o = l, d = r;
|
|
2119
2126
|
function t(y) {
|
|
2120
2127
|
y(!0);
|
|
2121
2128
|
}
|
|
2122
|
-
function
|
|
2123
|
-
|
|
2129
|
+
function s() {
|
|
2130
|
+
a.value = !1, d("close");
|
|
2124
2131
|
}
|
|
2125
2132
|
return u(() => {
|
|
2126
|
-
|
|
2127
|
-
}), (y,
|
|
2128
|
-
visible: e(
|
|
2129
|
-
"onUpdate:visible":
|
|
2133
|
+
a.value = !1;
|
|
2134
|
+
}), (y, c) => (g(), k(e(ce), {
|
|
2135
|
+
visible: e(a),
|
|
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,26 +2141,26 @@ const qi = ye, ie = /* @__PURE__ */ A({
|
|
|
2134
2141
|
width: "auto",
|
|
2135
2142
|
"modal-class": "SignInModalClass",
|
|
2136
2143
|
onBeforeOk: t,
|
|
2137
|
-
onClose:
|
|
2144
|
+
onClose: s
|
|
2138
2145
|
}, {
|
|
2139
|
-
title:
|
|
2140
|
-
default:
|
|
2146
|
+
title: n(() => [i(we)]),
|
|
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
2166
|
we as b,
|
|
@@ -2165,11 +2172,13 @@ export {
|
|
|
2165
2172
|
ti as h,
|
|
2166
2173
|
Kt as i,
|
|
2167
2174
|
Xe as j,
|
|
2168
|
-
|
|
2175
|
+
ae as k,
|
|
2169
2176
|
yt as l,
|
|
2170
2177
|
rt as m,
|
|
2171
2178
|
pt as n,
|
|
2172
2179
|
ot as o,
|
|
2173
|
-
|
|
2174
|
-
|
|
2180
|
+
Ri as p,
|
|
2181
|
+
xi as q,
|
|
2182
|
+
ye as u,
|
|
2183
|
+
X as v
|
|
2175
2184
|
};
|