@huyooo/ui 0.13.6 → 0.13.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AuthkitAppSetting-EL2ZvAVT.js → AuthkitAppSetting-Xe-QQSQ4.js} +405 -408
- package/dist/{AuthkitGithubBinding-Ba9sbNEh.js → AuthkitGithubBinding-CK6ijijV.js} +330 -331
- package/dist/{Clipboard-CdJtMvg6.js → Clipboard-C8ncjaAJ.js} +1 -1
- package/dist/{Contact-Z2VFVeKK.js → Contact-mb7deQOs.js} +2 -2
- package/dist/CustomTable-BT-cnhLR.js +280 -0
- package/dist/{FeedbackItem-B_MDdk4s.js → FeedbackItem-C9FQThXG.js} +3 -3
- package/dist/{FeedbackModal-qrcBDDQM.js → FeedbackModal-R3NKRxr7.js} +3 -3
- package/dist/{MessageHandle-Y96z-IXv.js → MessageHandle-CVueKPFG.js} +2 -2
- package/dist/{MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-CfmjFcay.js → MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-DL4qP8DA.js} +2 -2
- package/dist/{PaySubscriptions-C75OtmYw.js → PaySubscriptions-BkZaeTgv.js} +5 -5
- package/dist/{PricingPlans-DCYIVuuT.js → PricingPlans-B-GWpft_.js} +4 -4
- package/dist/{ReferrerReferees-8eSsuPfa.js → ReferrerReferees-DFCwvXJ6.js} +5 -5
- package/dist/{Upload.vue_vue_type_script_setup_true_lang-BAibfVEN.js → Upload.vue_vue_type_script_setup_true_lang-dLSky4Yx.js} +1 -1
- package/dist/{UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-BEVmBNlU.js → UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-Iwq1MOFa.js} +33 -34
- package/dist/WidthContainer-jOX17pDu.js +691 -0
- package/dist/api/billingSubscriptionApi.d.ts +3 -0
- package/dist/{apiClients-D56ALwwO.js → apiClients-CkI47p36.js} +11 -7
- package/dist/authkit.js +9 -9
- package/dist/common.js +2 -2
- package/dist/composables/Authkit/resolveRoutePermission.d.ts +4 -0
- package/dist/composables/Authkit/useAuthkitAppsAuthPageInfo.d.ts +1 -1
- package/dist/composables/Authkit/useAuthkitUsersProfile.d.ts +1 -1
- package/dist/composables/useMessageList.d.ts +2 -2
- package/dist/composables.js +13 -13
- package/dist/feedback.js +3 -3
- package/dist/main.js +32 -32
- package/dist/message.js +3 -3
- package/dist/pay.js +4 -4
- package/dist/privateCom.js +1 -1
- package/dist/referrer.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/api/ai.generated.d.ts +3248 -335
- package/dist/types/api/billing.generated.d.ts +2162 -500
- package/dist/upload.js +2 -2
- package/dist/{useAuthkitAppsAuthPageInfo-RMs8sOwk.js → useAuthkitAppsAuthPageInfo-nCjfAjiw.js} +17 -7
- package/dist/{useAuthkitAuth-B8aO6aMa.js → useAuthkitAuth-C--qS6UE.js} +1 -1
- package/dist/useAuthkitCreateAndUpdate-u-ceTc-m.js +25 -0
- package/dist/useAuthkitUsersProfile-BC5EsA2f.js +40 -0
- package/dist/useBillingStatusOptions-D5Ehwtbj.js +145 -0
- package/dist/{useDownloads-DqF1USJ7.js → useDownloads-BC0QyEFr.js} +10 -10
- package/dist/{useEnsureAuthenticated-D99GiwEk.js → useEnsureAuthenticated-C4tsSfv6.js} +2 -2
- package/dist/{useLegalLinks-DRTOYp3n.js → useLegalLinks-DeXLE-yv.js} +2 -2
- package/dist/{useMessageNotifications-CUpk6zCE.js → useMessageNotifications-BMUx5xfX.js} +1 -1
- package/dist/{useSEO-CUKPmGRx.js → useSEO-BWAREYk4.js} +238 -227
- package/dist/{useSubscriptionCheckout-CAgy1CFj.js → useSubscriptionCheckout-CHAF20s-.js} +102 -108
- package/dist/{useTableHandle-CCKjahT0.js → useTableHandle-9alnSWt0.js} +1 -1
- package/dist/{useUploadCos-Bxctd4E6.js → useUploadCos-DGPnLOC9.js} +1 -1
- package/dist/user.js +1 -1
- package/package.json +3 -2
- package/dist/CustomTable-BBcd4nNL.js +0 -278
- package/dist/WidthContainer-Dqf_-qGk.js +0 -694
- package/dist/useAuthkitCreateAndUpdate-DkiLs143.js +0 -25
- package/dist/useAuthkitUsersProfile-CWAr0CNv.js +0 -36
- package/dist/useBillingStatusOptions-CottFcAr.js +0 -127
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
/* empty css */
|
|
2
2
|
/* empty css */
|
|
3
3
|
import { U as ye } from "./index-D3Kp6R4z.js";
|
|
4
|
-
import { defineComponent as O, computed as I, openBlock as h, createElementBlock as j, normalizeStyle as be, normalizeClass as ke, createElementVNode as C, ref as y, createBlock as
|
|
5
|
-
import { Form as
|
|
4
|
+
import { defineComponent as O, computed as I, openBlock as h, createElementBlock as j, normalizeStyle as be, normalizeClass as ke, createElementVNode as C, ref as y, createBlock as w, unref as e, withCtx as t, createVNode as o, createTextVNode as k, onMounted as ee, onUnmounted as fe, withDirectives as _e, toDisplayString as T, vShow as we, Fragment as Z, createCommentVNode as P, renderList as ze, watch as de, isRef as Ve } from "vue";
|
|
5
|
+
import { Form as J, FormItem as A, Avatar as se, Input as M, Textarea as Ce, Button as S, Message as W, Alert as F, Link as Ie, Space as ce, InputPassword as $e, Result as Pe, Modal as Se } from "@arco-design/web-vue";
|
|
6
6
|
/* empty css */
|
|
7
|
-
import {
|
|
7
|
+
import { e as U, g as Y, m as me } from "./apiClients-CkI47p36.js";
|
|
8
8
|
/* empty css */
|
|
9
|
-
import { u as Ae } from "./useUploadCos-
|
|
9
|
+
import { u as Ae } from "./useUploadCos-DGPnLOC9.js";
|
|
10
10
|
import { _ as Ue, g as xe, i as qe } from "./plugin-vue_export-helper-LjDO2Zua.js";
|
|
11
|
-
import { _ as
|
|
12
|
-
import { u as te } from "./useAuthkitUsersProfile-
|
|
11
|
+
import { _ as H } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
12
|
+
import { u as te } from "./useAuthkitUsersProfile-BC5EsA2f.js";
|
|
13
13
|
import { Icon as Te } from "@iconify/vue";
|
|
14
|
-
import { u as pe } from "./useAuthkitAppsAuthPageInfo-
|
|
15
|
-
import { u as Be } from "./useAuthkitAuth-
|
|
14
|
+
import { u as pe } from "./useAuthkitAppsAuthPageInfo-nCjfAjiw.js";
|
|
15
|
+
import { u as Be } from "./useAuthkitAuth-C--qS6UE.js";
|
|
16
16
|
import { M as Ee } from "./Menu-Cy2ZPeaz.js";
|
|
17
|
-
import { u as Re } from "./useAuthkitCreateAndUpdate-
|
|
17
|
+
import { u as Re } from "./useAuthkitCreateAndUpdate-u-ceTc-m.js";
|
|
18
18
|
const Le = O({
|
|
19
19
|
name: "IconCamera",
|
|
20
20
|
props: {
|
|
@@ -28,27 +28,27 @@ const Le = O({
|
|
|
28
28
|
strokeLinecap: {
|
|
29
29
|
type: String,
|
|
30
30
|
default: "butt",
|
|
31
|
-
validator: (
|
|
31
|
+
validator: (f) => ["butt", "round", "square"].includes(f)
|
|
32
32
|
},
|
|
33
33
|
strokeLinejoin: {
|
|
34
34
|
type: String,
|
|
35
35
|
default: "miter",
|
|
36
|
-
validator: (
|
|
36
|
+
validator: (f) => ["arcs", "bevel", "miter", "miter-clip", "round"].includes(f)
|
|
37
37
|
},
|
|
38
38
|
rotate: Number,
|
|
39
39
|
spin: Boolean
|
|
40
40
|
},
|
|
41
41
|
emits: {
|
|
42
|
-
click: (
|
|
42
|
+
click: (f) => !0
|
|
43
43
|
},
|
|
44
|
-
setup(
|
|
44
|
+
setup(f, {
|
|
45
45
|
emit: i
|
|
46
46
|
}) {
|
|
47
47
|
const v = xe("icon"), m = I(() => [v, `${v}-camera`, {
|
|
48
|
-
[`${v}-spin`]:
|
|
48
|
+
[`${v}-spin`]: f.spin
|
|
49
49
|
}]), s = I(() => {
|
|
50
50
|
const l = {};
|
|
51
|
-
return
|
|
51
|
+
return f.size && (l.fontSize = qe(f.size) ? `${f.size}px` : f.size), f.rotate && (l.transform = `rotate(${f.rotate}deg)`), l;
|
|
52
52
|
});
|
|
53
53
|
return {
|
|
54
54
|
cls: m,
|
|
@@ -59,28 +59,28 @@ const Le = O({
|
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
61
|
}), Ne = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
|
|
62
|
-
function Me(
|
|
62
|
+
function Me(f, i, v, m, s, g) {
|
|
63
63
|
return h(), j("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: ke(
|
|
69
|
-
style: be(
|
|
70
|
-
"stroke-width":
|
|
71
|
-
"stroke-linecap":
|
|
72
|
-
"stroke-linejoin":
|
|
73
|
-
onClick: i[0] || (i[0] = (...l) =>
|
|
68
|
+
class: ke(f.cls),
|
|
69
|
+
style: be(f.innerStyle),
|
|
70
|
+
"stroke-width": f.strokeWidth,
|
|
71
|
+
"stroke-linecap": f.strokeLinecap,
|
|
72
|
+
"stroke-linejoin": f.strokeLinejoin,
|
|
73
|
+
onClick: i[0] || (i[0] = (...l) => f.onClick && f.onClick(...l))
|
|
74
74
|
}, i[1] || (i[1] = [C("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, Ne);
|
|
77
77
|
}
|
|
78
|
-
var
|
|
79
|
-
const Oe = Object.assign(
|
|
80
|
-
install: (
|
|
78
|
+
var ne = /* @__PURE__ */ Ue(Le, [["render", Me]]);
|
|
79
|
+
const Oe = Object.assign(ne, {
|
|
80
|
+
install: (f, i) => {
|
|
81
81
|
var v;
|
|
82
82
|
const m = (v = i == null ? void 0 : i.iconPrefix) != null ? v : "";
|
|
83
|
-
|
|
83
|
+
f.component(m + ne.name, ne);
|
|
84
84
|
}
|
|
85
85
|
}), De = {
|
|
86
86
|
class: "handle"
|
|
@@ -93,10 +93,10 @@ const Oe = Object.assign(se, {
|
|
|
93
93
|
}
|
|
94
94
|
},
|
|
95
95
|
emits: ["submit"],
|
|
96
|
-
setup(
|
|
96
|
+
setup(f, {
|
|
97
97
|
emit: i
|
|
98
98
|
}) {
|
|
99
|
-
const v = i, m =
|
|
99
|
+
const v = i, m = f, s = y({
|
|
100
100
|
id: void 0,
|
|
101
101
|
nickname: "",
|
|
102
102
|
description: "",
|
|
@@ -109,72 +109,72 @@ const Oe = Object.assign(se, {
|
|
|
109
109
|
a.value = !0;
|
|
110
110
|
const {
|
|
111
111
|
data: n
|
|
112
|
-
} = await
|
|
112
|
+
} = await U.users.profile.post({});
|
|
113
113
|
a.value = !1, n && (s.value.id = n.id, s.value.nickname = n.nickname, s.value.description = n.description, s.value.avatar = n.avatar, s.value.avatarUrl = n.avatarUrl);
|
|
114
114
|
}
|
|
115
115
|
async function r() {
|
|
116
116
|
if (!await l.value.validate()) {
|
|
117
117
|
a.value = !0;
|
|
118
|
-
const
|
|
118
|
+
const d = {
|
|
119
119
|
id: s.value.id,
|
|
120
120
|
nickname: s.value.nickname,
|
|
121
121
|
description: s.value.description,
|
|
122
122
|
avatar: s.value.avatar
|
|
123
123
|
}, {
|
|
124
|
-
data:
|
|
124
|
+
data: z,
|
|
125
125
|
error: R
|
|
126
|
-
} = await
|
|
127
|
-
a.value = !1, !R &&
|
|
126
|
+
} = await U.users.update.baseInfo.post(d);
|
|
127
|
+
a.value = !1, !R && z && (W.success("更新成功"), s.value.avatarUrl = z.avatarUrl, v("submit"));
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
u();
|
|
131
131
|
const p = () => {
|
|
132
132
|
const {
|
|
133
133
|
uploadFile: n
|
|
134
|
-
} = Ae(),
|
|
135
|
-
|
|
136
|
-
var
|
|
137
|
-
const
|
|
138
|
-
if (
|
|
134
|
+
} = Ae(), d = document.createElement("input");
|
|
135
|
+
d.type = "file", d.accept = "image/*", d.style.display = "none", document.body.append(d), d.addEventListener("change", async (z) => {
|
|
136
|
+
var N;
|
|
137
|
+
const x = (N = z.target.files) == null ? void 0 : N[0];
|
|
138
|
+
if (x) {
|
|
139
139
|
g.value = !0;
|
|
140
140
|
try {
|
|
141
141
|
n({
|
|
142
142
|
bucketId: Y.avatarBucketId,
|
|
143
|
-
file:
|
|
144
|
-
onFileFinish(
|
|
143
|
+
file: x,
|
|
144
|
+
onFileFinish(L, K, _) {
|
|
145
145
|
g.value = !0;
|
|
146
|
-
const
|
|
146
|
+
const $ = {
|
|
147
147
|
id: s.value.id,
|
|
148
148
|
nickname: s.value.nickname,
|
|
149
149
|
description: s.value.description,
|
|
150
|
-
avatar:
|
|
150
|
+
avatar: _.Key
|
|
151
151
|
};
|
|
152
152
|
(async () => {
|
|
153
153
|
const {
|
|
154
|
-
error:
|
|
155
|
-
} = await
|
|
156
|
-
g.value = !1,
|
|
154
|
+
error: D
|
|
155
|
+
} = await U.users.update.baseInfo.post($);
|
|
156
|
+
g.value = !1, D || (W.success("更新成功"), u(), v("submit"));
|
|
157
157
|
})();
|
|
158
158
|
},
|
|
159
|
-
onError(
|
|
159
|
+
onError(L) {
|
|
160
160
|
console.error("上传图片失败"), g.value = !1;
|
|
161
161
|
}
|
|
162
162
|
});
|
|
163
|
-
} catch (
|
|
164
|
-
console.error("上传图片失败",
|
|
163
|
+
} catch (L) {
|
|
164
|
+
console.error("上传图片失败", L), g.value = !1;
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
|
-
|
|
168
|
-
}),
|
|
167
|
+
d.remove();
|
|
168
|
+
}), d.click();
|
|
169
169
|
};
|
|
170
|
-
return (n,
|
|
170
|
+
return (n, d) => (h(), w(e(J), {
|
|
171
171
|
ref_key: "formRef",
|
|
172
172
|
ref: l,
|
|
173
173
|
model: s.value,
|
|
174
174
|
"auto-label-width": "",
|
|
175
175
|
size: m.size
|
|
176
176
|
}, {
|
|
177
|
-
default: t(() => [o(e(
|
|
177
|
+
default: t(() => [o(e(A), {
|
|
178
178
|
field: "avatar",
|
|
179
179
|
label: "头像",
|
|
180
180
|
rules: [{
|
|
@@ -182,7 +182,7 @@ const Oe = Object.assign(se, {
|
|
|
182
182
|
message: "请上传头像"
|
|
183
183
|
}]
|
|
184
184
|
}, {
|
|
185
|
-
default: t(() => [o(e(
|
|
185
|
+
default: t(() => [o(e(se), {
|
|
186
186
|
"image-url": s.value.avatarUrl,
|
|
187
187
|
size: 42,
|
|
188
188
|
"object-fit": "cover",
|
|
@@ -193,7 +193,7 @@ const Oe = Object.assign(se, {
|
|
|
193
193
|
_: 1
|
|
194
194
|
}, 8, ["image-url"])]),
|
|
195
195
|
_: 1
|
|
196
|
-
}), o(e(
|
|
196
|
+
}), o(e(A), {
|
|
197
197
|
field: "nickname",
|
|
198
198
|
label: "昵称",
|
|
199
199
|
rules: [{
|
|
@@ -201,13 +201,13 @@ const Oe = Object.assign(se, {
|
|
|
201
201
|
message: "请输入昵称"
|
|
202
202
|
}]
|
|
203
203
|
}, {
|
|
204
|
-
default: t(() => [o(e(
|
|
204
|
+
default: t(() => [o(e(M), {
|
|
205
205
|
modelValue: s.value.nickname,
|
|
206
|
-
"onUpdate:modelValue":
|
|
206
|
+
"onUpdate:modelValue": d[0] || (d[0] = (z) => s.value.nickname = z),
|
|
207
207
|
placeholder: "请输入昵称"
|
|
208
208
|
}, null, 8, ["modelValue"])]),
|
|
209
209
|
_: 1
|
|
210
|
-
}), o(e(
|
|
210
|
+
}), o(e(A), {
|
|
211
211
|
field: "description",
|
|
212
212
|
label: "简介",
|
|
213
213
|
rules: [{
|
|
@@ -217,7 +217,7 @@ const Oe = Object.assign(se, {
|
|
|
217
217
|
}, {
|
|
218
218
|
default: t(() => [o(e(Ce), {
|
|
219
219
|
modelValue: s.value.description,
|
|
220
|
-
"onUpdate:modelValue":
|
|
220
|
+
"onUpdate:modelValue": d[1] || (d[1] = (z) => s.value.description = z),
|
|
221
221
|
placeholder: "请输入描述",
|
|
222
222
|
"allow-clear": "",
|
|
223
223
|
"auto-size": {
|
|
@@ -225,17 +225,17 @@ const Oe = Object.assign(se, {
|
|
|
225
225
|
}
|
|
226
226
|
}, null, 8, ["modelValue"])]),
|
|
227
227
|
_: 1
|
|
228
|
-
}), o(e(
|
|
228
|
+
}), o(e(A), {
|
|
229
229
|
field: "",
|
|
230
230
|
label: "",
|
|
231
231
|
rules: []
|
|
232
232
|
}, {
|
|
233
|
-
default: t(() => [C("div", De, [o(e(
|
|
233
|
+
default: t(() => [C("div", De, [o(e(S), {
|
|
234
234
|
type: "primary",
|
|
235
235
|
loading: a.value,
|
|
236
236
|
onClick: r
|
|
237
237
|
}, {
|
|
238
|
-
default: t(() => [...
|
|
238
|
+
default: t(() => [...d[2] || (d[2] = [k(" 提交 ", -1)])]),
|
|
239
239
|
_: 1
|
|
240
240
|
}, 8, ["loading"])])]),
|
|
241
241
|
_: 1
|
|
@@ -243,7 +243,7 @@ const Oe = Object.assign(se, {
|
|
|
243
243
|
_: 1
|
|
244
244
|
}, 8, ["model", "size"]));
|
|
245
245
|
}
|
|
246
|
-
}), je = /* @__PURE__ */
|
|
246
|
+
}), je = /* @__PURE__ */ H(Fe, [["__scopeId", "data-v-1d138326"]]), He = /* @__PURE__ */ O({
|
|
247
247
|
__name: "AuthkitSendVerifyCode",
|
|
248
248
|
props: {
|
|
249
249
|
size: {
|
|
@@ -257,11 +257,11 @@ const Oe = Object.assign(se, {
|
|
|
257
257
|
}
|
|
258
258
|
},
|
|
259
259
|
emits: ["send"],
|
|
260
|
-
setup(
|
|
260
|
+
setup(f, {
|
|
261
261
|
expose: i,
|
|
262
262
|
emit: v
|
|
263
263
|
}) {
|
|
264
|
-
const m = v, s =
|
|
264
|
+
const m = v, s = f, g = y(!1);
|
|
265
265
|
let l;
|
|
266
266
|
const a = y(0), V = I(() => a.value.toString().padStart(2, "0")), u = I(() => a.value > 0), r = () => {
|
|
267
267
|
g.value && (a.value <= 0 ? (clearInterval(l), g.value = !1) : a.value--);
|
|
@@ -277,7 +277,7 @@ const Oe = Object.assign(se, {
|
|
|
277
277
|
startCountFn: n
|
|
278
278
|
}), fe(() => {
|
|
279
279
|
l && clearInterval(l);
|
|
280
|
-
}), (
|
|
280
|
+
}), (d, z) => (h(), w(e(S), {
|
|
281
281
|
class: "OAuthItem",
|
|
282
282
|
type: "primary",
|
|
283
283
|
size: s.size,
|
|
@@ -285,13 +285,13 @@ const Oe = Object.assign(se, {
|
|
|
285
285
|
loading: s.loading,
|
|
286
286
|
onClick: p
|
|
287
287
|
}, {
|
|
288
|
-
default: t(() => [
|
|
288
|
+
default: t(() => [z[0] || (z[0] = C("span", null, " 发送验证码", -1)), _e(C("span", {
|
|
289
289
|
class: "verify-code-timer"
|
|
290
|
-
},
|
|
290
|
+
}, T(`(${V.value})`), 513), [[we, u.value]])]),
|
|
291
291
|
_: 1
|
|
292
292
|
}, 8, ["size", "disabled", "loading"]));
|
|
293
293
|
}
|
|
294
|
-
}), ie = /* @__PURE__ */
|
|
294
|
+
}), ie = /* @__PURE__ */ H(He, [["__scopeId", "data-v-2883dc6d"]]), We = {
|
|
295
295
|
class: "sendVerifyCodeItem"
|
|
296
296
|
}, Ke = {
|
|
297
297
|
class: "handle"
|
|
@@ -309,10 +309,10 @@ const Oe = Object.assign(se, {
|
|
|
309
309
|
}
|
|
310
310
|
},
|
|
311
311
|
emits: ["next"],
|
|
312
|
-
setup(
|
|
312
|
+
setup(f, {
|
|
313
313
|
emit: i
|
|
314
314
|
}) {
|
|
315
|
-
const v = i, m =
|
|
315
|
+
const v = i, m = f, s = I(() => me(m.email)), g = y(), l = y(!1), a = y(!1), V = y(), u = y({
|
|
316
316
|
userToken: void 0,
|
|
317
317
|
emailVerifyId: void 0
|
|
318
318
|
});
|
|
@@ -320,7 +320,7 @@ const Oe = Object.assign(se, {
|
|
|
320
320
|
l.value = !0;
|
|
321
321
|
const {
|
|
322
322
|
data: n
|
|
323
|
-
} = await
|
|
323
|
+
} = await U.verify.email.retry.post({
|
|
324
324
|
email: m.email,
|
|
325
325
|
purpose: "bindEmail"
|
|
326
326
|
});
|
|
@@ -330,24 +330,24 @@ const Oe = Object.assign(se, {
|
|
|
330
330
|
if (!await V.value.validate(["userToken"])) {
|
|
331
331
|
a.value = !0;
|
|
332
332
|
const {
|
|
333
|
-
error:
|
|
334
|
-
} = await
|
|
333
|
+
error: d
|
|
334
|
+
} = await U.verify.email.post({
|
|
335
335
|
email: m.email,
|
|
336
336
|
userToken: u.value.userToken,
|
|
337
337
|
emailVerifyId: u.value.emailVerifyId,
|
|
338
338
|
purpose: "bindEmail"
|
|
339
339
|
});
|
|
340
|
-
a.value = !1,
|
|
340
|
+
a.value = !1, d || v("next");
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
|
-
return (n,
|
|
343
|
+
return (n, d) => (h(), w(e(J), {
|
|
344
344
|
ref_key: "formRef",
|
|
345
345
|
ref: V,
|
|
346
346
|
model: u.value,
|
|
347
347
|
"auto-label-width": "",
|
|
348
348
|
size: m.size
|
|
349
349
|
}, {
|
|
350
|
-
default: t(() => [o(e(
|
|
350
|
+
default: t(() => [o(e(A), {
|
|
351
351
|
field: "email",
|
|
352
352
|
label: "邮箱",
|
|
353
353
|
rules: [{
|
|
@@ -358,9 +358,9 @@ const Oe = Object.assign(se, {
|
|
|
358
358
|
message: "请输入有效的邮箱"
|
|
359
359
|
}]
|
|
360
360
|
}, {
|
|
361
|
-
default: t(() => [k(
|
|
361
|
+
default: t(() => [k(T(s.value), 1)]),
|
|
362
362
|
_: 1
|
|
363
|
-
}), o(e(
|
|
363
|
+
}), o(e(A), {
|
|
364
364
|
field: "userToken",
|
|
365
365
|
label: "验证码",
|
|
366
366
|
"hide-label": "",
|
|
@@ -369,9 +369,9 @@ const Oe = Object.assign(se, {
|
|
|
369
369
|
message: "请输入验证码"
|
|
370
370
|
}]
|
|
371
371
|
}, {
|
|
372
|
-
default: t(() => [C("div", We, [o(e(
|
|
372
|
+
default: t(() => [C("div", We, [o(e(M), {
|
|
373
373
|
modelValue: u.value.userToken,
|
|
374
|
-
"onUpdate:modelValue":
|
|
374
|
+
"onUpdate:modelValue": d[0] || (d[0] = (z) => u.value.userToken = z),
|
|
375
375
|
placeholder: "请输入验证码"
|
|
376
376
|
}, null, 8, ["modelValue"]), o(ie, {
|
|
377
377
|
ref_key: "SendVerifyCodeRef",
|
|
@@ -384,17 +384,17 @@ const Oe = Object.assign(se, {
|
|
|
384
384
|
onSend: r
|
|
385
385
|
}, null, 8, ["size", "loading"])])]),
|
|
386
386
|
_: 1
|
|
387
|
-
}), o(e(
|
|
387
|
+
}), o(e(A), {
|
|
388
388
|
field: "",
|
|
389
389
|
label: "",
|
|
390
390
|
rules: []
|
|
391
391
|
}, {
|
|
392
|
-
default: t(() => [C("div", Ke, [o(e(
|
|
392
|
+
default: t(() => [C("div", Ke, [o(e(S), {
|
|
393
393
|
loading: a.value,
|
|
394
394
|
type: "primary",
|
|
395
395
|
onClick: p
|
|
396
396
|
}, {
|
|
397
|
-
default: t(() => [...
|
|
397
|
+
default: t(() => [...d[1] || (d[1] = [k(" 提交 ", -1)])]),
|
|
398
398
|
_: 1
|
|
399
399
|
}, 8, ["loading"])])]),
|
|
400
400
|
_: 1
|
|
@@ -402,7 +402,7 @@ const Oe = Object.assign(se, {
|
|
|
402
402
|
_: 1
|
|
403
403
|
}, 8, ["model", "size"]));
|
|
404
404
|
}
|
|
405
|
-
}),
|
|
405
|
+
}), re = /* @__PURE__ */ H(Ge, [["__scopeId", "data-v-f4247d73"]]), Ze = {
|
|
406
406
|
class: "sendVerifyCodeItem"
|
|
407
407
|
}, Je = {
|
|
408
408
|
class: "handle"
|
|
@@ -419,10 +419,10 @@ const Oe = Object.assign(se, {
|
|
|
419
419
|
}
|
|
420
420
|
},
|
|
421
421
|
emits: ["next"],
|
|
422
|
-
setup(
|
|
422
|
+
setup(f, {
|
|
423
423
|
emit: i
|
|
424
424
|
}) {
|
|
425
|
-
const v = i, m =
|
|
425
|
+
const v = i, m = f, s = y(), g = y(!1), l = y(!1), a = y(), V = y({
|
|
426
426
|
code: void 0
|
|
427
427
|
}), u = I(() => {
|
|
428
428
|
const n = m.phone.trim();
|
|
@@ -432,7 +432,7 @@ const Oe = Object.assign(se, {
|
|
|
432
432
|
g.value = !0;
|
|
433
433
|
const {
|
|
434
434
|
error: n
|
|
435
|
-
} = await
|
|
435
|
+
} = await U.verify.sms.send.post({
|
|
436
436
|
phone: m.phone,
|
|
437
437
|
purpose: "resetPassword"
|
|
438
438
|
});
|
|
@@ -442,29 +442,29 @@ const Oe = Object.assign(se, {
|
|
|
442
442
|
if (!await a.value.validate(["code"])) {
|
|
443
443
|
l.value = !0;
|
|
444
444
|
const {
|
|
445
|
-
error:
|
|
446
|
-
} = await
|
|
445
|
+
error: d
|
|
446
|
+
} = await U.verify.sms.verify.post({
|
|
447
447
|
phone: m.phone,
|
|
448
448
|
code: V.value.code,
|
|
449
449
|
purpose: "resetPassword"
|
|
450
450
|
});
|
|
451
|
-
l.value = !1,
|
|
451
|
+
l.value = !1, d || v("next");
|
|
452
452
|
}
|
|
453
453
|
}
|
|
454
|
-
return (n,
|
|
454
|
+
return (n, d) => (h(), w(e(J), {
|
|
455
455
|
ref_key: "formRef",
|
|
456
456
|
ref: a,
|
|
457
457
|
model: V.value,
|
|
458
458
|
"auto-label-width": "",
|
|
459
459
|
size: m.size
|
|
460
460
|
}, {
|
|
461
|
-
default: t(() => [o(e(
|
|
461
|
+
default: t(() => [o(e(A), {
|
|
462
462
|
field: "phone",
|
|
463
463
|
label: "手机号"
|
|
464
464
|
}, {
|
|
465
|
-
default: t(() => [k(
|
|
465
|
+
default: t(() => [k(T(u.value), 1)]),
|
|
466
466
|
_: 1
|
|
467
|
-
}), o(e(
|
|
467
|
+
}), o(e(A), {
|
|
468
468
|
field: "code",
|
|
469
469
|
label: "验证码",
|
|
470
470
|
"hide-label": "",
|
|
@@ -473,9 +473,9 @@ const Oe = Object.assign(se, {
|
|
|
473
473
|
message: "请输入验证码"
|
|
474
474
|
}]
|
|
475
475
|
}, {
|
|
476
|
-
default: t(() => [C("div", Ze, [o(e(
|
|
476
|
+
default: t(() => [C("div", Ze, [o(e(M), {
|
|
477
477
|
modelValue: V.value.code,
|
|
478
|
-
"onUpdate:modelValue":
|
|
478
|
+
"onUpdate:modelValue": d[0] || (d[0] = (z) => V.value.code = z),
|
|
479
479
|
placeholder: "请输入验证码"
|
|
480
480
|
}, null, 8, ["modelValue"]), o(ie, {
|
|
481
481
|
ref_key: "sendVerifyCodeRef",
|
|
@@ -488,17 +488,17 @@ const Oe = Object.assign(se, {
|
|
|
488
488
|
onSend: r
|
|
489
489
|
}, null, 8, ["size", "loading"])])]),
|
|
490
490
|
_: 1
|
|
491
|
-
}), o(e(
|
|
491
|
+
}), o(e(A), {
|
|
492
492
|
field: "",
|
|
493
493
|
label: "",
|
|
494
494
|
rules: []
|
|
495
495
|
}, {
|
|
496
|
-
default: t(() => [C("div", Je, [o(e(
|
|
496
|
+
default: t(() => [C("div", Je, [o(e(S), {
|
|
497
497
|
loading: l.value,
|
|
498
498
|
type: "primary",
|
|
499
499
|
onClick: p
|
|
500
500
|
}, {
|
|
501
|
-
default: t(() => [...
|
|
501
|
+
default: t(() => [...d[1] || (d[1] = [k("提交", -1)])]),
|
|
502
502
|
_: 1
|
|
503
503
|
}, 8, ["loading"])])]),
|
|
504
504
|
_: 1
|
|
@@ -506,7 +506,7 @@ const Oe = Object.assign(se, {
|
|
|
506
506
|
_: 1
|
|
507
507
|
}, 8, ["model", "size"]));
|
|
508
508
|
}
|
|
509
|
-
}), ve = /* @__PURE__ */
|
|
509
|
+
}), ve = /* @__PURE__ */ H(Qe, [["__scopeId", "data-v-2a868807"]]), Xe = {
|
|
510
510
|
class: "handle"
|
|
511
511
|
}, Ye = /* @__PURE__ */ O({
|
|
512
512
|
__name: "AuthkitPasswordUpdate",
|
|
@@ -517,10 +517,10 @@ const Oe = Object.assign(se, {
|
|
|
517
517
|
}
|
|
518
518
|
},
|
|
519
519
|
emits: ["submit"],
|
|
520
|
-
setup(
|
|
520
|
+
setup(f, {
|
|
521
521
|
emit: i
|
|
522
522
|
}) {
|
|
523
|
-
const v = i, m = y(!1), s = y(), g =
|
|
523
|
+
const v = i, m = y(!1), s = y(), g = f, l = y({
|
|
524
524
|
oldPassword: "",
|
|
525
525
|
password: "",
|
|
526
526
|
confirmPassword: ""
|
|
@@ -532,18 +532,18 @@ const Oe = Object.assign(se, {
|
|
|
532
532
|
password: l.value.password
|
|
533
533
|
}, {
|
|
534
534
|
error: r
|
|
535
|
-
} = await
|
|
535
|
+
} = await U.users.update.password.post(u);
|
|
536
536
|
m.value = !1, r || v("submit", u);
|
|
537
537
|
}
|
|
538
538
|
}
|
|
539
|
-
return (V, u) => (h(),
|
|
539
|
+
return (V, u) => (h(), w(e(J), {
|
|
540
540
|
ref_key: "formRef",
|
|
541
541
|
ref: s,
|
|
542
542
|
model: l.value,
|
|
543
543
|
"auto-label-width": "",
|
|
544
544
|
size: g.size
|
|
545
545
|
}, {
|
|
546
|
-
default: t(() => [o(e(
|
|
546
|
+
default: t(() => [o(e(A), {
|
|
547
547
|
field: "oldPassword",
|
|
548
548
|
label: "当前密码",
|
|
549
549
|
"hide-label": "",
|
|
@@ -552,14 +552,14 @@ const Oe = Object.assign(se, {
|
|
|
552
552
|
message: "请输入当前密码"
|
|
553
553
|
}]
|
|
554
554
|
}, {
|
|
555
|
-
default: t(() => [o(e(
|
|
555
|
+
default: t(() => [o(e(M), {
|
|
556
556
|
modelValue: l.value.oldPassword,
|
|
557
557
|
"onUpdate:modelValue": u[0] || (u[0] = (r) => l.value.oldPassword = r),
|
|
558
558
|
placeholder: "请输入当前密码",
|
|
559
559
|
type: "password"
|
|
560
560
|
}, null, 8, ["modelValue"])]),
|
|
561
561
|
_: 1
|
|
562
|
-
}), o(e(
|
|
562
|
+
}), o(e(A), {
|
|
563
563
|
field: "password",
|
|
564
564
|
label: "新密码",
|
|
565
565
|
"hide-label": "",
|
|
@@ -571,14 +571,14 @@ const Oe = Object.assign(se, {
|
|
|
571
571
|
message: "新密码不能少于10字符"
|
|
572
572
|
}]
|
|
573
573
|
}, {
|
|
574
|
-
default: t(() => [o(e(
|
|
574
|
+
default: t(() => [o(e(M), {
|
|
575
575
|
modelValue: l.value.password,
|
|
576
576
|
"onUpdate:modelValue": u[1] || (u[1] = (r) => l.value.password = r),
|
|
577
577
|
placeholder: "请输入新密码",
|
|
578
578
|
type: "password"
|
|
579
579
|
}, null, 8, ["modelValue"])]),
|
|
580
580
|
_: 1
|
|
581
|
-
}), o(e(
|
|
581
|
+
}), o(e(A), {
|
|
582
582
|
field: "confirmPassword",
|
|
583
583
|
label: "确认密码",
|
|
584
584
|
"hide-label": "",
|
|
@@ -594,19 +594,19 @@ const Oe = Object.assign(se, {
|
|
|
594
594
|
}
|
|
595
595
|
}]
|
|
596
596
|
}, {
|
|
597
|
-
default: t(() => [o(e(
|
|
597
|
+
default: t(() => [o(e(M), {
|
|
598
598
|
modelValue: l.value.confirmPassword,
|
|
599
599
|
"onUpdate:modelValue": u[2] || (u[2] = (r) => l.value.confirmPassword = r),
|
|
600
600
|
placeholder: "请输入确认密码密码",
|
|
601
601
|
type: "password"
|
|
602
602
|
}, null, 8, ["modelValue"])]),
|
|
603
603
|
_: 1
|
|
604
|
-
}, 8, ["rules"]), o(e(
|
|
604
|
+
}, 8, ["rules"]), o(e(A), {
|
|
605
605
|
field: "",
|
|
606
606
|
label: "",
|
|
607
607
|
rules: []
|
|
608
608
|
}, {
|
|
609
|
-
default: t(() => [C("div", Xe, [o(e(
|
|
609
|
+
default: t(() => [C("div", Xe, [o(e(S), {
|
|
610
610
|
type: "primary",
|
|
611
611
|
loading: m.value,
|
|
612
612
|
onClick: a
|
|
@@ -619,7 +619,7 @@ const Oe = Object.assign(se, {
|
|
|
619
619
|
_: 1
|
|
620
620
|
}, 8, ["model", "size"]));
|
|
621
621
|
}
|
|
622
|
-
}), et = /* @__PURE__ */
|
|
622
|
+
}), et = /* @__PURE__ */ H(Ye, [["__scopeId", "data-v-f8bd086f"]]), tt = /* @__PURE__ */ O({
|
|
623
623
|
__name: "AuthkitSetPassword",
|
|
624
624
|
props: {
|
|
625
625
|
size: {
|
|
@@ -627,18 +627,18 @@ const Oe = Object.assign(se, {
|
|
|
627
627
|
required: !0
|
|
628
628
|
}
|
|
629
629
|
},
|
|
630
|
-
setup(
|
|
630
|
+
setup(f) {
|
|
631
631
|
const {
|
|
632
632
|
userProfile: i,
|
|
633
633
|
loading: v,
|
|
634
634
|
fetchUserProfile: m,
|
|
635
635
|
isLoggedIn: s
|
|
636
|
-
} = te(), g = y("hidden"), l =
|
|
636
|
+
} = te(), g = y("hidden"), l = f;
|
|
637
637
|
function a(r) {
|
|
638
638
|
g.value = r;
|
|
639
639
|
}
|
|
640
640
|
function V(r) {
|
|
641
|
-
|
|
641
|
+
W.success("密码修改成功"), g.value = "hidden", m();
|
|
642
642
|
}
|
|
643
643
|
function u() {
|
|
644
644
|
g.value = "update";
|
|
@@ -646,46 +646,46 @@ const Oe = Object.assign(se, {
|
|
|
646
646
|
return ee(() => {
|
|
647
647
|
s.value && !i.value && m();
|
|
648
648
|
}), (r, p) => {
|
|
649
|
-
var n,
|
|
650
|
-
return h(), j(
|
|
649
|
+
var n, d, z, R, x, N, L, K;
|
|
650
|
+
return h(), j(Z, null, [!((n = e(i)) != null && n.email) && !((d = e(i)) != null && d.phone) ? (h(), w(e(F), {
|
|
651
651
|
key: 0,
|
|
652
652
|
title: "先绑定账号"
|
|
653
653
|
}, {
|
|
654
|
-
action: t(() => [o(e(
|
|
654
|
+
action: t(() => [o(e(S), {
|
|
655
655
|
size: l.size,
|
|
656
656
|
type: "primary",
|
|
657
|
-
onClick: p[0] || (p[0] = (
|
|
657
|
+
onClick: p[0] || (p[0] = (_) => a("update"))
|
|
658
658
|
}, {
|
|
659
659
|
default: t(() => [...p[2] || (p[2] = [k(" 去绑定邮箱 ", -1)])]),
|
|
660
660
|
_: 1
|
|
661
661
|
}, 8, ["size"])]),
|
|
662
662
|
default: t(() => [p[3] || (p[3] = k(" 请先绑定邮箱或手机号,再设置登录密码。 ", -1))]),
|
|
663
663
|
_: 1
|
|
664
|
-
})) : P("", !0), ((
|
|
664
|
+
})) : P("", !0), ((z = e(i)) != null && z.email || (R = e(i)) != null && R.phone) && g.value === "hidden" ? (h(), w(e(F), {
|
|
665
665
|
key: 1,
|
|
666
666
|
title: "更改密码"
|
|
667
667
|
}, {
|
|
668
|
-
action: t(() => [o(e(
|
|
668
|
+
action: t(() => [o(e(S), {
|
|
669
669
|
size: l.size,
|
|
670
670
|
type: "primary",
|
|
671
|
-
onClick: p[1] || (p[1] = (
|
|
671
|
+
onClick: p[1] || (p[1] = (_) => a("verify"))
|
|
672
672
|
}, {
|
|
673
673
|
default: t(() => [...p[4] || (p[4] = [k("更改密码", -1)])]),
|
|
674
674
|
_: 1
|
|
675
675
|
}, 8, ["size"])]),
|
|
676
676
|
default: t(() => [p[5] || (p[5] = k(" 为了账户安全,修改密码前会先验证身份。 ", -1))]),
|
|
677
677
|
_: 1
|
|
678
|
-
})) : P("", !0), g.value === "update" ? (h(),
|
|
678
|
+
})) : P("", !0), g.value === "update" ? (h(), w(et, {
|
|
679
679
|
key: 2,
|
|
680
680
|
size: l.size,
|
|
681
681
|
loading: e(v),
|
|
682
682
|
onSubmit: V
|
|
683
|
-
}, null, 8, ["size", "loading"])) : P("", !0), g.value === "verify" && ((
|
|
683
|
+
}, null, 8, ["size", "loading"])) : P("", !0), g.value === "verify" && ((x = e(i)) != null && x.email) ? (h(), w(re, {
|
|
684
684
|
key: 3,
|
|
685
685
|
size: l.size,
|
|
686
|
-
email: (
|
|
686
|
+
email: (N = e(i)) == null ? void 0 : N.email,
|
|
687
687
|
onNext: u
|
|
688
|
-
}, null, 8, ["size", "email"])) : P("", !0), g.value === "verify" && !((
|
|
688
|
+
}, null, 8, ["size", "email"])) : P("", !0), g.value === "verify" && !((L = e(i)) != null && L.email) && ((K = e(i)) != null && K.phone) ? (h(), w(ve, {
|
|
689
689
|
key: 4,
|
|
690
690
|
size: l.size,
|
|
691
691
|
phone: e(i).phone,
|
|
@@ -717,10 +717,10 @@ const Oe = Object.assign(se, {
|
|
|
717
717
|
}
|
|
718
718
|
},
|
|
719
719
|
emits: ["submit"],
|
|
720
|
-
setup(
|
|
720
|
+
setup(f, {
|
|
721
721
|
emit: i
|
|
722
722
|
}) {
|
|
723
|
-
const v = i, m =
|
|
723
|
+
const v = i, m = f, s = y(), g = y(!1), l = y(), a = y({
|
|
724
724
|
email: void 0,
|
|
725
725
|
userToken: void 0,
|
|
726
726
|
emailVerifyId: void 0,
|
|
@@ -733,7 +733,7 @@ const Oe = Object.assign(se, {
|
|
|
733
733
|
g.value = !0;
|
|
734
734
|
const {
|
|
735
735
|
data: p
|
|
736
|
-
} = await
|
|
736
|
+
} = await U.verify.email.retry.post({
|
|
737
737
|
email: a.value.email,
|
|
738
738
|
purpose: m.purpose
|
|
739
739
|
});
|
|
@@ -745,14 +745,14 @@ const Oe = Object.assign(se, {
|
|
|
745
745
|
r || v("submit", a.value);
|
|
746
746
|
});
|
|
747
747
|
}
|
|
748
|
-
return (r, p) => (h(), j("div", at, [o(e(
|
|
748
|
+
return (r, p) => (h(), j("div", at, [o(e(J), {
|
|
749
749
|
ref_key: "formRef",
|
|
750
750
|
ref: l,
|
|
751
751
|
model: a.value,
|
|
752
752
|
size: m.size,
|
|
753
753
|
"auto-label-width": ""
|
|
754
754
|
}, {
|
|
755
|
-
default: t(() => [o(e(
|
|
755
|
+
default: t(() => [o(e(A), {
|
|
756
756
|
field: "email",
|
|
757
757
|
label: "邮箱",
|
|
758
758
|
"hide-label": "",
|
|
@@ -764,7 +764,7 @@ const Oe = Object.assign(se, {
|
|
|
764
764
|
message: "请输入有效的邮箱"
|
|
765
765
|
}]
|
|
766
766
|
}, {
|
|
767
|
-
default: t(() => [o(e(
|
|
767
|
+
default: t(() => [o(e(M), {
|
|
768
768
|
modelValue: a.value.email,
|
|
769
769
|
"onUpdate:modelValue": p[0] || (p[0] = (n) => a.value.email = n),
|
|
770
770
|
placeholder: "请输入邮箱",
|
|
@@ -772,7 +772,7 @@ const Oe = Object.assign(se, {
|
|
|
772
772
|
type: "email"
|
|
773
773
|
}, null, 8, ["modelValue"])]),
|
|
774
774
|
_: 1
|
|
775
|
-
}), o(e(
|
|
775
|
+
}), o(e(A), {
|
|
776
776
|
field: "userToken",
|
|
777
777
|
label: "验证码",
|
|
778
778
|
"hide-label": "",
|
|
@@ -781,7 +781,7 @@ const Oe = Object.assign(se, {
|
|
|
781
781
|
message: "请输入验证码"
|
|
782
782
|
}]
|
|
783
783
|
}, {
|
|
784
|
-
default: t(() => [C("div", lt, [o(e(
|
|
784
|
+
default: t(() => [C("div", lt, [o(e(M), {
|
|
785
785
|
modelValue: a.value.userToken,
|
|
786
786
|
"onUpdate:modelValue": p[1] || (p[1] = (n) => a.value.userToken = n),
|
|
787
787
|
placeholder: "请输入验证码",
|
|
@@ -797,7 +797,7 @@ const Oe = Object.assign(se, {
|
|
|
797
797
|
onSend: V
|
|
798
798
|
}, null, 8, ["size", "loading"])])]),
|
|
799
799
|
_: 1
|
|
800
|
-
}), o(e(
|
|
800
|
+
}), o(e(A), {
|
|
801
801
|
field: "password",
|
|
802
802
|
label: "密码",
|
|
803
803
|
"hide-label": "",
|
|
@@ -809,7 +809,7 @@ const Oe = Object.assign(se, {
|
|
|
809
809
|
message: "密码不能少于10字符"
|
|
810
810
|
}]
|
|
811
811
|
}, {
|
|
812
|
-
default: t(() => [o(e(
|
|
812
|
+
default: t(() => [o(e(M), {
|
|
813
813
|
modelValue: a.value.password,
|
|
814
814
|
"onUpdate:modelValue": p[2] || (p[2] = (n) => a.value.password = n),
|
|
815
815
|
placeholder: "请输入密码",
|
|
@@ -817,7 +817,7 @@ const Oe = Object.assign(se, {
|
|
|
817
817
|
autocomplete: "new-password"
|
|
818
818
|
}, null, 8, ["modelValue"])]),
|
|
819
819
|
_: 1
|
|
820
|
-
}), o(e(
|
|
820
|
+
}), o(e(A), {
|
|
821
821
|
field: "confirmPassword",
|
|
822
822
|
label: "确认密码",
|
|
823
823
|
"hide-label": "",
|
|
@@ -828,12 +828,12 @@ const Oe = Object.assign(se, {
|
|
|
828
828
|
minLength: 10,
|
|
829
829
|
message: "确认密码不能少于10字符"
|
|
830
830
|
}, {
|
|
831
|
-
validator: (n,
|
|
832
|
-
n !== a.value.password ?
|
|
831
|
+
validator: (n, d) => {
|
|
832
|
+
n !== a.value.password ? d("两次密码输入不一致,请重新输入") : d();
|
|
833
833
|
}
|
|
834
834
|
}]
|
|
835
835
|
}, {
|
|
836
|
-
default: t(() => [o(e(
|
|
836
|
+
default: t(() => [o(e(M), {
|
|
837
837
|
modelValue: a.value.confirmPassword,
|
|
838
838
|
"onUpdate:modelValue": p[3] || (p[3] = (n) => a.value.confirmPassword = n),
|
|
839
839
|
placeholder: "请输入确认密码密码",
|
|
@@ -841,7 +841,7 @@ const Oe = Object.assign(se, {
|
|
|
841
841
|
autocomplete: "new-password"
|
|
842
842
|
}, null, 8, ["modelValue"])]),
|
|
843
843
|
_: 1
|
|
844
|
-
}, 8, ["rules"]), o(e(
|
|
844
|
+
}, 8, ["rules"]), o(e(A), {
|
|
845
845
|
field: "referrerId",
|
|
846
846
|
label: "邀请人",
|
|
847
847
|
"hide-label": "",
|
|
@@ -850,14 +850,14 @@ const Oe = Object.assign(se, {
|
|
|
850
850
|
message: "请输入邀请人ID"
|
|
851
851
|
}]
|
|
852
852
|
}, {
|
|
853
|
-
default: t(() => [o(e(
|
|
853
|
+
default: t(() => [o(e(M), {
|
|
854
854
|
modelValue: a.value.referrerId,
|
|
855
855
|
"onUpdate:modelValue": p[4] || (p[4] = (n) => a.value.referrerId = n),
|
|
856
856
|
placeholder: "邀请人ID(可选)",
|
|
857
857
|
autocomplete: "off"
|
|
858
858
|
}, null, 8, ["modelValue"])]),
|
|
859
859
|
_: 1
|
|
860
|
-
}), C("div", it, [o(e(
|
|
860
|
+
}), C("div", it, [o(e(S), {
|
|
861
861
|
type: "primary",
|
|
862
862
|
loading: m.loading,
|
|
863
863
|
long: "",
|
|
@@ -870,7 +870,7 @@ const Oe = Object.assign(se, {
|
|
|
870
870
|
_: 1
|
|
871
871
|
}, 8, ["model", "size"])]));
|
|
872
872
|
}
|
|
873
|
-
}), nt = /* @__PURE__ */
|
|
873
|
+
}), nt = /* @__PURE__ */ H(ot, [["__scopeId", "data-v-3ecbfe7d"]]), st = /* @__PURE__ */ O({
|
|
874
874
|
__name: "AuthkitEmailBinding",
|
|
875
875
|
props: {
|
|
876
876
|
size: {
|
|
@@ -878,12 +878,12 @@ const Oe = Object.assign(se, {
|
|
|
878
878
|
required: !0
|
|
879
879
|
}
|
|
880
880
|
},
|
|
881
|
-
setup(
|
|
881
|
+
setup(f) {
|
|
882
882
|
const {
|
|
883
883
|
userProfile: i,
|
|
884
884
|
loading: v,
|
|
885
885
|
fetchUserProfile: m
|
|
886
|
-
} = te(), s = y("hidden"), g =
|
|
886
|
+
} = te(), s = y("hidden"), g = f;
|
|
887
887
|
function l(u) {
|
|
888
888
|
s.value = u;
|
|
889
889
|
}
|
|
@@ -897,8 +897,8 @@ const Oe = Object.assign(se, {
|
|
|
897
897
|
// API 要求 password,但绑定邮箱时可能不需要,传空字符串
|
|
898
898
|
}, {
|
|
899
899
|
error: p
|
|
900
|
-
} = await
|
|
901
|
-
v.value = !1, p || (
|
|
900
|
+
} = await U.users.update.email.post(r);
|
|
901
|
+
v.value = !1, p || (W.success("绑定成功"), s.value = "hidden", m());
|
|
902
902
|
}
|
|
903
903
|
function V() {
|
|
904
904
|
s.value = "update";
|
|
@@ -906,53 +906,53 @@ const Oe = Object.assign(se, {
|
|
|
906
906
|
return ee(() => {
|
|
907
907
|
i.value || m();
|
|
908
908
|
}), (u, r) => {
|
|
909
|
-
var p, n,
|
|
910
|
-
return h(), j(
|
|
909
|
+
var p, n, d;
|
|
910
|
+
return h(), j(Z, null, [!((p = e(i)) != null && p.email) && s.value === "hidden" ? (h(), w(e(F), {
|
|
911
911
|
key: 0,
|
|
912
912
|
title: "绑定邮箱"
|
|
913
913
|
}, {
|
|
914
|
-
action: t(() => [o(e(
|
|
914
|
+
action: t(() => [o(e(S), {
|
|
915
915
|
size: g.size,
|
|
916
916
|
type: "primary",
|
|
917
|
-
onClick: r[0] || (r[0] = (
|
|
917
|
+
onClick: r[0] || (r[0] = (z) => l("update"))
|
|
918
918
|
}, {
|
|
919
919
|
default: t(() => [...r[2] || (r[2] = [k(" 绑定邮箱 ", -1)])]),
|
|
920
920
|
_: 1
|
|
921
921
|
}, 8, ["size"])]),
|
|
922
922
|
default: t(() => [r[3] || (r[3] = k(" 您还未绑定邮箱,请点击绑定邮箱 ", -1))]),
|
|
923
923
|
_: 1
|
|
924
|
-
})) : P("", !0), (n = e(i)) != null && n.email && s.value === "hidden" ? (h(),
|
|
924
|
+
})) : P("", !0), (n = e(i)) != null && n.email && s.value === "hidden" ? (h(), w(e(F), {
|
|
925
925
|
key: 1,
|
|
926
926
|
title: "更改邮箱"
|
|
927
927
|
}, {
|
|
928
|
-
action: t(() => [o(e(
|
|
928
|
+
action: t(() => [o(e(S), {
|
|
929
929
|
size: g.size,
|
|
930
930
|
type: "primary",
|
|
931
|
-
onClick: r[1] || (r[1] = (
|
|
931
|
+
onClick: r[1] || (r[1] = (z) => l("verify"))
|
|
932
932
|
}, {
|
|
933
933
|
default: t(() => [...r[4] || (r[4] = [k(" 更改邮箱 ", -1)])]),
|
|
934
934
|
_: 1
|
|
935
935
|
}, 8, ["size"])]),
|
|
936
936
|
default: t(() => {
|
|
937
|
-
var
|
|
938
|
-
return [k(
|
|
937
|
+
var z;
|
|
938
|
+
return [k(T(`您绑定的邮箱为${e(me)((z = e(i)) == null ? void 0 : z.email)}`) + " ", 1)];
|
|
939
939
|
}),
|
|
940
940
|
_: 1
|
|
941
|
-
})) : P("", !0), s.value === "update" ? (h(),
|
|
941
|
+
})) : P("", !0), s.value === "update" ? (h(), w(nt, {
|
|
942
942
|
key: 2,
|
|
943
943
|
loading: e(v),
|
|
944
944
|
size: g.size,
|
|
945
945
|
purpose: "bindEmail",
|
|
946
946
|
onSubmit: a
|
|
947
|
-
}, null, 8, ["loading", "size"])) : P("", !0), s.value === "verify" ? (h(),
|
|
947
|
+
}, null, 8, ["loading", "size"])) : P("", !0), s.value === "verify" ? (h(), w(re, {
|
|
948
948
|
key: 3,
|
|
949
949
|
size: g.size,
|
|
950
|
-
email: (
|
|
950
|
+
email: (d = e(i)) == null ? void 0 : d.email,
|
|
951
951
|
onNext: V
|
|
952
952
|
}, null, 8, ["size", "email"])) : P("", !0)], 64);
|
|
953
953
|
};
|
|
954
954
|
}
|
|
955
|
-
}), rt = /* @__PURE__ */
|
|
955
|
+
}), rt = /* @__PURE__ */ H(st, [["__scopeId", "data-v-cc86ecd6"]]), ut = {
|
|
956
956
|
class: "BindPhone"
|
|
957
957
|
}, dt = {
|
|
958
958
|
class: "header"
|
|
@@ -999,10 +999,10 @@ const Oe = Object.assign(se, {
|
|
|
999
999
|
}
|
|
1000
1000
|
},
|
|
1001
1001
|
emits: ["submit", "skip"],
|
|
1002
|
-
setup(
|
|
1002
|
+
setup(f, {
|
|
1003
1003
|
emit: i
|
|
1004
1004
|
}) {
|
|
1005
|
-
const v = i, m =
|
|
1005
|
+
const v = i, m = f, s = y(), g = y(!1), l = y(), a = y({
|
|
1006
1006
|
phone: void 0,
|
|
1007
1007
|
code: void 0
|
|
1008
1008
|
});
|
|
@@ -1011,7 +1011,7 @@ const Oe = Object.assign(se, {
|
|
|
1011
1011
|
g.value = !0;
|
|
1012
1012
|
const {
|
|
1013
1013
|
error: n
|
|
1014
|
-
} = await
|
|
1014
|
+
} = await U.verify.sms.send.post({
|
|
1015
1015
|
phone: a.value.phone,
|
|
1016
1016
|
purpose: "bindPhone"
|
|
1017
1017
|
});
|
|
@@ -1029,14 +1029,14 @@ const Oe = Object.assign(se, {
|
|
|
1029
1029
|
function r() {
|
|
1030
1030
|
v("skip");
|
|
1031
1031
|
}
|
|
1032
|
-
return (p, n) => (h(), j("div", ut, [C("div", dt, [C("h3", ct,
|
|
1032
|
+
return (p, n) => (h(), j("div", ut, [C("div", dt, [C("h3", ct, T(m.title), 1), C("p", ft, T(m.subtitle), 1)]), C("div", mt, [o(e(J), {
|
|
1033
1033
|
ref_key: "formRef",
|
|
1034
1034
|
ref: l,
|
|
1035
1035
|
model: a.value,
|
|
1036
1036
|
size: m.size,
|
|
1037
1037
|
"auto-label-width": ""
|
|
1038
1038
|
}, {
|
|
1039
|
-
default: t(() => [o(e(
|
|
1039
|
+
default: t(() => [o(e(A), {
|
|
1040
1040
|
field: "phone",
|
|
1041
1041
|
label: "手机号",
|
|
1042
1042
|
"hide-label": "",
|
|
@@ -1048,15 +1048,15 @@ const Oe = Object.assign(se, {
|
|
|
1048
1048
|
message: "请输入有效的手机号"
|
|
1049
1049
|
}]
|
|
1050
1050
|
}, {
|
|
1051
|
-
default: t(() => [o(e(
|
|
1051
|
+
default: t(() => [o(e(M), {
|
|
1052
1052
|
modelValue: a.value.phone,
|
|
1053
|
-
"onUpdate:modelValue": n[0] || (n[0] = (
|
|
1053
|
+
"onUpdate:modelValue": n[0] || (n[0] = (d) => a.value.phone = d),
|
|
1054
1054
|
placeholder: "请输入手机号",
|
|
1055
1055
|
autocomplete: "tel",
|
|
1056
1056
|
type: "tel"
|
|
1057
1057
|
}, null, 8, ["modelValue"])]),
|
|
1058
1058
|
_: 1
|
|
1059
|
-
}), o(e(
|
|
1059
|
+
}), o(e(A), {
|
|
1060
1060
|
field: "code",
|
|
1061
1061
|
label: "验证码",
|
|
1062
1062
|
"hide-label": "",
|
|
@@ -1065,9 +1065,9 @@ const Oe = Object.assign(se, {
|
|
|
1065
1065
|
message: "请输入验证码"
|
|
1066
1066
|
}]
|
|
1067
1067
|
}, {
|
|
1068
|
-
default: t(() => [C("div", pt, [o(e(
|
|
1068
|
+
default: t(() => [C("div", pt, [o(e(M), {
|
|
1069
1069
|
modelValue: a.value.code,
|
|
1070
|
-
"onUpdate:modelValue": n[1] || (n[1] = (
|
|
1070
|
+
"onUpdate:modelValue": n[1] || (n[1] = (d) => a.value.code = d),
|
|
1071
1071
|
placeholder: "请输入验证码",
|
|
1072
1072
|
autocomplete: "one-time-code"
|
|
1073
1073
|
}, null, 8, ["modelValue"]), o(ie, {
|
|
@@ -1081,14 +1081,14 @@ const Oe = Object.assign(se, {
|
|
|
1081
1081
|
onSend: V
|
|
1082
1082
|
}, null, 8, ["size", "loading"])])]),
|
|
1083
1083
|
_: 1
|
|
1084
|
-
}), C("div", vt, [o(e(
|
|
1084
|
+
}), C("div", vt, [o(e(S), {
|
|
1085
1085
|
type: "primary",
|
|
1086
1086
|
loading: m.loading,
|
|
1087
1087
|
long: "",
|
|
1088
1088
|
size: m.size,
|
|
1089
1089
|
onClick: u
|
|
1090
1090
|
}, {
|
|
1091
|
-
default: t(() => [k(
|
|
1091
|
+
default: t(() => [k(T(m.submitText), 1)]),
|
|
1092
1092
|
_: 1
|
|
1093
1093
|
}, 8, ["loading", "size"])])]),
|
|
1094
1094
|
_: 1
|
|
@@ -1099,7 +1099,7 @@ const Oe = Object.assign(se, {
|
|
|
1099
1099
|
_: 1
|
|
1100
1100
|
})])) : P("", !0)]));
|
|
1101
1101
|
}
|
|
1102
|
-
}), yt = /* @__PURE__ */
|
|
1102
|
+
}), yt = /* @__PURE__ */ H(ht, [["__scopeId", "data-v-bb70264d"]]), bt = /* @__PURE__ */ O({
|
|
1103
1103
|
__name: "AuthkitPhoneBinding",
|
|
1104
1104
|
props: {
|
|
1105
1105
|
size: {
|
|
@@ -1107,12 +1107,12 @@ const Oe = Object.assign(se, {
|
|
|
1107
1107
|
required: !0
|
|
1108
1108
|
}
|
|
1109
1109
|
},
|
|
1110
|
-
setup(
|
|
1110
|
+
setup(f) {
|
|
1111
1111
|
const {
|
|
1112
1112
|
userProfile: i,
|
|
1113
1113
|
loading: v,
|
|
1114
1114
|
fetchUserProfile: m
|
|
1115
|
-
} = te(), s = y("hidden"), g =
|
|
1115
|
+
} = te(), s = y("hidden"), g = f, l = I(() => {
|
|
1116
1116
|
var r;
|
|
1117
1117
|
const u = ((r = i.value) == null ? void 0 : r.phone) || "";
|
|
1118
1118
|
return u.length < 7 ? u : `${u.slice(0, 3)}****${u.slice(-4)}`;
|
|
@@ -1121,57 +1121,57 @@ const Oe = Object.assign(se, {
|
|
|
1121
1121
|
s.value = u;
|
|
1122
1122
|
}
|
|
1123
1123
|
async function V(u) {
|
|
1124
|
-
var n,
|
|
1124
|
+
var n, d;
|
|
1125
1125
|
v.value = !0;
|
|
1126
|
-
const r = (n = i.value) != null && n.phone ?
|
|
1126
|
+
const r = (n = i.value) != null && n.phone ? U.users.update.myPhone.post({
|
|
1127
1127
|
phone: u.phone,
|
|
1128
1128
|
code: u.code
|
|
1129
|
-
}) :
|
|
1129
|
+
}) : U.auth.bind.phone.post({
|
|
1130
1130
|
phone: u.phone,
|
|
1131
1131
|
code: u.code
|
|
1132
1132
|
}), {
|
|
1133
1133
|
error: p
|
|
1134
1134
|
} = await r;
|
|
1135
|
-
v.value = !1, p || (
|
|
1135
|
+
v.value = !1, p || (W.success((d = i.value) != null && d.phone ? "更改成功" : "绑定成功"), s.value = "hidden", m());
|
|
1136
1136
|
}
|
|
1137
1137
|
return ee(() => {
|
|
1138
1138
|
i.value || m();
|
|
1139
1139
|
}), (u, r) => {
|
|
1140
|
-
var p, n,
|
|
1141
|
-
return h(), j(
|
|
1140
|
+
var p, n, d, z, R;
|
|
1141
|
+
return h(), j(Z, null, [!((p = e(i)) != null && p.phone) && s.value === "hidden" ? (h(), w(e(F), {
|
|
1142
1142
|
key: 0,
|
|
1143
1143
|
title: "绑定手机号"
|
|
1144
1144
|
}, {
|
|
1145
|
-
action: t(() => [o(e(
|
|
1145
|
+
action: t(() => [o(e(S), {
|
|
1146
1146
|
size: g.size,
|
|
1147
1147
|
type: "primary",
|
|
1148
|
-
onClick: r[0] || (r[0] = (
|
|
1148
|
+
onClick: r[0] || (r[0] = (x) => a("update"))
|
|
1149
1149
|
}, {
|
|
1150
1150
|
default: t(() => [...r[2] || (r[2] = [k("绑定手机号", -1)])]),
|
|
1151
1151
|
_: 1
|
|
1152
1152
|
}, 8, ["size"])]),
|
|
1153
1153
|
default: t(() => [r[3] || (r[3] = k(" 您还未绑定手机号,请点击绑定手机号。 ", -1))]),
|
|
1154
1154
|
_: 1
|
|
1155
|
-
})) : P("", !0), (n = e(i)) != null && n.phone && s.value === "hidden" ? (h(),
|
|
1155
|
+
})) : P("", !0), (n = e(i)) != null && n.phone && s.value === "hidden" ? (h(), w(e(F), {
|
|
1156
1156
|
key: 1,
|
|
1157
1157
|
title: "已绑定手机号"
|
|
1158
1158
|
}, {
|
|
1159
|
-
action: t(() => [o(e(
|
|
1159
|
+
action: t(() => [o(e(S), {
|
|
1160
1160
|
size: g.size,
|
|
1161
1161
|
type: "primary",
|
|
1162
|
-
onClick: r[1] || (r[1] = (
|
|
1162
|
+
onClick: r[1] || (r[1] = (x) => a("update"))
|
|
1163
1163
|
}, {
|
|
1164
1164
|
default: t(() => [...r[4] || (r[4] = [k("更改手机号", -1)])]),
|
|
1165
1165
|
_: 1
|
|
1166
1166
|
}, 8, ["size"])]),
|
|
1167
|
-
default: t(() => [k(
|
|
1167
|
+
default: t(() => [k(T(`您绑定的手机号为 ${l.value}`) + " ", 1)]),
|
|
1168
1168
|
_: 1
|
|
1169
|
-
})) : P("", !0), s.value === "update" ? (h(),
|
|
1169
|
+
})) : P("", !0), s.value === "update" ? (h(), w(yt, {
|
|
1170
1170
|
key: 2,
|
|
1171
1171
|
loading: e(v),
|
|
1172
1172
|
size: g.size,
|
|
1173
|
-
title: (
|
|
1174
|
-
subtitle: (
|
|
1173
|
+
title: (d = e(i)) != null && d.phone ? "更改手机号" : "绑定手机号",
|
|
1174
|
+
subtitle: (z = e(i)) != null && z.phone ? "请输入新的手机号并完成短信验证" : "请绑定手机号以完成账号设置",
|
|
1175
1175
|
"submit-text": (R = e(i)) != null && R.phone ? "更改手机号" : "绑定手机号",
|
|
1176
1176
|
onSubmit: V
|
|
1177
1177
|
}, null, 8, ["loading", "size", "title", "subtitle", "submit-text"])) : P("", !0)], 64);
|
|
@@ -1182,13 +1182,13 @@ function ge() {
|
|
|
1182
1182
|
return Y.oauthCallbackUrl ? Y.oauthCallbackUrl : `${window.location.origin}/`;
|
|
1183
1183
|
}
|
|
1184
1184
|
function kt() {
|
|
1185
|
-
const
|
|
1186
|
-
!i.has("token") && !i.has("error") && !i.has("bindSuccess") && sessionStorage.setItem("auth_redirect",
|
|
1185
|
+
const f = window.location.pathname + window.location.search + window.location.hash, i = new URLSearchParams(window.location.search);
|
|
1186
|
+
!i.has("token") && !i.has("error") && !i.has("bindSuccess") && sessionStorage.setItem("auth_redirect", f);
|
|
1187
1187
|
}
|
|
1188
|
-
async function ae(
|
|
1188
|
+
async function ae(f, i) {
|
|
1189
1189
|
const v = Y.appId;
|
|
1190
1190
|
if (!v) {
|
|
1191
|
-
console.error(`${
|
|
1191
|
+
console.error(`${f} OAuth 失败: appId 未配置`);
|
|
1192
1192
|
return;
|
|
1193
1193
|
}
|
|
1194
1194
|
const m = ge(), s = {
|
|
@@ -1198,38 +1198,38 @@ async function ae(c, i) {
|
|
|
1198
1198
|
};
|
|
1199
1199
|
kt();
|
|
1200
1200
|
const g = {
|
|
1201
|
-
github: () =>
|
|
1202
|
-
google: () =>
|
|
1203
|
-
microsoft: () =>
|
|
1204
|
-
wechat: () =>
|
|
1201
|
+
github: () => U.oauth.github.login.get(s),
|
|
1202
|
+
google: () => U.oauth.google.login.get(s),
|
|
1203
|
+
microsoft: () => U.oauth.microsoft.login.get(s),
|
|
1204
|
+
wechat: () => U.oauth.wechat.login.get(s)
|
|
1205
1205
|
};
|
|
1206
1206
|
try {
|
|
1207
1207
|
const {
|
|
1208
1208
|
data: l
|
|
1209
|
-
} = await g[
|
|
1210
|
-
l != null && l.redirectUri ? window.location.href = l.redirectUri : console.error(`${
|
|
1209
|
+
} = await g[f]();
|
|
1210
|
+
l != null && l.redirectUri ? window.location.href = l.redirectUri : console.error(`${f} OAuth 重定向URL为空`);
|
|
1211
1211
|
} catch (l) {
|
|
1212
|
-
console.error(`${
|
|
1212
|
+
console.error(`${f} OAuth 授权失败:`, l);
|
|
1213
1213
|
}
|
|
1214
1214
|
}
|
|
1215
|
-
function _t(
|
|
1215
|
+
function _t(f) {
|
|
1216
1216
|
ae("github", {
|
|
1217
|
-
referrerId:
|
|
1217
|
+
referrerId: f
|
|
1218
1218
|
});
|
|
1219
1219
|
}
|
|
1220
|
-
function wt(
|
|
1220
|
+
function wt(f) {
|
|
1221
1221
|
ae("google", {
|
|
1222
|
-
referrerId:
|
|
1222
|
+
referrerId: f
|
|
1223
1223
|
});
|
|
1224
1224
|
}
|
|
1225
|
-
function zt(
|
|
1225
|
+
function zt(f) {
|
|
1226
1226
|
ae("microsoft", {
|
|
1227
|
-
referrerId:
|
|
1227
|
+
referrerId: f
|
|
1228
1228
|
});
|
|
1229
1229
|
}
|
|
1230
|
-
function Vt(
|
|
1230
|
+
function Vt(f) {
|
|
1231
1231
|
ae("wechat", {
|
|
1232
|
-
referrerId:
|
|
1232
|
+
referrerId: f
|
|
1233
1233
|
});
|
|
1234
1234
|
}
|
|
1235
1235
|
function Ct() {
|
|
@@ -1268,8 +1268,8 @@ const It = {
|
|
|
1268
1268
|
required: !0
|
|
1269
1269
|
}
|
|
1270
1270
|
},
|
|
1271
|
-
setup(
|
|
1272
|
-
const i =
|
|
1271
|
+
setup(f) {
|
|
1272
|
+
const i = f, {
|
|
1273
1273
|
userProfile: v,
|
|
1274
1274
|
fetchUserProfile: m
|
|
1275
1275
|
} = te(), {
|
|
@@ -1279,102 +1279,102 @@ const It = {
|
|
|
1279
1279
|
} = Ct(), l = y("hidden"), a = y(), V = y(!1);
|
|
1280
1280
|
let u;
|
|
1281
1281
|
const r = I(() => {
|
|
1282
|
-
var
|
|
1283
|
-
return ((
|
|
1282
|
+
var c;
|
|
1283
|
+
return ((c = v.value) == null ? void 0 : c[i.provider]) || null;
|
|
1284
1284
|
}), p = I(() => {
|
|
1285
|
-
const
|
|
1286
|
-
return
|
|
1285
|
+
const c = r.value;
|
|
1286
|
+
return c ? c.login || c.name || c.nickname || c.displayName || c.userPrincipalName || c.email || c.mail || c.openid || i.label : "";
|
|
1287
1287
|
}), n = I(() => {
|
|
1288
|
-
const
|
|
1289
|
-
return (
|
|
1290
|
-
}),
|
|
1288
|
+
const c = r.value;
|
|
1289
|
+
return (c == null ? void 0 : c.avatar_url) || (c == null ? void 0 : c.picture) || (c == null ? void 0 : c.headimgurl) || "";
|
|
1290
|
+
}), d = I(() => ({
|
|
1291
1291
|
github: "bi:github",
|
|
1292
1292
|
google: "flat-color-icons:google",
|
|
1293
1293
|
microsoft: "logos:microsoft-icon",
|
|
1294
1294
|
wechat: "ri:wechat-fill"
|
|
1295
|
-
})[i.provider]),
|
|
1296
|
-
const
|
|
1297
|
-
return
|
|
1295
|
+
})[i.provider]), z = I(() => {
|
|
1296
|
+
const c = s.value.authMethods;
|
|
1297
|
+
return c.signUp.email || c.login.emailPassword || c.login.emailCode;
|
|
1298
1298
|
}), R = I(() => {
|
|
1299
|
-
const
|
|
1300
|
-
return
|
|
1301
|
-
}),
|
|
1302
|
-
var
|
|
1303
|
-
return
|
|
1299
|
+
const c = s.value.authMethods;
|
|
1300
|
+
return c.signUp.phone || c.login.phonePassword || c.login.phoneCode;
|
|
1301
|
+
}), x = I(() => {
|
|
1302
|
+
var c;
|
|
1303
|
+
return z.value && !!((c = v.value) != null && c.email);
|
|
1304
|
+
}), N = I(() => {
|
|
1305
|
+
var c;
|
|
1306
|
+
return R.value && !!((c = v.value) != null && c.phone);
|
|
1304
1307
|
}), L = I(() => {
|
|
1305
|
-
|
|
1306
|
-
return
|
|
1308
|
+
const c = [];
|
|
1309
|
+
return x.value && c.push("email"), N.value && c.push("phone"), c;
|
|
1310
|
+
}), K = I(() => z.value || R.value), _ = I(() => l.value !== "hidden" && L.value.length > 1 && !a.value), $ = I(() => {
|
|
1311
|
+
var c;
|
|
1312
|
+
return l.value !== "hidden" && a.value === "email" && !!((c = v.value) != null && c.email);
|
|
1307
1313
|
}), D = I(() => {
|
|
1308
|
-
|
|
1309
|
-
return
|
|
1310
|
-
}),
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
var d;
|
|
1315
|
-
return l.value !== "hidden" && a.value === "phone" && !!((d = v.value) != null && d.phone);
|
|
1316
|
-
}), H = I(() => l.value === "unbind" ? "解绑" : "绑定");
|
|
1317
|
-
function E(d) {
|
|
1318
|
-
if (d === "hidden") {
|
|
1319
|
-
l.value = d, a.value = void 0;
|
|
1314
|
+
var c;
|
|
1315
|
+
return l.value !== "hidden" && a.value === "phone" && !!((c = v.value) != null && c.phone);
|
|
1316
|
+
}), Q = I(() => l.value === "unbind" ? "解绑" : "绑定");
|
|
1317
|
+
function E(c) {
|
|
1318
|
+
if (c === "hidden") {
|
|
1319
|
+
l.value = c, a.value = void 0;
|
|
1320
1320
|
return;
|
|
1321
1321
|
}
|
|
1322
|
-
if (!
|
|
1323
|
-
|
|
1322
|
+
if (!K.value) {
|
|
1323
|
+
c === "bind" && B(), c === "unbind" && X();
|
|
1324
1324
|
return;
|
|
1325
1325
|
}
|
|
1326
|
-
const q =
|
|
1326
|
+
const q = L.value;
|
|
1327
1327
|
if (q.length === 0) {
|
|
1328
|
-
|
|
1328
|
+
W.error("请先绑定应用已开启的邮箱或手机号后再操作第三方账号");
|
|
1329
1329
|
return;
|
|
1330
1330
|
}
|
|
1331
|
-
l.value =
|
|
1331
|
+
l.value = c, a.value = q.length === 1 ? q[0] : void 0;
|
|
1332
1332
|
}
|
|
1333
|
-
function b(
|
|
1334
|
-
a.value =
|
|
1333
|
+
function b(c) {
|
|
1334
|
+
a.value = c;
|
|
1335
1335
|
}
|
|
1336
|
-
async function
|
|
1337
|
-
const
|
|
1338
|
-
if (!
|
|
1336
|
+
async function B() {
|
|
1337
|
+
const c = Y.appId;
|
|
1338
|
+
if (!c) {
|
|
1339
1339
|
console.error(`${i.label} OAuth 失败: appId 未配置`);
|
|
1340
1340
|
return;
|
|
1341
1341
|
}
|
|
1342
1342
|
const q = g(), le = {
|
|
1343
|
-
github: () =>
|
|
1344
|
-
appId:
|
|
1343
|
+
github: () => U.oauth.github.login.get({
|
|
1344
|
+
appId: c,
|
|
1345
1345
|
mode: "bind",
|
|
1346
1346
|
redirectUri: q
|
|
1347
1347
|
}),
|
|
1348
|
-
google: () =>
|
|
1349
|
-
appId:
|
|
1348
|
+
google: () => U.oauth.google.login.get({
|
|
1349
|
+
appId: c,
|
|
1350
1350
|
mode: "bind",
|
|
1351
1351
|
redirectUri: q
|
|
1352
1352
|
}),
|
|
1353
|
-
microsoft: () =>
|
|
1354
|
-
appId:
|
|
1353
|
+
microsoft: () => U.oauth.microsoft.login.get({
|
|
1354
|
+
appId: c,
|
|
1355
1355
|
mode: "bind",
|
|
1356
1356
|
redirectUri: q
|
|
1357
1357
|
}),
|
|
1358
|
-
wechat: () =>
|
|
1359
|
-
appId:
|
|
1358
|
+
wechat: () => U.oauth.wechat.login.get({
|
|
1359
|
+
appId: c,
|
|
1360
1360
|
mode: "bind",
|
|
1361
1361
|
redirectUri: q
|
|
1362
1362
|
})
|
|
1363
1363
|
}, {
|
|
1364
|
-
data:
|
|
1364
|
+
data: G
|
|
1365
1365
|
} = await le[i.provider]();
|
|
1366
|
-
|
|
1366
|
+
G != null && G.redirectUri && (V.value = !0, window.open(G.redirectUri, "_blank"));
|
|
1367
1367
|
}
|
|
1368
1368
|
async function X() {
|
|
1369
1369
|
const {
|
|
1370
|
-
error:
|
|
1371
|
-
} = await
|
|
1370
|
+
error: c
|
|
1371
|
+
} = await U.users.unbind.oauth.post({
|
|
1372
1372
|
provider: i.provider
|
|
1373
1373
|
});
|
|
1374
|
-
|
|
1374
|
+
c || (W.success("解绑成功"), l.value = "hidden", m());
|
|
1375
1375
|
}
|
|
1376
|
-
function
|
|
1377
|
-
l.value === "bind" && (l.value = "hidden",
|
|
1376
|
+
function ue() {
|
|
1377
|
+
l.value === "bind" && (l.value = "hidden", B()), l.value === "unbind" && X();
|
|
1378
1378
|
}
|
|
1379
1379
|
function he() {
|
|
1380
1380
|
V.value && m();
|
|
@@ -1383,56 +1383,56 @@ const It = {
|
|
|
1383
1383
|
v.value || m(), u = setInterval(he, 1e3);
|
|
1384
1384
|
}), fe(() => {
|
|
1385
1385
|
u && clearInterval(u);
|
|
1386
|
-
}), (
|
|
1387
|
-
var le,
|
|
1388
|
-
return h(), j(
|
|
1386
|
+
}), (c, q) => {
|
|
1387
|
+
var le, G;
|
|
1388
|
+
return h(), j(Z, null, [!r.value && l.value === "hidden" ? (h(), w(e(F), {
|
|
1389
1389
|
key: 0,
|
|
1390
1390
|
title: `绑定${i.label}`
|
|
1391
1391
|
}, {
|
|
1392
|
-
action: t(() => [o(e(
|
|
1392
|
+
action: t(() => [o(e(S), {
|
|
1393
1393
|
size: i.size,
|
|
1394
1394
|
type: "primary",
|
|
1395
1395
|
onClick: q[0] || (q[0] = (oe) => E("bind"))
|
|
1396
1396
|
}, {
|
|
1397
|
-
default: t(() => [k(" 绑定" +
|
|
1397
|
+
default: t(() => [k(" 绑定" + T(i.label), 1)]),
|
|
1398
1398
|
_: 1
|
|
1399
1399
|
}, 8, ["size"])]),
|
|
1400
|
-
default: t(() => [k(" 您还未绑定" +
|
|
1400
|
+
default: t(() => [k(" 您还未绑定" + T(i.label) + "账号,请点击绑定。 ", 1)]),
|
|
1401
1401
|
_: 1
|
|
1402
|
-
}, 8, ["title"])) : P("", !0), r.value && l.value === "hidden" ? (h(),
|
|
1402
|
+
}, 8, ["title"])) : P("", !0), r.value && l.value === "hidden" ? (h(), w(e(F), {
|
|
1403
1403
|
key: 1,
|
|
1404
1404
|
title: `解绑${i.label}`
|
|
1405
1405
|
}, {
|
|
1406
|
-
action: t(() => [o(e(
|
|
1406
|
+
action: t(() => [o(e(S), {
|
|
1407
1407
|
size: i.size,
|
|
1408
1408
|
type: "primary",
|
|
1409
1409
|
onClick: q[1] || (q[1] = (oe) => E("unbind"))
|
|
1410
1410
|
}, {
|
|
1411
|
-
default: t(() => [k(" 解绑" +
|
|
1411
|
+
default: t(() => [k(" 解绑" + T(i.label), 1)]),
|
|
1412
1412
|
_: 1
|
|
1413
1413
|
}, 8, ["size"])]),
|
|
1414
|
-
default: t(() => [C("div", It, [n.value ? (h(),
|
|
1414
|
+
default: t(() => [C("div", It, [n.value ? (h(), w(e(se), {
|
|
1415
1415
|
key: 0,
|
|
1416
1416
|
class: "oauth-binding-account__avatar",
|
|
1417
1417
|
"image-url": n.value,
|
|
1418
1418
|
size: 42
|
|
1419
|
-
}, null, 8, ["image-url"])) : (h(),
|
|
1419
|
+
}, null, 8, ["image-url"])) : (h(), w(e(se), {
|
|
1420
1420
|
key: 1,
|
|
1421
1421
|
class: "oauth-binding-account__avatar oauth-binding-account__avatar--placeholder",
|
|
1422
1422
|
size: 42
|
|
1423
1423
|
}, {
|
|
1424
1424
|
default: t(() => [o(e(Te), {
|
|
1425
|
-
icon:
|
|
1425
|
+
icon: d.value,
|
|
1426
1426
|
width: 22
|
|
1427
1427
|
}, null, 8, ["icon"])]),
|
|
1428
1428
|
_: 1
|
|
1429
|
-
})), C("div", $t, [C("div", Pt,
|
|
1429
|
+
})), C("div", $t, [C("div", Pt, T(i.label), 1), C("div", St, T(p.value), 1)])])]),
|
|
1430
1430
|
_: 1
|
|
1431
|
-
}, 8, ["title"])) : P("", !0),
|
|
1431
|
+
}, 8, ["title"])) : P("", !0), _.value ? (h(), w(e(F), {
|
|
1432
1432
|
key: 2,
|
|
1433
|
-
title: `${
|
|
1433
|
+
title: `${Q.value}前验证身份`
|
|
1434
1434
|
}, {
|
|
1435
|
-
action: t(() => [C("div", At, [
|
|
1435
|
+
action: t(() => [C("div", At, [x.value ? (h(), w(e(S), {
|
|
1436
1436
|
key: 0,
|
|
1437
1437
|
size: i.size,
|
|
1438
1438
|
type: "primary",
|
|
@@ -1440,7 +1440,7 @@ const It = {
|
|
|
1440
1440
|
}, {
|
|
1441
1441
|
default: t(() => [...q[4] || (q[4] = [k(" 邮箱验证 ", -1)])]),
|
|
1442
1442
|
_: 1
|
|
1443
|
-
}, 8, ["size"])) : P("", !0),
|
|
1443
|
+
}, 8, ["size"])) : P("", !0), N.value ? (h(), w(e(S), {
|
|
1444
1444
|
key: 1,
|
|
1445
1445
|
size: i.size,
|
|
1446
1446
|
type: "primary",
|
|
@@ -1451,20 +1451,20 @@ const It = {
|
|
|
1451
1451
|
}, 8, ["size"])) : P("", !0)])]),
|
|
1452
1452
|
default: t(() => [q[6] || (q[6] = k(" 请选择一种已绑定的验证方式。 ", -1))]),
|
|
1453
1453
|
_: 1
|
|
1454
|
-
}, 8, ["title"])) : P("", !0),
|
|
1454
|
+
}, 8, ["title"])) : P("", !0), $.value ? (h(), w(re, {
|
|
1455
1455
|
key: 3,
|
|
1456
1456
|
size: i.size,
|
|
1457
1457
|
email: (le = e(v)) == null ? void 0 : le.email,
|
|
1458
|
-
onNext:
|
|
1459
|
-
}, null, 8, ["size", "email"])) : P("", !0),
|
|
1458
|
+
onNext: ue
|
|
1459
|
+
}, null, 8, ["size", "email"])) : P("", !0), D.value ? (h(), w(ve, {
|
|
1460
1460
|
key: 4,
|
|
1461
1461
|
size: i.size,
|
|
1462
|
-
phone: ((
|
|
1463
|
-
onNext:
|
|
1462
|
+
phone: ((G = e(v)) == null ? void 0 : G.phone) || "",
|
|
1463
|
+
onNext: ue
|
|
1464
1464
|
}, null, 8, ["size", "phone"])) : P("", !0)], 64);
|
|
1465
1465
|
};
|
|
1466
1466
|
}
|
|
1467
|
-
}), xt = /* @__PURE__ */
|
|
1467
|
+
}), xt = /* @__PURE__ */ H(Ut, [["__scopeId", "data-v-596b697b"]]), qt = {
|
|
1468
1468
|
class: "dependency-list"
|
|
1469
1469
|
}, Tt = {
|
|
1470
1470
|
class: "label"
|
|
@@ -1483,93 +1483,93 @@ const It = {
|
|
|
1483
1483
|
}
|
|
1484
1484
|
},
|
|
1485
1485
|
emits: ["deleted"],
|
|
1486
|
-
setup(
|
|
1486
|
+
setup(f, {
|
|
1487
1487
|
emit: i
|
|
1488
1488
|
}) {
|
|
1489
|
-
const v =
|
|
1489
|
+
const v = f, m = i, {
|
|
1490
1490
|
userProfile: s,
|
|
1491
1491
|
clearUserProfile: g
|
|
1492
1492
|
} = te(), {
|
|
1493
1493
|
clearAuth: l
|
|
1494
1494
|
} = Be(), a = y("check"), V = y(!1), u = y([]), r = y(!1), p = y(""), n = y(0);
|
|
1495
|
-
let
|
|
1496
|
-
const
|
|
1495
|
+
let d = null;
|
|
1496
|
+
const z = I(() => {
|
|
1497
1497
|
var X;
|
|
1498
1498
|
const E = ((X = s.value) == null ? void 0 : X.email) || "";
|
|
1499
1499
|
if (!E) return "";
|
|
1500
|
-
const [b,
|
|
1501
|
-
return b.length <= 2 ? E : `${b.slice(0, 2)}***@${
|
|
1502
|
-
}), R = y(),
|
|
1500
|
+
const [b, B] = E.split("@");
|
|
1501
|
+
return b.length <= 2 ? E : `${b.slice(0, 2)}***@${B}`;
|
|
1502
|
+
}), R = y(), x = y({
|
|
1503
1503
|
userToken: "",
|
|
1504
1504
|
password: "",
|
|
1505
1505
|
confirmText: ""
|
|
1506
|
-
}),
|
|
1507
|
-
function
|
|
1506
|
+
}), N = y(!1);
|
|
1507
|
+
function L(E, b) {
|
|
1508
1508
|
E !== "注销" ? b('请输入"注销"以确认操作') : b();
|
|
1509
1509
|
}
|
|
1510
|
-
async function
|
|
1510
|
+
async function K() {
|
|
1511
1511
|
var E;
|
|
1512
1512
|
if (V.value = !0, V.value = !1, !((E = s.value) != null && E.email)) {
|
|
1513
|
-
|
|
1513
|
+
W.error("账号未绑定邮箱,无法进行注销验证。请先绑定邮箱");
|
|
1514
1514
|
return;
|
|
1515
1515
|
}
|
|
1516
1516
|
a.value = "sendCode";
|
|
1517
1517
|
}
|
|
1518
|
-
async function
|
|
1518
|
+
async function _() {
|
|
1519
1519
|
var b;
|
|
1520
1520
|
if (!((b = s.value) != null && b.email)) {
|
|
1521
|
-
|
|
1521
|
+
W.error("请先绑定邮箱");
|
|
1522
1522
|
return;
|
|
1523
1523
|
}
|
|
1524
1524
|
r.value = !0;
|
|
1525
1525
|
const {
|
|
1526
1526
|
data: E
|
|
1527
|
-
} = await
|
|
1527
|
+
} = await U.verify.email.retry.post({
|
|
1528
1528
|
email: s.value.email,
|
|
1529
1529
|
purpose: "deleteAccount"
|
|
1530
1530
|
});
|
|
1531
|
-
r.value = !1, E && (p.value = E.emailVerifyId,
|
|
1531
|
+
r.value = !1, E && (p.value = E.emailVerifyId, W.success("验证码已发送"), a.value = "confirm", $());
|
|
1532
1532
|
}
|
|
1533
|
-
function
|
|
1534
|
-
n.value = 60,
|
|
1535
|
-
n.value--, n.value <= 0 &&
|
|
1533
|
+
function $() {
|
|
1534
|
+
n.value = 60, d && clearInterval(d), d = setInterval(() => {
|
|
1535
|
+
n.value--, n.value <= 0 && d && (clearInterval(d), d = null);
|
|
1536
1536
|
}, 1e3);
|
|
1537
1537
|
}
|
|
1538
|
-
async function
|
|
1539
|
-
var
|
|
1540
|
-
if (await ((
|
|
1541
|
-
|
|
1538
|
+
async function D() {
|
|
1539
|
+
var B;
|
|
1540
|
+
if (await ((B = R.value) == null ? void 0 : B.validate())) return;
|
|
1541
|
+
N.value = !0;
|
|
1542
1542
|
const {
|
|
1543
1543
|
error: b
|
|
1544
|
-
} = await
|
|
1545
|
-
password:
|
|
1546
|
-
userToken:
|
|
1544
|
+
} = await U.users.deleteAccount.post({
|
|
1545
|
+
password: x.value.password,
|
|
1546
|
+
userToken: x.value.userToken,
|
|
1547
1547
|
emailVerifyId: p.value,
|
|
1548
|
-
confirmText:
|
|
1548
|
+
confirmText: x.value.confirmText
|
|
1549
1549
|
});
|
|
1550
|
-
|
|
1550
|
+
N.value = !1, b || (a.value = "success", g(), l(), m("deleted"));
|
|
1551
1551
|
}
|
|
1552
|
-
function
|
|
1552
|
+
function Q() {
|
|
1553
1553
|
window.location.href = "/";
|
|
1554
1554
|
}
|
|
1555
|
-
return (E, b) => a.value === "check" ? (h(),
|
|
1555
|
+
return (E, b) => a.value === "check" ? (h(), w(e(F), {
|
|
1556
1556
|
key: 0,
|
|
1557
1557
|
type: "warning",
|
|
1558
1558
|
title: "注销账号"
|
|
1559
1559
|
}, {
|
|
1560
|
-
action: t(() => [o(e(
|
|
1560
|
+
action: t(() => [o(e(S), {
|
|
1561
1561
|
size: v.size,
|
|
1562
1562
|
type: "primary",
|
|
1563
1563
|
status: "danger",
|
|
1564
1564
|
loading: V.value,
|
|
1565
|
-
onClick:
|
|
1565
|
+
onClick: K
|
|
1566
1566
|
}, {
|
|
1567
|
-
default: t(() => [k(
|
|
1567
|
+
default: t(() => [k(T(V.value ? "检查中..." : "开始注销"), 1)]),
|
|
1568
1568
|
_: 1
|
|
1569
1569
|
}, 8, ["size", "loading"])]),
|
|
1570
1570
|
default: t(() => [b[6] || (b[6] = k(" 注销账号后,登录凭据、第三方绑定和当前登录态会被清除;历史订单、用量、审计等业务记录会保留用于对账和安全追溯。 ", -1))]),
|
|
1571
1571
|
_: 1
|
|
1572
|
-
})) : a.value === "dependencies" ? (h(), j(
|
|
1572
|
+
})) : a.value === "dependencies" ? (h(), j(Z, {
|
|
1573
1573
|
key: 1
|
|
1574
1574
|
}, [o(e(F), {
|
|
1575
1575
|
type: "error",
|
|
@@ -1577,57 +1577,57 @@ const It = {
|
|
|
1577
1577
|
}, {
|
|
1578
1578
|
default: t(() => [...b[7] || (b[7] = [k(" 您的账号下还有以下资源,请先处理后再注销: ", -1)])]),
|
|
1579
1579
|
_: 1
|
|
1580
|
-
}), C("div", qt, [(h(!0), j(
|
|
1581
|
-
key:
|
|
1580
|
+
}), C("div", qt, [(h(!0), j(Z, null, ze(u.value, (B) => (h(), j("div", {
|
|
1581
|
+
key: B.type,
|
|
1582
1582
|
class: "dependency-item"
|
|
1583
|
-
}, [C("span", Tt, B
|
|
1583
|
+
}, [C("span", Tt, T(B.label), 1), C("span", Bt, T(B.count) + " 个", 1)]))), 128))]), C("div", Et, [o(e(S), {
|
|
1584
1584
|
size: v.size,
|
|
1585
|
-
onClick: b[0] || (b[0] = (
|
|
1585
|
+
onClick: b[0] || (b[0] = (B) => a.value = "check")
|
|
1586
1586
|
}, {
|
|
1587
1587
|
default: t(() => [...b[8] || (b[8] = [k("返回", -1)])]),
|
|
1588
1588
|
_: 1
|
|
1589
|
-
}, 8, ["size"])])], 64)) : a.value === "sendCode" ? (h(),
|
|
1589
|
+
}, 8, ["size"])])], 64)) : a.value === "sendCode" ? (h(), w(e(F), {
|
|
1590
1590
|
key: 2,
|
|
1591
1591
|
type: "normal",
|
|
1592
1592
|
title: "身份验证"
|
|
1593
1593
|
}, {
|
|
1594
1594
|
action: t(() => [o(e(ce), null, {
|
|
1595
|
-
default: t(() => [o(e(
|
|
1595
|
+
default: t(() => [o(e(S), {
|
|
1596
1596
|
size: v.size,
|
|
1597
|
-
onClick: b[1] || (b[1] = (
|
|
1597
|
+
onClick: b[1] || (b[1] = (B) => a.value = "check")
|
|
1598
1598
|
}, {
|
|
1599
1599
|
default: t(() => [...b[9] || (b[9] = [k("取消", -1)])]),
|
|
1600
1600
|
_: 1
|
|
1601
|
-
}, 8, ["size"]), o(e(
|
|
1601
|
+
}, 8, ["size"]), o(e(S), {
|
|
1602
1602
|
size: v.size,
|
|
1603
1603
|
type: "primary",
|
|
1604
1604
|
loading: r.value,
|
|
1605
|
-
onClick:
|
|
1605
|
+
onClick: _
|
|
1606
1606
|
}, {
|
|
1607
|
-
default: t(() => [k(
|
|
1607
|
+
default: t(() => [k(T(r.value ? "发送中..." : "发送验证码"), 1)]),
|
|
1608
1608
|
_: 1
|
|
1609
1609
|
}, 8, ["size", "loading"])]),
|
|
1610
1610
|
_: 1
|
|
1611
1611
|
})]),
|
|
1612
|
-
default: t(() => [k(" 为确保账号安全,我们将向您的邮箱 " +
|
|
1612
|
+
default: t(() => [k(" 为确保账号安全,我们将向您的邮箱 " + T(z.value) + " 发送验证码 ", 1)]),
|
|
1613
1613
|
_: 1
|
|
1614
|
-
})) : a.value === "confirm" ? (h(), j(
|
|
1614
|
+
})) : a.value === "confirm" ? (h(), j(Z, {
|
|
1615
1615
|
key: 3
|
|
1616
1616
|
}, [o(e(F), {
|
|
1617
1617
|
type: "warning",
|
|
1618
1618
|
title: "确认注销"
|
|
1619
1619
|
}, {
|
|
1620
|
-
default: t(() => [k(" 验证码已发送至 " +
|
|
1620
|
+
default: t(() => [k(" 验证码已发送至 " + T(z.value) + ",注销后该账号将无法继续登录,请谨慎操作 ", 1)]),
|
|
1621
1621
|
_: 1
|
|
1622
|
-
}), o(e(
|
|
1622
|
+
}), o(e(J), {
|
|
1623
1623
|
ref_key: "formRef",
|
|
1624
1624
|
ref: R,
|
|
1625
|
-
model:
|
|
1625
|
+
model: x.value,
|
|
1626
1626
|
size: v.size,
|
|
1627
1627
|
class: "confirm-form",
|
|
1628
1628
|
layout: "vertical"
|
|
1629
1629
|
}, {
|
|
1630
|
-
default: t(() => [o(e(
|
|
1630
|
+
default: t(() => [o(e(A), {
|
|
1631
1631
|
field: "userToken",
|
|
1632
1632
|
label: "邮箱验证码",
|
|
1633
1633
|
rules: [{
|
|
@@ -1635,22 +1635,22 @@ const It = {
|
|
|
1635
1635
|
message: "请输入验证码"
|
|
1636
1636
|
}]
|
|
1637
1637
|
}, {
|
|
1638
|
-
default: t(() => [C("div", Rt, [o(e(
|
|
1639
|
-
modelValue:
|
|
1640
|
-
"onUpdate:modelValue": b[2] || (b[2] = (
|
|
1638
|
+
default: t(() => [C("div", Rt, [o(e(M), {
|
|
1639
|
+
modelValue: x.value.userToken,
|
|
1640
|
+
"onUpdate:modelValue": b[2] || (b[2] = (B) => x.value.userToken = B),
|
|
1641
1641
|
placeholder: "请输入6位验证码",
|
|
1642
1642
|
"max-length": 6,
|
|
1643
1643
|
"allow-clear": ""
|
|
1644
|
-
}, null, 8, ["modelValue"]), o(e(
|
|
1644
|
+
}, null, 8, ["modelValue"]), o(e(S), {
|
|
1645
1645
|
disabled: n.value > 0,
|
|
1646
1646
|
loading: r.value,
|
|
1647
|
-
onClick:
|
|
1647
|
+
onClick: _
|
|
1648
1648
|
}, {
|
|
1649
|
-
default: t(() => [k(
|
|
1649
|
+
default: t(() => [k(T(n.value > 0 ? `${n.value}s 后重发` : "重新发送"), 1)]),
|
|
1650
1650
|
_: 1
|
|
1651
1651
|
}, 8, ["disabled", "loading"])])]),
|
|
1652
1652
|
_: 1
|
|
1653
|
-
}), o(e(
|
|
1653
|
+
}), o(e(A), {
|
|
1654
1654
|
field: "password",
|
|
1655
1655
|
label: "登录密码",
|
|
1656
1656
|
rules: [{
|
|
@@ -1659,43 +1659,43 @@ const It = {
|
|
|
1659
1659
|
}]
|
|
1660
1660
|
}, {
|
|
1661
1661
|
default: t(() => [o(e($e), {
|
|
1662
|
-
modelValue:
|
|
1663
|
-
"onUpdate:modelValue": b[3] || (b[3] = (
|
|
1662
|
+
modelValue: x.value.password,
|
|
1663
|
+
"onUpdate:modelValue": b[3] || (b[3] = (B) => x.value.password = B),
|
|
1664
1664
|
placeholder: "请输入您的登录密码",
|
|
1665
1665
|
"allow-clear": ""
|
|
1666
1666
|
}, null, 8, ["modelValue"])]),
|
|
1667
1667
|
_: 1
|
|
1668
|
-
}), o(e(
|
|
1668
|
+
}), o(e(A), {
|
|
1669
1669
|
field: "confirmText",
|
|
1670
1670
|
label: "请输入「注销」以确认",
|
|
1671
1671
|
rules: [{
|
|
1672
1672
|
required: !0,
|
|
1673
1673
|
message: "请输入确认文字"
|
|
1674
1674
|
}, {
|
|
1675
|
-
validator:
|
|
1675
|
+
validator: L
|
|
1676
1676
|
}]
|
|
1677
1677
|
}, {
|
|
1678
|
-
default: t(() => [o(e(
|
|
1679
|
-
modelValue:
|
|
1680
|
-
"onUpdate:modelValue": b[4] || (b[4] = (
|
|
1678
|
+
default: t(() => [o(e(M), {
|
|
1679
|
+
modelValue: x.value.confirmText,
|
|
1680
|
+
"onUpdate:modelValue": b[4] || (b[4] = (B) => x.value.confirmText = B),
|
|
1681
1681
|
placeholder: "注销",
|
|
1682
1682
|
"allow-clear": ""
|
|
1683
1683
|
}, null, 8, ["modelValue"])]),
|
|
1684
1684
|
_: 1
|
|
1685
|
-
}, 8, ["rules"]), o(e(
|
|
1685
|
+
}, 8, ["rules"]), o(e(A), null, {
|
|
1686
1686
|
default: t(() => [o(e(ce), null, {
|
|
1687
|
-
default: t(() => [o(e(
|
|
1688
|
-
onClick: b[5] || (b[5] = (
|
|
1687
|
+
default: t(() => [o(e(S), {
|
|
1688
|
+
onClick: b[5] || (b[5] = (B) => a.value = "check")
|
|
1689
1689
|
}, {
|
|
1690
1690
|
default: t(() => [...b[10] || (b[10] = [k("取消", -1)])]),
|
|
1691
1691
|
_: 1
|
|
1692
|
-
}), o(e(
|
|
1692
|
+
}), o(e(S), {
|
|
1693
1693
|
type: "primary",
|
|
1694
1694
|
status: "danger",
|
|
1695
|
-
loading:
|
|
1696
|
-
onClick:
|
|
1695
|
+
loading: N.value,
|
|
1696
|
+
onClick: D
|
|
1697
1697
|
}, {
|
|
1698
|
-
default: t(() => [k(
|
|
1698
|
+
default: t(() => [k(T(N.value ? "注销中..." : "确认注销"), 1)]),
|
|
1699
1699
|
_: 1
|
|
1700
1700
|
}, 8, ["loading"])]),
|
|
1701
1701
|
_: 1
|
|
@@ -1703,15 +1703,15 @@ const It = {
|
|
|
1703
1703
|
_: 1
|
|
1704
1704
|
})]),
|
|
1705
1705
|
_: 1
|
|
1706
|
-
}, 8, ["model", "size"])], 64)) : a.value === "success" ? (h(),
|
|
1706
|
+
}, 8, ["model", "size"])], 64)) : a.value === "success" ? (h(), w(e(Pe), {
|
|
1707
1707
|
key: 4,
|
|
1708
1708
|
status: "success",
|
|
1709
1709
|
title: "账号已注销"
|
|
1710
1710
|
}, {
|
|
1711
1711
|
subtitle: t(() => [...b[11] || (b[11] = [k(" 您的账号已成功注销,登录凭据和绑定身份已清除 ", -1)])]),
|
|
1712
|
-
extra: t(() => [o(e(
|
|
1712
|
+
extra: t(() => [o(e(S), {
|
|
1713
1713
|
type: "primary",
|
|
1714
|
-
onClick:
|
|
1714
|
+
onClick: Q
|
|
1715
1715
|
}, {
|
|
1716
1716
|
default: t(() => [...b[12] || (b[12] = [k("返回首页", -1)])]),
|
|
1717
1717
|
_: 1
|
|
@@ -1719,7 +1719,7 @@ const It = {
|
|
|
1719
1719
|
_: 1
|
|
1720
1720
|
})) : P("", !0);
|
|
1721
1721
|
}
|
|
1722
|
-
}), Nt = /* @__PURE__ */
|
|
1722
|
+
}), Nt = /* @__PURE__ */ H(Lt, [["__scopeId", "data-v-da2ecd73"]]), Mt = {
|
|
1723
1723
|
class: "content"
|
|
1724
1724
|
}, Ot = {
|
|
1725
1725
|
class: "left"
|
|
@@ -1728,7 +1728,7 @@ const It = {
|
|
|
1728
1728
|
}, Ft = /* @__PURE__ */ O({
|
|
1729
1729
|
__name: "AuthkitAppSetting",
|
|
1730
1730
|
emits: ["confirm", "cancel"],
|
|
1731
|
-
setup(
|
|
1731
|
+
setup(f, {
|
|
1732
1732
|
expose: i,
|
|
1733
1733
|
emit: v
|
|
1734
1734
|
}) {
|
|
@@ -1737,7 +1737,7 @@ const It = {
|
|
|
1737
1737
|
m("cancel");
|
|
1738
1738
|
}
|
|
1739
1739
|
function g() {
|
|
1740
|
-
|
|
1740
|
+
L.value = !1, m("cancel");
|
|
1741
1741
|
}
|
|
1742
1742
|
const l = y("large"), a = y(["PersonalInformation"]), V = [{
|
|
1743
1743
|
provider: "github",
|
|
@@ -1764,38 +1764,37 @@ const It = {
|
|
|
1764
1764
|
icon: "ri:wechat-fill"
|
|
1765
1765
|
}
|
|
1766
1766
|
}], {
|
|
1767
|
-
appsData: u
|
|
1768
|
-
|
|
1769
|
-
} = pe(), p = I(() => {
|
|
1767
|
+
appsData: u
|
|
1768
|
+
} = pe(), r = I(() => {
|
|
1770
1769
|
const _ = u.value.authMethods;
|
|
1771
1770
|
return _.signUp.email || _.login.emailPassword || _.login.emailCode;
|
|
1772
|
-
}),
|
|
1771
|
+
}), p = I(() => {
|
|
1773
1772
|
const _ = u.value.authMethods;
|
|
1774
1773
|
return _.signUp.phone || _.login.phonePassword || _.login.phoneCode;
|
|
1775
|
-
}),
|
|
1774
|
+
}), n = I(() => {
|
|
1776
1775
|
const _ = u.value.authMethods;
|
|
1777
1776
|
return _.login.emailPassword || _.login.phonePassword;
|
|
1778
|
-
}),
|
|
1779
|
-
var $,
|
|
1780
|
-
return (
|
|
1777
|
+
}), d = I(() => V.filter((_) => {
|
|
1778
|
+
var $, D;
|
|
1779
|
+
return (D = ($ = u.value.oauth) == null ? void 0 : $[_.provider]) == null ? void 0 : D.enabled;
|
|
1781
1780
|
}).map((_) => ({
|
|
1782
1781
|
..._,
|
|
1783
1782
|
path: `OAuthBinding:${_.provider}`
|
|
1784
|
-
}))),
|
|
1783
|
+
}))), z = I(() => {
|
|
1785
1784
|
const _ = [];
|
|
1786
|
-
|
|
1785
|
+
r.value && _.push({
|
|
1787
1786
|
name: "邮箱",
|
|
1788
1787
|
path: "EmailBinding",
|
|
1789
1788
|
meta: {
|
|
1790
1789
|
icon: "ic:baseline-email"
|
|
1791
1790
|
}
|
|
1792
|
-
}),
|
|
1791
|
+
}), p.value && _.push({
|
|
1793
1792
|
name: "手机号",
|
|
1794
1793
|
path: "PhoneBinding",
|
|
1795
1794
|
meta: {
|
|
1796
1795
|
icon: "mingcute:phone-fill"
|
|
1797
1796
|
}
|
|
1798
|
-
}),
|
|
1797
|
+
}), n.value && _.push({
|
|
1799
1798
|
name: "登录密码",
|
|
1800
1799
|
path: "SetPassword",
|
|
1801
1800
|
meta: {
|
|
@@ -1823,42 +1822,40 @@ const It = {
|
|
|
1823
1822
|
},
|
|
1824
1823
|
children: _
|
|
1825
1824
|
}];
|
|
1826
|
-
return
|
|
1825
|
+
return d.value.length > 0 && $.push({
|
|
1827
1826
|
name: "第三方账户",
|
|
1828
1827
|
path: "AccountBinding",
|
|
1829
1828
|
meta: {
|
|
1830
1829
|
icon: "mingcute:link-fill"
|
|
1831
1830
|
},
|
|
1832
|
-
children:
|
|
1831
|
+
children: d.value
|
|
1833
1832
|
}), $;
|
|
1834
|
-
}),
|
|
1835
|
-
function
|
|
1833
|
+
}), R = I(() => d.value.find((_) => _.path === a.value[0]));
|
|
1834
|
+
function x(_) {
|
|
1836
1835
|
const $ = _.path;
|
|
1837
1836
|
a.value = [$];
|
|
1838
1837
|
}
|
|
1839
1838
|
const {
|
|
1840
|
-
changeType:
|
|
1841
|
-
show:
|
|
1839
|
+
changeType: N,
|
|
1840
|
+
show: L
|
|
1842
1841
|
} = Re(m);
|
|
1843
|
-
|
|
1844
|
-
_ && r();
|
|
1845
|
-
}), ne(w, (_) => {
|
|
1842
|
+
de(d, (_) => {
|
|
1846
1843
|
a.value[0].startsWith("OAuthBinding:") && !_.some(($) => $.path === a.value[0]) && (a.value = ["PersonalInformation"]);
|
|
1847
|
-
}),
|
|
1844
|
+
}), de(z, (_) => {
|
|
1848
1845
|
const $ = a.value[0];
|
|
1849
|
-
_.some((
|
|
1850
|
-
var
|
|
1851
|
-
return
|
|
1846
|
+
_.some((Q) => {
|
|
1847
|
+
var E;
|
|
1848
|
+
return Q.path === $ || ((E = Q.children) == null ? void 0 : E.some((b) => b.path === $));
|
|
1852
1849
|
}) || (a.value = ["PersonalInformation"]);
|
|
1853
1850
|
});
|
|
1854
1851
|
function K(_, $) {
|
|
1855
|
-
|
|
1852
|
+
L.value = $, N.value = "编辑";
|
|
1856
1853
|
}
|
|
1857
1854
|
return i({
|
|
1858
1855
|
setData: K
|
|
1859
|
-
}), (_, $) => (h(),
|
|
1860
|
-
visible: e(
|
|
1861
|
-
"onUpdate:visible": $[1] || ($[1] = (
|
|
1856
|
+
}), (_, $) => (h(), w(e(Se), {
|
|
1857
|
+
visible: e(L),
|
|
1858
|
+
"onUpdate:visible": $[1] || ($[1] = (D) => Ve(L) ? L.value = D : null),
|
|
1862
1859
|
"unmount-on-close": "",
|
|
1863
1860
|
"body-class": "AppSettingbodyClass",
|
|
1864
1861
|
"mask-closable": !1,
|
|
@@ -1869,27 +1866,27 @@ const It = {
|
|
|
1869
1866
|
title: t(() => [...$[2] || ($[2] = [k(" 用户信息 ", -1)])]),
|
|
1870
1867
|
default: t(() => [C("div", Mt, [C("div", Ot, [o(Ee, {
|
|
1871
1868
|
"selected-keys": a.value,
|
|
1872
|
-
"onUpdate:selectedKeys": $[0] || ($[0] = (
|
|
1873
|
-
menus:
|
|
1874
|
-
onChange:
|
|
1875
|
-
}, null, 8, ["selected-keys", "menus"])]), C("div", Dt, [a.value[0] === "PersonalInformation" ? (h(),
|
|
1869
|
+
"onUpdate:selectedKeys": $[0] || ($[0] = (D) => a.value = D),
|
|
1870
|
+
menus: z.value,
|
|
1871
|
+
onChange: x
|
|
1872
|
+
}, null, 8, ["selected-keys", "menus"])]), C("div", Dt, [a.value[0] === "PersonalInformation" ? (h(), w(je, {
|
|
1876
1873
|
key: 0,
|
|
1877
1874
|
size: l.value
|
|
1878
|
-
}, null, 8, ["size"])) : P("", !0), a.value[0] === "EmailBinding" ? (h(),
|
|
1875
|
+
}, null, 8, ["size"])) : P("", !0), a.value[0] === "EmailBinding" ? (h(), w(rt, {
|
|
1879
1876
|
key: 1,
|
|
1880
1877
|
size: l.value
|
|
1881
|
-
}, null, 8, ["size"])) : P("", !0), a.value[0] === "PhoneBinding" ? (h(),
|
|
1878
|
+
}, null, 8, ["size"])) : P("", !0), a.value[0] === "PhoneBinding" ? (h(), w(bt, {
|
|
1882
1879
|
key: 2,
|
|
1883
1880
|
size: l.value
|
|
1884
|
-
}, null, 8, ["size"])) : P("", !0), a.value[0] === "SetPassword" ? (h(),
|
|
1881
|
+
}, null, 8, ["size"])) : P("", !0), a.value[0] === "SetPassword" ? (h(), w(tt, {
|
|
1885
1882
|
key: 3,
|
|
1886
1883
|
size: l.value
|
|
1887
|
-
}, null, 8, ["size"])) : P("", !0),
|
|
1884
|
+
}, null, 8, ["size"])) : P("", !0), R.value ? (h(), w(xt, {
|
|
1888
1885
|
key: 4,
|
|
1889
|
-
provider:
|
|
1890
|
-
label:
|
|
1886
|
+
provider: R.value.provider,
|
|
1887
|
+
label: R.value.name,
|
|
1891
1888
|
size: l.value
|
|
1892
|
-
}, null, 8, ["provider", "label", "size"])) : P("", !0), a.value[0] === "AccountDelete" ? (h(),
|
|
1889
|
+
}, null, 8, ["provider", "label", "size"])) : P("", !0), a.value[0] === "AccountDelete" ? (h(), w(Nt, {
|
|
1893
1890
|
key: 5,
|
|
1894
1891
|
size: l.value,
|
|
1895
1892
|
onDeleted: g
|
|
@@ -1897,7 +1894,7 @@ const It = {
|
|
|
1897
1894
|
_: 1
|
|
1898
1895
|
}, 8, ["visible", "width"]));
|
|
1899
1896
|
}
|
|
1900
|
-
}), sa = /* @__PURE__ */
|
|
1897
|
+
}), sa = /* @__PURE__ */ H(Ft, [["__scopeId", "data-v-dd773794"]]);
|
|
1901
1898
|
export {
|
|
1902
1899
|
sa as A,
|
|
1903
1900
|
yt as B,
|
|
@@ -1907,7 +1904,7 @@ export {
|
|
|
1907
1904
|
ie as S,
|
|
1908
1905
|
bt as _,
|
|
1909
1906
|
nt as a,
|
|
1910
|
-
|
|
1907
|
+
re as b,
|
|
1911
1908
|
je as c,
|
|
1912
1909
|
ve as d,
|
|
1913
1910
|
tt as e,
|