@huyooo/ui 0.16.0 → 0.17.1
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-v80fEiq0.js → AuthkitAppSetting-jfSU-9BO.js} +655 -646
- package/dist/{AuthkitGithubBinding-CVhCM6AX.js → AuthkitGithubBinding-Co5Z_cD0.js} +260 -255
- package/dist/{Clipboard-R3AURqvU.js → Clipboard-Bo7gdpR6.js} +1 -1
- package/dist/{Contact-B3AMSHoN.js → Contact-B09Z0y_t.js} +2 -2
- package/dist/{FeedbackModal.vue_vue_type_script_setup_true_lang-CAGBbiZD.js → FeedbackModal.vue_vue_type_script_setup_true_lang-M1NQ-rx-.js} +3 -3
- package/dist/{MessageHandle-BMhGWVHD.js → MessageHandle-BG12aX0i.js} +2 -2
- package/dist/{MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-ByB_YaVb.js → MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-gsjL6yAe.js} +2 -2
- package/dist/{PaySubscriptions-D3g1OhiA.js → PaySubscriptions-BFq89DCI.js} +4 -4
- package/dist/{PricingPlans-DXea7rl0.js → PricingPlans-TZT6j_Jq.js} +4 -4
- package/dist/{ReferrerReferees-BxmZ1w_L.js → ReferrerReferees-jWOIvXrk.js} +18 -18
- package/dist/{Upload.vue_vue_type_script_setup_true_lang-CXr8D4VG.js → Upload.vue_vue_type_script_setup_true_lang-B6NOZjK0.js} +1 -1
- package/dist/{UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-6xQNhFk3.js → UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-BVtXbwch.js} +57 -57
- package/dist/{WidthContainer-DVZQV6sM.js → WidthContainer-Ct44rKyS.js} +9 -9
- package/dist/{apiClients-DT7o0IpO.js → apiClients-DrGX2iJy.js} +81 -78
- package/dist/authkit.js +9 -9
- package/dist/common/authPanelWidth.d.ts +2 -0
- package/dist/common.js +1 -1
- package/dist/components/UserMenu/parts/UserBasicInformation.vue.d.ts +2 -2
- package/dist/composables/Authkit/readInviteCodeFromLocation.d.ts +2 -0
- package/dist/composables/Authkit/useAuthkitAuth.d.ts +1 -1
- package/dist/composables/Authkit/useOauth.d.ts +5 -9
- package/dist/composables.js +13 -13
- package/dist/feedback.js +2 -2
- package/dist/main.js +29 -29
- 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 +764 -94
- package/dist/types/api/auth.generated.d.ts +24 -20
- package/dist/types/api/billing.generated.d.ts +206 -514
- package/dist/types/api/ones.generated.d.ts +4 -0
- package/dist/types/api.d.ts +1 -1
- package/dist/types/user.d.ts +1 -1
- package/dist/upload.js +2 -2
- package/dist/{useAuthkitAppsAuthPageInfo-DScDQfj5.js → useAuthkitAppsAuthPageInfo-DWd0bDP-.js} +1 -1
- package/dist/{useAuthkitAuth-DpdKRuJm.js → useAuthkitAuth-DmS-H7M2.js} +60 -53
- package/dist/{useAuthkitCreateAndUpdate-MzA4qtTh.js → useAuthkitCreateAndUpdate-oo9517Gj.js} +1 -1
- package/dist/{useAuthkitUsersProfile-aw_A7IWb.js → useAuthkitUsersProfile-BZDk21c8.js} +2 -2
- package/dist/{useBillingStatusOptions-CAsu1hrf.js → useBillingStatusOptions-B7xLU3fs.js} +1 -1
- package/dist/{useEnsureAuthenticated-BEKhtQAl.js → useEnsureAuthenticated-BuIbxqsO.js} +2 -2
- package/dist/{useLegalLinks-BijRF_ZD.js → useLegalLinks--qFGF7lO.js} +2 -2
- package/dist/{useMessageNotifications-CFku0c2R.js → useMessageNotifications-D85_-mDq.js} +1 -1
- package/dist/{useRoutePermission-v4_0B-aO.js → useRoutePermission-chEi45Nb.js} +2 -2
- package/dist/{useSEO-CbHCw4gq.js → useSEO-C6DLicfe.js} +1 -1
- package/dist/{useSubscriptionCheckout-BjPiHSjA.js → useSubscriptionCheckout-BRk5h9aC.js} +3 -3
- package/dist/{useTableHandle-TDJa_Czn.js → useTableHandle-BdujaiNX.js} +1 -1
- package/dist/{useUploadCos-DOHnz2MP.js → useUploadCos-BRKRzSy3.js} +1 -1
- package/dist/user.js +1 -1
- package/dist/utils/apiMiddlewares.d.ts +4 -4
- package/package.json +2 -1
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
/* empty css */
|
|
2
2
|
/* empty css */
|
|
3
|
-
import { U as
|
|
4
|
-
import { defineComponent as O, computed as
|
|
5
|
-
import { Form as J, FormItem as A, Avatar as se, Input as M, Textarea as
|
|
3
|
+
import { U as be } from "./index-D3Kp6R4z.js";
|
|
4
|
+
import { defineComponent as O, computed as $, openBlock as h, createElementBlock as j, normalizeStyle as ke, normalizeClass as _e, createElementVNode as C, ref as y, createBlock as w, unref as e, withCtx as a, createVNode as i, createTextVNode as k, onMounted as X, onUnmounted as fe, withDirectives as we, toDisplayString as T, vShow as ze, Fragment as Z, createCommentVNode as P, renderList as Ve, watch as de, isRef as Ce } from "vue";
|
|
5
|
+
import { Form as J, FormItem as A, Avatar as se, Input as M, Textarea as $e, Button as S, Message as W, Alert as D, Link as Ie, Space as ce, InputPassword as Pe, Result as Se, Modal as Ae } from "@arco-design/web-vue";
|
|
6
6
|
/* empty css */
|
|
7
|
-
import { e as U, g as
|
|
7
|
+
import { e as U, g as ee, p as me } from "./apiClients-DrGX2iJy.js";
|
|
8
8
|
/* empty css */
|
|
9
|
-
import { u as
|
|
10
|
-
import { _ as
|
|
9
|
+
import { u as Ue } from "./useUploadCos-BRKRzSy3.js";
|
|
10
|
+
import { _ as xe, g as qe, i as Te } from "./plugin-vue_export-helper-LjDO2Zua.js";
|
|
11
11
|
import { _ as H } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
12
|
-
import { u as te } from "./useAuthkitUsersProfile-
|
|
13
|
-
import { Icon as
|
|
14
|
-
import { u as pe } from "./useAuthkitAppsAuthPageInfo-
|
|
15
|
-
import { u as
|
|
12
|
+
import { u as te } from "./useAuthkitUsersProfile-BZDk21c8.js";
|
|
13
|
+
import { Icon as Be } from "@iconify/vue";
|
|
14
|
+
import { u as pe } from "./useAuthkitAppsAuthPageInfo-DWd0bDP-.js";
|
|
15
|
+
import { u as Re } from "./useAuthkitAuth-DmS-H7M2.js";
|
|
16
16
|
import { M as Ee } from "./Menu-Cy2ZPeaz.js";
|
|
17
|
-
import { u as
|
|
18
|
-
const
|
|
17
|
+
import { u as Le } from "./useAuthkitCreateAndUpdate-oo9517Gj.js";
|
|
18
|
+
const Ne = O({
|
|
19
19
|
name: "IconCamera",
|
|
20
20
|
props: {
|
|
21
21
|
size: {
|
|
@@ -42,49 +42,49 @@ const Le = O({
|
|
|
42
42
|
click: (f) => !0
|
|
43
43
|
},
|
|
44
44
|
setup(f, {
|
|
45
|
-
emit:
|
|
45
|
+
emit: l
|
|
46
46
|
}) {
|
|
47
|
-
const
|
|
48
|
-
[`${
|
|
49
|
-
}]),
|
|
50
|
-
const
|
|
51
|
-
return f.size && (
|
|
47
|
+
const g = qe("icon"), m = $(() => [g, `${g}-camera`, {
|
|
48
|
+
[`${g}-spin`]: f.spin
|
|
49
|
+
}]), r = $(() => {
|
|
50
|
+
const o = {};
|
|
51
|
+
return f.size && (o.fontSize = Te(f.size) ? `${f.size}px` : f.size), f.rotate && (o.transform = `rotate(${f.rotate}deg)`), o;
|
|
52
52
|
});
|
|
53
53
|
return {
|
|
54
54
|
cls: m,
|
|
55
|
-
innerStyle:
|
|
56
|
-
onClick: (
|
|
57
|
-
|
|
55
|
+
innerStyle: r,
|
|
56
|
+
onClick: (o) => {
|
|
57
|
+
l("click", o);
|
|
58
58
|
}
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
|
-
}),
|
|
62
|
-
function
|
|
61
|
+
}), Me = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
|
|
62
|
+
function Oe(f, l, g, m, r, v) {
|
|
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:
|
|
69
|
-
style:
|
|
68
|
+
class: _e(f.cls),
|
|
69
|
+
style: ke(f.innerStyle),
|
|
70
70
|
"stroke-width": f.strokeWidth,
|
|
71
71
|
"stroke-linecap": f.strokeLinecap,
|
|
72
72
|
"stroke-linejoin": f.strokeLinejoin,
|
|
73
|
-
onClick:
|
|
74
|
-
},
|
|
73
|
+
onClick: l[0] || (l[0] = (...o) => f.onClick && f.onClick(...o))
|
|
74
|
+
}, l[1] || (l[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
|
-
}, null, -1)]), 14,
|
|
76
|
+
}, null, -1)]), 14, Me);
|
|
77
77
|
}
|
|
78
|
-
var ne = /* @__PURE__ */
|
|
79
|
-
const
|
|
80
|
-
install: (f,
|
|
81
|
-
var
|
|
82
|
-
const m = (
|
|
78
|
+
var ne = /* @__PURE__ */ xe(Ne, [["render", Oe]]);
|
|
79
|
+
const Fe = Object.assign(ne, {
|
|
80
|
+
install: (f, l) => {
|
|
81
|
+
var g;
|
|
82
|
+
const m = (g = l == null ? void 0 : l.iconPrefix) != null ? g : "";
|
|
83
83
|
f.component(m + ne.name, ne);
|
|
84
84
|
}
|
|
85
85
|
}), De = {
|
|
86
86
|
class: "handle"
|
|
87
|
-
},
|
|
87
|
+
}, je = /* @__PURE__ */ O({
|
|
88
88
|
__name: "AuthkitPersonalInformation",
|
|
89
89
|
props: {
|
|
90
90
|
size: {
|
|
@@ -94,87 +94,87 @@ const Oe = Object.assign(ne, {
|
|
|
94
94
|
},
|
|
95
95
|
emits: ["submit"],
|
|
96
96
|
setup(f, {
|
|
97
|
-
emit:
|
|
97
|
+
emit: l
|
|
98
98
|
}) {
|
|
99
|
-
const
|
|
99
|
+
const g = l, m = f, r = y({
|
|
100
100
|
id: void 0,
|
|
101
101
|
nickname: "",
|
|
102
102
|
description: "",
|
|
103
103
|
avatar: "",
|
|
104
104
|
avatarUrl: ""
|
|
105
|
-
}),
|
|
105
|
+
}), v = y(!1), o = y(), t = y(!1), V = {
|
|
106
106
|
color: "var(--huyooo-accent-primary)"
|
|
107
107
|
};
|
|
108
108
|
async function u() {
|
|
109
|
-
|
|
109
|
+
t.value = !0;
|
|
110
110
|
const {
|
|
111
|
-
data:
|
|
111
|
+
data: s
|
|
112
112
|
} = await U.users.profile.post({});
|
|
113
|
-
|
|
113
|
+
t.value = !1, s && (r.value.id = s.id, r.value.nickname = s.nickname, r.value.description = s.description, r.value.avatar = s.avatar, r.value.avatarUrl = s.avatarUrl);
|
|
114
114
|
}
|
|
115
|
-
async function
|
|
116
|
-
if (!await
|
|
117
|
-
|
|
115
|
+
async function n() {
|
|
116
|
+
if (!await o.value.validate()) {
|
|
117
|
+
t.value = !0;
|
|
118
118
|
const d = {
|
|
119
|
-
id:
|
|
120
|
-
nickname:
|
|
121
|
-
description:
|
|
122
|
-
avatar:
|
|
119
|
+
id: r.value.id,
|
|
120
|
+
nickname: r.value.nickname,
|
|
121
|
+
description: r.value.description,
|
|
122
|
+
avatar: r.value.avatar
|
|
123
123
|
}, {
|
|
124
124
|
data: z,
|
|
125
|
-
error:
|
|
125
|
+
error: E
|
|
126
126
|
} = await U.users.update.baseInfo.post(d);
|
|
127
|
-
|
|
127
|
+
t.value = !1, !E && z && (W.success("更新成功"), r.value.avatarUrl = z.avatarUrl, g("submit"));
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
u();
|
|
131
131
|
const p = () => {
|
|
132
132
|
const {
|
|
133
|
-
uploadFile:
|
|
134
|
-
} =
|
|
133
|
+
uploadFile: s
|
|
134
|
+
} = Ue(), d = document.createElement("input");
|
|
135
135
|
d.type = "file", d.accept = "image/*", d.style.display = "none", document.body.append(d), d.addEventListener("change", async (z) => {
|
|
136
136
|
var N;
|
|
137
137
|
const x = (N = z.target.files) == null ? void 0 : N[0];
|
|
138
138
|
if (x) {
|
|
139
|
-
|
|
139
|
+
v.value = !0;
|
|
140
140
|
try {
|
|
141
|
-
|
|
142
|
-
bucketId:
|
|
141
|
+
s({
|
|
142
|
+
bucketId: ee.avatarBucketId,
|
|
143
143
|
file: x,
|
|
144
144
|
onFileFinish(L, K, _) {
|
|
145
|
-
|
|
146
|
-
const
|
|
147
|
-
id:
|
|
148
|
-
nickname:
|
|
149
|
-
description:
|
|
145
|
+
v.value = !0;
|
|
146
|
+
const I = {
|
|
147
|
+
id: r.value.id,
|
|
148
|
+
nickname: r.value.nickname,
|
|
149
|
+
description: r.value.description,
|
|
150
150
|
avatar: _.Key
|
|
151
151
|
};
|
|
152
152
|
(async () => {
|
|
153
153
|
const {
|
|
154
|
-
error:
|
|
155
|
-
} = await U.users.update.baseInfo.post(
|
|
156
|
-
|
|
154
|
+
error: F
|
|
155
|
+
} = await U.users.update.baseInfo.post(I);
|
|
156
|
+
v.value = !1, F || (W.success("更新成功"), u(), g("submit"));
|
|
157
157
|
})();
|
|
158
158
|
},
|
|
159
159
|
onError(L) {
|
|
160
|
-
console.error("上传图片失败"),
|
|
160
|
+
console.error("上传图片失败"), v.value = !1;
|
|
161
161
|
}
|
|
162
162
|
});
|
|
163
163
|
} catch (L) {
|
|
164
|
-
console.error("上传图片失败", L),
|
|
164
|
+
console.error("上传图片失败", L), v.value = !1;
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
167
|
d.remove();
|
|
168
168
|
}), d.click();
|
|
169
169
|
};
|
|
170
|
-
return (
|
|
170
|
+
return (s, d) => (h(), w(e(J), {
|
|
171
171
|
ref_key: "formRef",
|
|
172
|
-
ref:
|
|
173
|
-
model:
|
|
172
|
+
ref: o,
|
|
173
|
+
model: r.value,
|
|
174
174
|
"auto-label-width": "",
|
|
175
175
|
size: m.size
|
|
176
176
|
}, {
|
|
177
|
-
default:
|
|
177
|
+
default: a(() => [i(e(A), {
|
|
178
178
|
field: "avatar",
|
|
179
179
|
label: "头像",
|
|
180
180
|
rules: [{
|
|
@@ -182,18 +182,18 @@ const Oe = Object.assign(ne, {
|
|
|
182
182
|
message: "请上传头像"
|
|
183
183
|
}]
|
|
184
184
|
}, {
|
|
185
|
-
default:
|
|
186
|
-
"image-url":
|
|
185
|
+
default: a(() => [i(e(se), {
|
|
186
|
+
"image-url": r.value.avatarUrl,
|
|
187
187
|
size: 42,
|
|
188
188
|
"object-fit": "cover",
|
|
189
189
|
"trigger-icon-style": V,
|
|
190
190
|
onClick: p
|
|
191
191
|
}, {
|
|
192
|
-
"trigger-icon":
|
|
192
|
+
"trigger-icon": a(() => [i(e(Fe))]),
|
|
193
193
|
_: 1
|
|
194
194
|
}, 8, ["image-url"])]),
|
|
195
195
|
_: 1
|
|
196
|
-
}),
|
|
196
|
+
}), i(e(A), {
|
|
197
197
|
field: "nickname",
|
|
198
198
|
label: "昵称",
|
|
199
199
|
rules: [{
|
|
@@ -201,13 +201,13 @@ const Oe = Object.assign(ne, {
|
|
|
201
201
|
message: "请输入昵称"
|
|
202
202
|
}]
|
|
203
203
|
}, {
|
|
204
|
-
default:
|
|
205
|
-
modelValue:
|
|
206
|
-
"onUpdate:modelValue": d[0] || (d[0] = (z) =>
|
|
204
|
+
default: a(() => [i(e(M), {
|
|
205
|
+
modelValue: r.value.nickname,
|
|
206
|
+
"onUpdate:modelValue": d[0] || (d[0] = (z) => r.value.nickname = z),
|
|
207
207
|
placeholder: "请输入昵称"
|
|
208
208
|
}, null, 8, ["modelValue"])]),
|
|
209
209
|
_: 1
|
|
210
|
-
}),
|
|
210
|
+
}), i(e(A), {
|
|
211
211
|
field: "description",
|
|
212
212
|
label: "简介",
|
|
213
213
|
rules: [{
|
|
@@ -215,9 +215,9 @@ const Oe = Object.assign(ne, {
|
|
|
215
215
|
message: "请输入描述"
|
|
216
216
|
}]
|
|
217
217
|
}, {
|
|
218
|
-
default:
|
|
219
|
-
modelValue:
|
|
220
|
-
"onUpdate:modelValue": d[1] || (d[1] = (z) =>
|
|
218
|
+
default: a(() => [i(e($e), {
|
|
219
|
+
modelValue: r.value.description,
|
|
220
|
+
"onUpdate:modelValue": d[1] || (d[1] = (z) => r.value.description = z),
|
|
221
221
|
placeholder: "请输入描述",
|
|
222
222
|
"allow-clear": "",
|
|
223
223
|
"auto-size": {
|
|
@@ -225,17 +225,17 @@ const Oe = Object.assign(ne, {
|
|
|
225
225
|
}
|
|
226
226
|
}, null, 8, ["modelValue"])]),
|
|
227
227
|
_: 1
|
|
228
|
-
}),
|
|
228
|
+
}), i(e(A), {
|
|
229
229
|
field: "",
|
|
230
230
|
label: "",
|
|
231
231
|
rules: []
|
|
232
232
|
}, {
|
|
233
|
-
default:
|
|
233
|
+
default: a(() => [C("div", De, [i(e(S), {
|
|
234
234
|
type: "primary",
|
|
235
|
-
loading:
|
|
236
|
-
onClick:
|
|
235
|
+
loading: t.value,
|
|
236
|
+
onClick: n
|
|
237
237
|
}, {
|
|
238
|
-
default:
|
|
238
|
+
default: a(() => [...d[2] || (d[2] = [k(" 提交 ", -1)])]),
|
|
239
239
|
_: 1
|
|
240
240
|
}, 8, ["loading"])])]),
|
|
241
241
|
_: 1
|
|
@@ -243,7 +243,7 @@ const Oe = Object.assign(ne, {
|
|
|
243
243
|
_: 1
|
|
244
244
|
}, 8, ["model", "size"]));
|
|
245
245
|
}
|
|
246
|
-
}),
|
|
246
|
+
}), He = /* @__PURE__ */ H(je, [["__scopeId", "data-v-1d138326"]]), We = /* @__PURE__ */ O({
|
|
247
247
|
__name: "AuthkitSendVerifyCode",
|
|
248
248
|
props: {
|
|
249
249
|
size: {
|
|
@@ -258,44 +258,44 @@ const Oe = Object.assign(ne, {
|
|
|
258
258
|
},
|
|
259
259
|
emits: ["send"],
|
|
260
260
|
setup(f, {
|
|
261
|
-
expose:
|
|
262
|
-
emit:
|
|
261
|
+
expose: l,
|
|
262
|
+
emit: g
|
|
263
263
|
}) {
|
|
264
|
-
const m =
|
|
265
|
-
let
|
|
266
|
-
const
|
|
267
|
-
|
|
264
|
+
const m = g, r = f, v = y(!1);
|
|
265
|
+
let o;
|
|
266
|
+
const t = y(0), V = $(() => t.value.toString().padStart(2, "0")), u = $(() => t.value > 0), n = () => {
|
|
267
|
+
v.value && (t.value <= 0 ? (clearInterval(o), v.value = !1) : t.value--);
|
|
268
268
|
};
|
|
269
269
|
function p() {
|
|
270
270
|
m("send");
|
|
271
271
|
}
|
|
272
|
-
function
|
|
273
|
-
|
|
272
|
+
function s() {
|
|
273
|
+
t.value = 60, v.value = !0, o && clearInterval(o), o = setInterval(n, 1e3);
|
|
274
274
|
}
|
|
275
|
-
return
|
|
276
|
-
}),
|
|
277
|
-
startCountFn:
|
|
275
|
+
return X(() => {
|
|
276
|
+
}), l({
|
|
277
|
+
startCountFn: s
|
|
278
278
|
}), fe(() => {
|
|
279
|
-
|
|
279
|
+
o && clearInterval(o);
|
|
280
280
|
}), (d, z) => (h(), w(e(S), {
|
|
281
281
|
class: "OAuthItem",
|
|
282
282
|
type: "primary",
|
|
283
|
-
size:
|
|
283
|
+
size: r.size,
|
|
284
284
|
disabled: u.value,
|
|
285
|
-
loading:
|
|
285
|
+
loading: r.loading,
|
|
286
286
|
onClick: p
|
|
287
287
|
}, {
|
|
288
|
-
default:
|
|
288
|
+
default: a(() => [z[0] || (z[0] = C("span", null, " 发送验证码", -1)), we(C("span", {
|
|
289
289
|
class: "verify-code-timer"
|
|
290
|
-
}, T(`(${V.value})`), 513), [[
|
|
290
|
+
}, T(`(${V.value})`), 513), [[ze, u.value]])]),
|
|
291
291
|
_: 1
|
|
292
292
|
}, 8, ["size", "disabled", "loading"]));
|
|
293
293
|
}
|
|
294
|
-
}), ie = /* @__PURE__ */ H(
|
|
294
|
+
}), ie = /* @__PURE__ */ H(We, [["__scopeId", "data-v-2883dc6d"]]), Ke = {
|
|
295
295
|
class: "sendVerifyCodeItem"
|
|
296
|
-
},
|
|
296
|
+
}, Ge = {
|
|
297
297
|
class: "handle"
|
|
298
|
-
},
|
|
298
|
+
}, Ze = /* @__PURE__ */ O({
|
|
299
299
|
__name: "AuthkitEmailVerify",
|
|
300
300
|
props: {
|
|
301
301
|
email: {
|
|
@@ -310,25 +310,25 @@ const Oe = Object.assign(ne, {
|
|
|
310
310
|
},
|
|
311
311
|
emits: ["next"],
|
|
312
312
|
setup(f, {
|
|
313
|
-
emit:
|
|
313
|
+
emit: l
|
|
314
314
|
}) {
|
|
315
|
-
const
|
|
315
|
+
const g = l, m = f, r = $(() => me(m.email)), v = y(), o = y(!1), t = y(!1), V = y(), u = y({
|
|
316
316
|
userToken: void 0,
|
|
317
317
|
emailVerifyId: void 0
|
|
318
318
|
});
|
|
319
|
-
async function
|
|
320
|
-
|
|
319
|
+
async function n() {
|
|
320
|
+
o.value = !0;
|
|
321
321
|
const {
|
|
322
|
-
data:
|
|
322
|
+
data: s
|
|
323
323
|
} = await U.verify.email.retry.post({
|
|
324
324
|
email: m.email,
|
|
325
325
|
purpose: "bindEmail"
|
|
326
326
|
});
|
|
327
|
-
|
|
327
|
+
o.value = !1, s && (u.value.emailVerifyId = s.emailVerifyId, v.value.startCountFn());
|
|
328
328
|
}
|
|
329
329
|
async function p() {
|
|
330
330
|
if (!await V.value.validate(["userToken"])) {
|
|
331
|
-
|
|
331
|
+
t.value = !0;
|
|
332
332
|
const {
|
|
333
333
|
error: d
|
|
334
334
|
} = await U.verify.email.post({
|
|
@@ -337,17 +337,17 @@ const Oe = Object.assign(ne, {
|
|
|
337
337
|
emailVerifyId: u.value.emailVerifyId,
|
|
338
338
|
purpose: "bindEmail"
|
|
339
339
|
});
|
|
340
|
-
|
|
340
|
+
t.value = !1, d || g("next");
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
|
-
return (
|
|
343
|
+
return (s, 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:
|
|
350
|
+
default: a(() => [i(e(A), {
|
|
351
351
|
field: "email",
|
|
352
352
|
label: "邮箱",
|
|
353
353
|
rules: [{
|
|
@@ -358,9 +358,9 @@ const Oe = Object.assign(ne, {
|
|
|
358
358
|
message: "请输入有效的邮箱"
|
|
359
359
|
}]
|
|
360
360
|
}, {
|
|
361
|
-
default:
|
|
361
|
+
default: a(() => [k(T(r.value), 1)]),
|
|
362
362
|
_: 1
|
|
363
|
-
}),
|
|
363
|
+
}), i(e(A), {
|
|
364
364
|
field: "userToken",
|
|
365
365
|
label: "验证码",
|
|
366
366
|
"hide-label": "",
|
|
@@ -369,32 +369,32 @@ const Oe = Object.assign(ne, {
|
|
|
369
369
|
message: "请输入验证码"
|
|
370
370
|
}]
|
|
371
371
|
}, {
|
|
372
|
-
default:
|
|
372
|
+
default: a(() => [C("div", Ke, [i(e(M), {
|
|
373
373
|
modelValue: u.value.userToken,
|
|
374
374
|
"onUpdate:modelValue": d[0] || (d[0] = (z) => u.value.userToken = z),
|
|
375
375
|
placeholder: "请输入验证码"
|
|
376
|
-
}, null, 8, ["modelValue"]),
|
|
376
|
+
}, null, 8, ["modelValue"]), i(ie, {
|
|
377
377
|
ref_key: "SendVerifyCodeRef",
|
|
378
|
-
ref:
|
|
378
|
+
ref: v,
|
|
379
379
|
size: m.size,
|
|
380
|
-
loading:
|
|
380
|
+
loading: o.value,
|
|
381
381
|
style: {
|
|
382
382
|
"margin-left": "10px"
|
|
383
383
|
},
|
|
384
|
-
onSend:
|
|
384
|
+
onSend: n
|
|
385
385
|
}, null, 8, ["size", "loading"])])]),
|
|
386
386
|
_: 1
|
|
387
|
-
}),
|
|
387
|
+
}), i(e(A), {
|
|
388
388
|
field: "",
|
|
389
389
|
label: "",
|
|
390
390
|
rules: []
|
|
391
391
|
}, {
|
|
392
|
-
default:
|
|
393
|
-
loading:
|
|
392
|
+
default: a(() => [C("div", Ge, [i(e(S), {
|
|
393
|
+
loading: t.value,
|
|
394
394
|
type: "primary",
|
|
395
395
|
onClick: p
|
|
396
396
|
}, {
|
|
397
|
-
default:
|
|
397
|
+
default: a(() => [...d[1] || (d[1] = [k(" 提交 ", -1)])]),
|
|
398
398
|
_: 1
|
|
399
399
|
}, 8, ["loading"])])]),
|
|
400
400
|
_: 1
|
|
@@ -402,11 +402,11 @@ const Oe = Object.assign(ne, {
|
|
|
402
402
|
_: 1
|
|
403
403
|
}, 8, ["model", "size"]));
|
|
404
404
|
}
|
|
405
|
-
}), re = /* @__PURE__ */ H(
|
|
405
|
+
}), re = /* @__PURE__ */ H(Ze, [["__scopeId", "data-v-f4247d73"]]), Je = {
|
|
406
406
|
class: "sendVerifyCodeItem"
|
|
407
|
-
},
|
|
407
|
+
}, Qe = {
|
|
408
408
|
class: "handle"
|
|
409
|
-
},
|
|
409
|
+
}, Xe = /* @__PURE__ */ O({
|
|
410
410
|
__name: "AuthkitPhoneVerify",
|
|
411
411
|
props: {
|
|
412
412
|
phone: {
|
|
@@ -420,27 +420,27 @@ const Oe = Object.assign(ne, {
|
|
|
420
420
|
},
|
|
421
421
|
emits: ["next"],
|
|
422
422
|
setup(f, {
|
|
423
|
-
emit:
|
|
423
|
+
emit: l
|
|
424
424
|
}) {
|
|
425
|
-
const
|
|
425
|
+
const g = l, m = f, r = y(), v = y(!1), o = y(!1), t = y(), V = y({
|
|
426
426
|
code: void 0
|
|
427
|
-
}), u =
|
|
428
|
-
const
|
|
429
|
-
return
|
|
427
|
+
}), u = $(() => {
|
|
428
|
+
const s = m.phone.trim();
|
|
429
|
+
return s.length < 7 ? s : `${s.slice(0, 3)}****${s.slice(-4)}`;
|
|
430
430
|
});
|
|
431
|
-
async function
|
|
432
|
-
|
|
431
|
+
async function n() {
|
|
432
|
+
v.value = !0;
|
|
433
433
|
const {
|
|
434
|
-
error:
|
|
434
|
+
error: s
|
|
435
435
|
} = await U.verify.sms.send.post({
|
|
436
436
|
phone: m.phone,
|
|
437
437
|
purpose: "resetPassword"
|
|
438
438
|
});
|
|
439
|
-
|
|
439
|
+
v.value = !1, s || r.value.startCountFn();
|
|
440
440
|
}
|
|
441
441
|
async function p() {
|
|
442
|
-
if (!await
|
|
443
|
-
|
|
442
|
+
if (!await t.value.validate(["code"])) {
|
|
443
|
+
o.value = !0;
|
|
444
444
|
const {
|
|
445
445
|
error: d
|
|
446
446
|
} = await U.verify.sms.verify.post({
|
|
@@ -448,23 +448,23 @@ const Oe = Object.assign(ne, {
|
|
|
448
448
|
code: V.value.code,
|
|
449
449
|
purpose: "resetPassword"
|
|
450
450
|
});
|
|
451
|
-
|
|
451
|
+
o.value = !1, d || g("next");
|
|
452
452
|
}
|
|
453
453
|
}
|
|
454
|
-
return (
|
|
454
|
+
return (s, d) => (h(), w(e(J), {
|
|
455
455
|
ref_key: "formRef",
|
|
456
|
-
ref:
|
|
456
|
+
ref: t,
|
|
457
457
|
model: V.value,
|
|
458
458
|
"auto-label-width": "",
|
|
459
459
|
size: m.size
|
|
460
460
|
}, {
|
|
461
|
-
default:
|
|
461
|
+
default: a(() => [i(e(A), {
|
|
462
462
|
field: "phone",
|
|
463
463
|
label: "手机号"
|
|
464
464
|
}, {
|
|
465
|
-
default:
|
|
465
|
+
default: a(() => [k(T(u.value), 1)]),
|
|
466
466
|
_: 1
|
|
467
|
-
}),
|
|
467
|
+
}), i(e(A), {
|
|
468
468
|
field: "code",
|
|
469
469
|
label: "验证码",
|
|
470
470
|
"hide-label": "",
|
|
@@ -473,32 +473,32 @@ const Oe = Object.assign(ne, {
|
|
|
473
473
|
message: "请输入验证码"
|
|
474
474
|
}]
|
|
475
475
|
}, {
|
|
476
|
-
default:
|
|
476
|
+
default: a(() => [C("div", Je, [i(e(M), {
|
|
477
477
|
modelValue: V.value.code,
|
|
478
478
|
"onUpdate:modelValue": d[0] || (d[0] = (z) => V.value.code = z),
|
|
479
479
|
placeholder: "请输入验证码"
|
|
480
|
-
}, null, 8, ["modelValue"]),
|
|
480
|
+
}, null, 8, ["modelValue"]), i(ie, {
|
|
481
481
|
ref_key: "sendVerifyCodeRef",
|
|
482
|
-
ref:
|
|
482
|
+
ref: r,
|
|
483
483
|
size: m.size,
|
|
484
|
-
loading:
|
|
484
|
+
loading: v.value,
|
|
485
485
|
style: {
|
|
486
486
|
"margin-left": "10px"
|
|
487
487
|
},
|
|
488
|
-
onSend:
|
|
488
|
+
onSend: n
|
|
489
489
|
}, null, 8, ["size", "loading"])])]),
|
|
490
490
|
_: 1
|
|
491
|
-
}),
|
|
491
|
+
}), i(e(A), {
|
|
492
492
|
field: "",
|
|
493
493
|
label: "",
|
|
494
494
|
rules: []
|
|
495
495
|
}, {
|
|
496
|
-
default:
|
|
497
|
-
loading:
|
|
496
|
+
default: a(() => [C("div", Qe, [i(e(S), {
|
|
497
|
+
loading: o.value,
|
|
498
498
|
type: "primary",
|
|
499
499
|
onClick: p
|
|
500
500
|
}, {
|
|
501
|
-
default:
|
|
501
|
+
default: a(() => [...d[1] || (d[1] = [k("提交", -1)])]),
|
|
502
502
|
_: 1
|
|
503
503
|
}, 8, ["loading"])])]),
|
|
504
504
|
_: 1
|
|
@@ -506,9 +506,9 @@ const Oe = Object.assign(ne, {
|
|
|
506
506
|
_: 1
|
|
507
507
|
}, 8, ["model", "size"]));
|
|
508
508
|
}
|
|
509
|
-
}), ve = /* @__PURE__ */ H(
|
|
509
|
+
}), ve = /* @__PURE__ */ H(Xe, [["__scopeId", "data-v-2a868807"]]), Ye = {
|
|
510
510
|
class: "handle"
|
|
511
|
-
},
|
|
511
|
+
}, et = /* @__PURE__ */ O({
|
|
512
512
|
__name: "AuthkitPasswordUpdate",
|
|
513
513
|
props: {
|
|
514
514
|
size: {
|
|
@@ -518,32 +518,32 @@ const Oe = Object.assign(ne, {
|
|
|
518
518
|
},
|
|
519
519
|
emits: ["submit"],
|
|
520
520
|
setup(f, {
|
|
521
|
-
emit:
|
|
521
|
+
emit: l
|
|
522
522
|
}) {
|
|
523
|
-
const
|
|
523
|
+
const g = l, m = y(!1), r = y(), v = f, o = y({
|
|
524
524
|
oldPassword: "",
|
|
525
525
|
password: "",
|
|
526
526
|
confirmPassword: ""
|
|
527
527
|
});
|
|
528
|
-
async function
|
|
529
|
-
if (!await
|
|
528
|
+
async function t() {
|
|
529
|
+
if (!await r.value.validate()) {
|
|
530
530
|
m.value = !0;
|
|
531
531
|
const u = {
|
|
532
|
-
password:
|
|
532
|
+
password: o.value.password
|
|
533
533
|
}, {
|
|
534
|
-
error:
|
|
534
|
+
error: n
|
|
535
535
|
} = await U.users.update.password.post(u);
|
|
536
|
-
m.value = !1,
|
|
536
|
+
m.value = !1, n || g("submit", u);
|
|
537
537
|
}
|
|
538
538
|
}
|
|
539
539
|
return (V, u) => (h(), w(e(J), {
|
|
540
540
|
ref_key: "formRef",
|
|
541
|
-
ref:
|
|
542
|
-
model:
|
|
541
|
+
ref: r,
|
|
542
|
+
model: o.value,
|
|
543
543
|
"auto-label-width": "",
|
|
544
|
-
size:
|
|
544
|
+
size: v.size
|
|
545
545
|
}, {
|
|
546
|
-
default:
|
|
546
|
+
default: a(() => [i(e(A), {
|
|
547
547
|
field: "oldPassword",
|
|
548
548
|
label: "当前密码",
|
|
549
549
|
"hide-label": "",
|
|
@@ -552,14 +552,14 @@ const Oe = Object.assign(ne, {
|
|
|
552
552
|
message: "请输入当前密码"
|
|
553
553
|
}]
|
|
554
554
|
}, {
|
|
555
|
-
default:
|
|
556
|
-
modelValue:
|
|
557
|
-
"onUpdate:modelValue": u[0] || (u[0] = (
|
|
555
|
+
default: a(() => [i(e(M), {
|
|
556
|
+
modelValue: o.value.oldPassword,
|
|
557
|
+
"onUpdate:modelValue": u[0] || (u[0] = (n) => o.value.oldPassword = n),
|
|
558
558
|
placeholder: "请输入当前密码",
|
|
559
559
|
type: "password"
|
|
560
560
|
}, null, 8, ["modelValue"])]),
|
|
561
561
|
_: 1
|
|
562
|
-
}),
|
|
562
|
+
}), i(e(A), {
|
|
563
563
|
field: "password",
|
|
564
564
|
label: "新密码",
|
|
565
565
|
"hide-label": "",
|
|
@@ -571,14 +571,14 @@ const Oe = Object.assign(ne, {
|
|
|
571
571
|
message: "新密码不能少于10字符"
|
|
572
572
|
}]
|
|
573
573
|
}, {
|
|
574
|
-
default:
|
|
575
|
-
modelValue:
|
|
576
|
-
"onUpdate:modelValue": u[1] || (u[1] = (
|
|
574
|
+
default: a(() => [i(e(M), {
|
|
575
|
+
modelValue: o.value.password,
|
|
576
|
+
"onUpdate:modelValue": u[1] || (u[1] = (n) => o.value.password = n),
|
|
577
577
|
placeholder: "请输入新密码",
|
|
578
578
|
type: "password"
|
|
579
579
|
}, null, 8, ["modelValue"])]),
|
|
580
580
|
_: 1
|
|
581
|
-
}),
|
|
581
|
+
}), i(e(A), {
|
|
582
582
|
field: "confirmPassword",
|
|
583
583
|
label: "确认密码",
|
|
584
584
|
"hide-label": "",
|
|
@@ -589,29 +589,29 @@ const Oe = Object.assign(ne, {
|
|
|
589
589
|
minLength: 10,
|
|
590
590
|
message: "确认密码不能少于10字符"
|
|
591
591
|
}, {
|
|
592
|
-
validator: (
|
|
593
|
-
|
|
592
|
+
validator: (n, p) => {
|
|
593
|
+
n !== o.value.password ? p("两次密码输入不一致,请重新输入") : p();
|
|
594
594
|
}
|
|
595
595
|
}]
|
|
596
596
|
}, {
|
|
597
|
-
default:
|
|
598
|
-
modelValue:
|
|
599
|
-
"onUpdate:modelValue": u[2] || (u[2] = (
|
|
597
|
+
default: a(() => [i(e(M), {
|
|
598
|
+
modelValue: o.value.confirmPassword,
|
|
599
|
+
"onUpdate:modelValue": u[2] || (u[2] = (n) => o.value.confirmPassword = n),
|
|
600
600
|
placeholder: "请输入确认密码密码",
|
|
601
601
|
type: "password"
|
|
602
602
|
}, null, 8, ["modelValue"])]),
|
|
603
603
|
_: 1
|
|
604
|
-
}, 8, ["rules"]),
|
|
604
|
+
}, 8, ["rules"]), i(e(A), {
|
|
605
605
|
field: "",
|
|
606
606
|
label: "",
|
|
607
607
|
rules: []
|
|
608
608
|
}, {
|
|
609
|
-
default:
|
|
609
|
+
default: a(() => [C("div", Ye, [i(e(S), {
|
|
610
610
|
type: "primary",
|
|
611
611
|
loading: m.value,
|
|
612
|
-
onClick:
|
|
612
|
+
onClick: t
|
|
613
613
|
}, {
|
|
614
|
-
default:
|
|
614
|
+
default: a(() => [...u[3] || (u[3] = [k(" 提交 ", -1)])]),
|
|
615
615
|
_: 1
|
|
616
616
|
}, 8, ["loading"])])]),
|
|
617
617
|
_: 1
|
|
@@ -619,7 +619,7 @@ const Oe = Object.assign(ne, {
|
|
|
619
619
|
_: 1
|
|
620
620
|
}, 8, ["model", "size"]));
|
|
621
621
|
}
|
|
622
|
-
}),
|
|
622
|
+
}), tt = /* @__PURE__ */ H(et, [["__scopeId", "data-v-f8bd086f"]]), at = /* @__PURE__ */ O({
|
|
623
623
|
__name: "AuthkitSetPassword",
|
|
624
624
|
props: {
|
|
625
625
|
size: {
|
|
@@ -629,77 +629,82 @@ const Oe = Object.assign(ne, {
|
|
|
629
629
|
},
|
|
630
630
|
setup(f) {
|
|
631
631
|
const {
|
|
632
|
-
userProfile:
|
|
633
|
-
loading:
|
|
632
|
+
userProfile: l,
|
|
633
|
+
loading: g,
|
|
634
634
|
fetchUserProfile: m,
|
|
635
|
-
isLoggedIn:
|
|
636
|
-
} = te(),
|
|
637
|
-
function
|
|
638
|
-
|
|
635
|
+
isLoggedIn: r
|
|
636
|
+
} = te(), v = y("hidden"), o = f;
|
|
637
|
+
function t(n) {
|
|
638
|
+
v.value = n;
|
|
639
639
|
}
|
|
640
|
-
function V(
|
|
641
|
-
W.success("密码修改成功"),
|
|
640
|
+
function V(n) {
|
|
641
|
+
W.success("密码修改成功"), v.value = "hidden", m();
|
|
642
642
|
}
|
|
643
643
|
function u() {
|
|
644
|
-
|
|
644
|
+
v.value = "update";
|
|
645
645
|
}
|
|
646
|
-
return
|
|
647
|
-
|
|
648
|
-
}), (
|
|
649
|
-
var
|
|
650
|
-
return h(), j(Z, null, [!((
|
|
646
|
+
return X(() => {
|
|
647
|
+
r.value && !l.value && m();
|
|
648
|
+
}), (n, p) => {
|
|
649
|
+
var s, d, z, E, x, N, L, K;
|
|
650
|
+
return h(), j(Z, null, [!((s = e(l)) != null && s.email) && !((d = e(l)) != null && d.phone) ? (h(), w(e(D), {
|
|
651
651
|
key: 0,
|
|
652
652
|
title: "先绑定账号"
|
|
653
653
|
}, {
|
|
654
|
-
action:
|
|
655
|
-
size:
|
|
654
|
+
action: a(() => [i(e(S), {
|
|
655
|
+
size: o.size,
|
|
656
656
|
type: "primary",
|
|
657
|
-
onClick: p[0] || (p[0] = (_) =>
|
|
657
|
+
onClick: p[0] || (p[0] = (_) => t("update"))
|
|
658
658
|
}, {
|
|
659
|
-
default:
|
|
659
|
+
default: a(() => [...p[2] || (p[2] = [k(" 去绑定邮箱 ", -1)])]),
|
|
660
660
|
_: 1
|
|
661
661
|
}, 8, ["size"])]),
|
|
662
|
-
default:
|
|
662
|
+
default: a(() => [p[3] || (p[3] = k(" 请先绑定邮箱或手机号,再设置登录密码。 ", -1))]),
|
|
663
663
|
_: 1
|
|
664
|
-
})) : P("", !0), ((z = e(
|
|
664
|
+
})) : P("", !0), ((z = e(l)) != null && z.email || (E = e(l)) != null && E.phone) && v.value === "hidden" ? (h(), w(e(D), {
|
|
665
665
|
key: 1,
|
|
666
666
|
title: "更改密码"
|
|
667
667
|
}, {
|
|
668
|
-
action:
|
|
669
|
-
size:
|
|
668
|
+
action: a(() => [i(e(S), {
|
|
669
|
+
size: o.size,
|
|
670
670
|
type: "primary",
|
|
671
|
-
onClick: p[1] || (p[1] = (_) =>
|
|
671
|
+
onClick: p[1] || (p[1] = (_) => t("verify"))
|
|
672
672
|
}, {
|
|
673
|
-
default:
|
|
673
|
+
default: a(() => [...p[4] || (p[4] = [k("更改密码", -1)])]),
|
|
674
674
|
_: 1
|
|
675
675
|
}, 8, ["size"])]),
|
|
676
|
-
default:
|
|
676
|
+
default: a(() => [p[5] || (p[5] = k(" 为了账户安全,修改密码前会先验证身份。 ", -1))]),
|
|
677
677
|
_: 1
|
|
678
|
-
})) : P("", !0),
|
|
678
|
+
})) : P("", !0), v.value === "update" ? (h(), w(tt, {
|
|
679
679
|
key: 2,
|
|
680
|
-
size:
|
|
681
|
-
loading: e(
|
|
680
|
+
size: o.size,
|
|
681
|
+
loading: e(g),
|
|
682
682
|
onSubmit: V
|
|
683
|
-
}, null, 8, ["size", "loading"])) : P("", !0),
|
|
683
|
+
}, null, 8, ["size", "loading"])) : P("", !0), v.value === "verify" && ((x = e(l)) != null && x.email) ? (h(), w(re, {
|
|
684
684
|
key: 3,
|
|
685
|
-
size:
|
|
686
|
-
email: (N = e(
|
|
685
|
+
size: o.size,
|
|
686
|
+
email: (N = e(l)) == null ? void 0 : N.email,
|
|
687
687
|
onNext: u
|
|
688
|
-
}, null, 8, ["size", "email"])) : P("", !0),
|
|
688
|
+
}, null, 8, ["size", "email"])) : P("", !0), v.value === "verify" && !((L = e(l)) != null && L.email) && ((K = e(l)) != null && K.phone) ? (h(), w(ve, {
|
|
689
689
|
key: 4,
|
|
690
|
-
size:
|
|
691
|
-
phone: e(
|
|
690
|
+
size: o.size,
|
|
691
|
+
phone: e(l).phone,
|
|
692
692
|
onNext: u
|
|
693
693
|
}, null, 8, ["size", "phone"])) : P("", !0)], 64);
|
|
694
694
|
};
|
|
695
695
|
}
|
|
696
|
-
})
|
|
696
|
+
});
|
|
697
|
+
function ge() {
|
|
698
|
+
var l;
|
|
699
|
+
return typeof window > "u" ? "" : ((l = new URLSearchParams(window.location.search).get("inviteCode")) == null ? void 0 : l.trim()) || "";
|
|
700
|
+
}
|
|
701
|
+
const lt = {
|
|
697
702
|
class: "content"
|
|
698
|
-
}, lt = {
|
|
699
|
-
class: "sendVerifyCodeItem"
|
|
700
703
|
}, it = {
|
|
704
|
+
class: "sendVerifyCodeItem"
|
|
705
|
+
}, ot = {
|
|
701
706
|
class: "handle"
|
|
702
|
-
},
|
|
707
|
+
}, nt = /* @__PURE__ */ O({
|
|
703
708
|
__name: "AuthkitEmailUpdate",
|
|
704
709
|
props: {
|
|
705
710
|
size: {
|
|
@@ -718,41 +723,45 @@ const Oe = Object.assign(ne, {
|
|
|
718
723
|
},
|
|
719
724
|
emits: ["submit"],
|
|
720
725
|
setup(f, {
|
|
721
|
-
emit:
|
|
726
|
+
emit: l
|
|
722
727
|
}) {
|
|
723
|
-
const
|
|
728
|
+
const g = l, m = f, r = y(), v = y(!1), o = y(), t = y({
|
|
724
729
|
email: void 0,
|
|
725
730
|
userToken: void 0,
|
|
726
731
|
emailVerifyId: void 0,
|
|
727
732
|
password: void 0,
|
|
728
733
|
confirmPassword: void 0,
|
|
729
|
-
|
|
734
|
+
inviteCode: void 0
|
|
735
|
+
});
|
|
736
|
+
X(() => {
|
|
737
|
+
const n = ge();
|
|
738
|
+
n && (t.value.inviteCode = n);
|
|
730
739
|
});
|
|
731
740
|
async function V() {
|
|
732
|
-
if (!await
|
|
733
|
-
|
|
741
|
+
if (!await o.value.validateField(["email"])) {
|
|
742
|
+
v.value = !0;
|
|
734
743
|
const {
|
|
735
744
|
data: p
|
|
736
745
|
} = await U.verify.email.retry.post({
|
|
737
|
-
email:
|
|
746
|
+
email: t.value.email,
|
|
738
747
|
purpose: m.purpose
|
|
739
748
|
});
|
|
740
|
-
|
|
749
|
+
v.value = !1, p && (t.value.emailVerifyId = p.emailVerifyId, r.value.startCountFn());
|
|
741
750
|
}
|
|
742
751
|
}
|
|
743
752
|
async function u() {
|
|
744
|
-
|
|
745
|
-
|
|
753
|
+
o.value.validate().then((n) => {
|
|
754
|
+
n || g("submit", t.value);
|
|
746
755
|
});
|
|
747
756
|
}
|
|
748
|
-
return (
|
|
757
|
+
return (n, p) => (h(), j("div", lt, [i(e(J), {
|
|
749
758
|
ref_key: "formRef",
|
|
750
|
-
ref:
|
|
751
|
-
model:
|
|
759
|
+
ref: o,
|
|
760
|
+
model: t.value,
|
|
752
761
|
size: m.size,
|
|
753
762
|
"auto-label-width": ""
|
|
754
763
|
}, {
|
|
755
|
-
default:
|
|
764
|
+
default: a(() => [i(e(A), {
|
|
756
765
|
field: "email",
|
|
757
766
|
label: "邮箱",
|
|
758
767
|
"hide-label": "",
|
|
@@ -764,15 +773,15 @@ const Oe = Object.assign(ne, {
|
|
|
764
773
|
message: "请输入有效的邮箱"
|
|
765
774
|
}]
|
|
766
775
|
}, {
|
|
767
|
-
default:
|
|
768
|
-
modelValue:
|
|
769
|
-
"onUpdate:modelValue": p[0] || (p[0] = (
|
|
776
|
+
default: a(() => [i(e(M), {
|
|
777
|
+
modelValue: t.value.email,
|
|
778
|
+
"onUpdate:modelValue": p[0] || (p[0] = (s) => t.value.email = s),
|
|
770
779
|
placeholder: "请输入邮箱",
|
|
771
780
|
autocomplete: "email username",
|
|
772
781
|
type: "email"
|
|
773
782
|
}, null, 8, ["modelValue"])]),
|
|
774
783
|
_: 1
|
|
775
|
-
}),
|
|
784
|
+
}), i(e(A), {
|
|
776
785
|
field: "userToken",
|
|
777
786
|
label: "验证码",
|
|
778
787
|
"hide-label": "",
|
|
@@ -781,23 +790,23 @@ const Oe = Object.assign(ne, {
|
|
|
781
790
|
message: "请输入验证码"
|
|
782
791
|
}]
|
|
783
792
|
}, {
|
|
784
|
-
default:
|
|
785
|
-
modelValue:
|
|
786
|
-
"onUpdate:modelValue": p[1] || (p[1] = (
|
|
793
|
+
default: a(() => [C("div", it, [i(e(M), {
|
|
794
|
+
modelValue: t.value.userToken,
|
|
795
|
+
"onUpdate:modelValue": p[1] || (p[1] = (s) => t.value.userToken = s),
|
|
787
796
|
placeholder: "请输入验证码",
|
|
788
797
|
autocomplete: "one-time-code"
|
|
789
|
-
}, null, 8, ["modelValue"]),
|
|
798
|
+
}, null, 8, ["modelValue"]), i(ie, {
|
|
790
799
|
ref_key: "SendVerifyCodeRef",
|
|
791
|
-
ref:
|
|
800
|
+
ref: r,
|
|
792
801
|
size: m.size,
|
|
793
|
-
loading:
|
|
802
|
+
loading: v.value,
|
|
794
803
|
style: {
|
|
795
804
|
"margin-left": "10px"
|
|
796
805
|
},
|
|
797
806
|
onSend: V
|
|
798
807
|
}, null, 8, ["size", "loading"])])]),
|
|
799
808
|
_: 1
|
|
800
|
-
}),
|
|
809
|
+
}), i(e(A), {
|
|
801
810
|
field: "password",
|
|
802
811
|
label: "密码",
|
|
803
812
|
"hide-label": "",
|
|
@@ -809,15 +818,15 @@ const Oe = Object.assign(ne, {
|
|
|
809
818
|
message: "密码不能少于10字符"
|
|
810
819
|
}]
|
|
811
820
|
}, {
|
|
812
|
-
default:
|
|
813
|
-
modelValue:
|
|
814
|
-
"onUpdate:modelValue": p[2] || (p[2] = (
|
|
821
|
+
default: a(() => [i(e(M), {
|
|
822
|
+
modelValue: t.value.password,
|
|
823
|
+
"onUpdate:modelValue": p[2] || (p[2] = (s) => t.value.password = s),
|
|
815
824
|
placeholder: "请输入密码",
|
|
816
825
|
type: "password",
|
|
817
826
|
autocomplete: "new-password"
|
|
818
827
|
}, null, 8, ["modelValue"])]),
|
|
819
828
|
_: 1
|
|
820
|
-
}),
|
|
829
|
+
}), i(e(A), {
|
|
821
830
|
field: "confirmPassword",
|
|
822
831
|
label: "确认密码",
|
|
823
832
|
"hide-label": "",
|
|
@@ -828,49 +837,48 @@ const Oe = Object.assign(ne, {
|
|
|
828
837
|
minLength: 10,
|
|
829
838
|
message: "确认密码不能少于10字符"
|
|
830
839
|
}, {
|
|
831
|
-
validator: (
|
|
832
|
-
|
|
840
|
+
validator: (s, d) => {
|
|
841
|
+
s !== t.value.password ? d("两次密码输入不一致,请重新输入") : d();
|
|
833
842
|
}
|
|
834
843
|
}]
|
|
835
844
|
}, {
|
|
836
|
-
default:
|
|
837
|
-
modelValue:
|
|
838
|
-
"onUpdate:modelValue": p[3] || (p[3] = (
|
|
845
|
+
default: a(() => [i(e(M), {
|
|
846
|
+
modelValue: t.value.confirmPassword,
|
|
847
|
+
"onUpdate:modelValue": p[3] || (p[3] = (s) => t.value.confirmPassword = s),
|
|
839
848
|
placeholder: "请输入确认密码密码",
|
|
840
849
|
type: "password",
|
|
841
850
|
autocomplete: "new-password"
|
|
842
851
|
}, null, 8, ["modelValue"])]),
|
|
843
852
|
_: 1
|
|
844
|
-
}, 8, ["rules"]),
|
|
845
|
-
field: "
|
|
846
|
-
label: "
|
|
853
|
+
}, 8, ["rules"]), i(e(A), {
|
|
854
|
+
field: "inviteCode",
|
|
855
|
+
label: "邀请码",
|
|
847
856
|
"hide-label": "",
|
|
848
857
|
rules: [{
|
|
849
|
-
required: !1
|
|
850
|
-
message: "请输入邀请人ID"
|
|
858
|
+
required: !1
|
|
851
859
|
}]
|
|
852
860
|
}, {
|
|
853
|
-
default:
|
|
854
|
-
modelValue:
|
|
855
|
-
"onUpdate:modelValue": p[4] || (p[4] = (
|
|
856
|
-
placeholder: "
|
|
861
|
+
default: a(() => [i(e(M), {
|
|
862
|
+
modelValue: t.value.inviteCode,
|
|
863
|
+
"onUpdate:modelValue": p[4] || (p[4] = (s) => t.value.inviteCode = s),
|
|
864
|
+
placeholder: "邀请码(可选)",
|
|
857
865
|
autocomplete: "off"
|
|
858
866
|
}, null, 8, ["modelValue"])]),
|
|
859
867
|
_: 1
|
|
860
|
-
}), C("div",
|
|
868
|
+
}), C("div", ot, [i(e(S), {
|
|
861
869
|
type: "primary",
|
|
862
870
|
loading: m.loading,
|
|
863
871
|
long: "",
|
|
864
872
|
size: m.size,
|
|
865
873
|
onClick: u
|
|
866
874
|
}, {
|
|
867
|
-
default:
|
|
875
|
+
default: a(() => [...p[5] || (p[5] = [k(" 提交 ", -1)])]),
|
|
868
876
|
_: 1
|
|
869
877
|
}, 8, ["loading", "size"])])]),
|
|
870
878
|
_: 1
|
|
871
879
|
}, 8, ["model", "size"])]));
|
|
872
880
|
}
|
|
873
|
-
}),
|
|
881
|
+
}), st = /* @__PURE__ */ H(nt, [["__scopeId", "data-v-5bae4769"]]), rt = /* @__PURE__ */ O({
|
|
874
882
|
__name: "AuthkitEmailBinding",
|
|
875
883
|
props: {
|
|
876
884
|
size: {
|
|
@@ -880,16 +888,16 @@ const Oe = Object.assign(ne, {
|
|
|
880
888
|
},
|
|
881
889
|
setup(f) {
|
|
882
890
|
const {
|
|
883
|
-
userProfile:
|
|
884
|
-
loading:
|
|
891
|
+
userProfile: l,
|
|
892
|
+
loading: g,
|
|
885
893
|
fetchUserProfile: m
|
|
886
|
-
} = te(),
|
|
887
|
-
function
|
|
888
|
-
|
|
894
|
+
} = te(), r = y("hidden"), v = f;
|
|
895
|
+
function o(u) {
|
|
896
|
+
r.value = u;
|
|
889
897
|
}
|
|
890
|
-
async function
|
|
891
|
-
|
|
892
|
-
const
|
|
898
|
+
async function t(u) {
|
|
899
|
+
g.value = !0;
|
|
900
|
+
const n = {
|
|
893
901
|
email: u.email,
|
|
894
902
|
userToken: u.userToken,
|
|
895
903
|
emailVerifyId: u.emailVerifyId,
|
|
@@ -897,79 +905,79 @@ const Oe = Object.assign(ne, {
|
|
|
897
905
|
// API 要求 password,但绑定邮箱时可能不需要,传空字符串
|
|
898
906
|
}, {
|
|
899
907
|
error: p
|
|
900
|
-
} = await U.users.update.email.post(
|
|
901
|
-
|
|
908
|
+
} = await U.users.update.email.post(n);
|
|
909
|
+
g.value = !1, p || (W.success("绑定成功"), r.value = "hidden", m());
|
|
902
910
|
}
|
|
903
911
|
function V() {
|
|
904
|
-
|
|
912
|
+
r.value = "update";
|
|
905
913
|
}
|
|
906
|
-
return
|
|
907
|
-
|
|
908
|
-
}), (u,
|
|
909
|
-
var p,
|
|
910
|
-
return h(), j(Z, null, [!((p = e(
|
|
914
|
+
return X(() => {
|
|
915
|
+
l.value || m();
|
|
916
|
+
}), (u, n) => {
|
|
917
|
+
var p, s, d;
|
|
918
|
+
return h(), j(Z, null, [!((p = e(l)) != null && p.email) && r.value === "hidden" ? (h(), w(e(D), {
|
|
911
919
|
key: 0,
|
|
912
920
|
title: "绑定邮箱"
|
|
913
921
|
}, {
|
|
914
|
-
action:
|
|
915
|
-
size:
|
|
922
|
+
action: a(() => [i(e(S), {
|
|
923
|
+
size: v.size,
|
|
916
924
|
type: "primary",
|
|
917
|
-
onClick:
|
|
925
|
+
onClick: n[0] || (n[0] = (z) => o("update"))
|
|
918
926
|
}, {
|
|
919
|
-
default:
|
|
927
|
+
default: a(() => [...n[2] || (n[2] = [k(" 绑定邮箱 ", -1)])]),
|
|
920
928
|
_: 1
|
|
921
929
|
}, 8, ["size"])]),
|
|
922
|
-
default:
|
|
930
|
+
default: a(() => [n[3] || (n[3] = k(" 您还未绑定邮箱,请点击绑定邮箱 ", -1))]),
|
|
923
931
|
_: 1
|
|
924
|
-
})) : P("", !0), (
|
|
932
|
+
})) : P("", !0), (s = e(l)) != null && s.email && r.value === "hidden" ? (h(), w(e(D), {
|
|
925
933
|
key: 1,
|
|
926
934
|
title: "更改邮箱"
|
|
927
935
|
}, {
|
|
928
|
-
action:
|
|
929
|
-
size:
|
|
936
|
+
action: a(() => [i(e(S), {
|
|
937
|
+
size: v.size,
|
|
930
938
|
type: "primary",
|
|
931
|
-
onClick:
|
|
939
|
+
onClick: n[1] || (n[1] = (z) => o("verify"))
|
|
932
940
|
}, {
|
|
933
|
-
default:
|
|
941
|
+
default: a(() => [...n[4] || (n[4] = [k(" 更改邮箱 ", -1)])]),
|
|
934
942
|
_: 1
|
|
935
943
|
}, 8, ["size"])]),
|
|
936
|
-
default:
|
|
944
|
+
default: a(() => {
|
|
937
945
|
var z;
|
|
938
|
-
return [k(T(`您绑定的邮箱为${e(me)((z = e(
|
|
946
|
+
return [k(T(`您绑定的邮箱为${e(me)((z = e(l)) == null ? void 0 : z.email)}`) + " ", 1)];
|
|
939
947
|
}),
|
|
940
948
|
_: 1
|
|
941
|
-
})) : P("", !0),
|
|
949
|
+
})) : P("", !0), r.value === "update" ? (h(), w(st, {
|
|
942
950
|
key: 2,
|
|
943
|
-
loading: e(
|
|
944
|
-
size:
|
|
951
|
+
loading: e(g),
|
|
952
|
+
size: v.size,
|
|
945
953
|
purpose: "bindEmail",
|
|
946
|
-
onSubmit:
|
|
947
|
-
}, null, 8, ["loading", "size"])) : P("", !0),
|
|
954
|
+
onSubmit: t
|
|
955
|
+
}, null, 8, ["loading", "size"])) : P("", !0), r.value === "verify" ? (h(), w(re, {
|
|
948
956
|
key: 3,
|
|
949
|
-
size:
|
|
950
|
-
email: (d = e(
|
|
957
|
+
size: v.size,
|
|
958
|
+
email: (d = e(l)) == null ? void 0 : d.email,
|
|
951
959
|
onNext: V
|
|
952
960
|
}, null, 8, ["size", "email"])) : P("", !0)], 64);
|
|
953
961
|
};
|
|
954
962
|
}
|
|
955
|
-
}),
|
|
963
|
+
}), ut = /* @__PURE__ */ H(rt, [["__scopeId", "data-v-98ebf261"]]), dt = {
|
|
956
964
|
class: "BindPhone"
|
|
957
|
-
}, dt = {
|
|
958
|
-
class: "header"
|
|
959
965
|
}, ct = {
|
|
960
|
-
class: "
|
|
966
|
+
class: "header"
|
|
961
967
|
}, ft = {
|
|
962
|
-
class: "
|
|
968
|
+
class: "title"
|
|
963
969
|
}, mt = {
|
|
964
|
-
class: "
|
|
970
|
+
class: "subtitle"
|
|
965
971
|
}, pt = {
|
|
966
|
-
class: "
|
|
972
|
+
class: "content"
|
|
967
973
|
}, vt = {
|
|
968
|
-
class: "
|
|
974
|
+
class: "sendVerifyCodeItem"
|
|
969
975
|
}, gt = {
|
|
976
|
+
class: "handle"
|
|
977
|
+
}, ht = {
|
|
970
978
|
key: 0,
|
|
971
979
|
class: "skip"
|
|
972
|
-
},
|
|
980
|
+
}, yt = /* @__PURE__ */ O({
|
|
973
981
|
__name: "AuthkitBindPhone",
|
|
974
982
|
props: {
|
|
975
983
|
size: {
|
|
@@ -1000,43 +1008,43 @@ const Oe = Object.assign(ne, {
|
|
|
1000
1008
|
},
|
|
1001
1009
|
emits: ["submit", "skip"],
|
|
1002
1010
|
setup(f, {
|
|
1003
|
-
emit:
|
|
1011
|
+
emit: l
|
|
1004
1012
|
}) {
|
|
1005
|
-
const
|
|
1013
|
+
const g = l, m = f, r = y(), v = y(!1), o = y(), t = y({
|
|
1006
1014
|
phone: void 0,
|
|
1007
1015
|
code: void 0
|
|
1008
1016
|
});
|
|
1009
1017
|
async function V() {
|
|
1010
|
-
if (!await
|
|
1011
|
-
|
|
1018
|
+
if (!await o.value.validateField(["phone"])) {
|
|
1019
|
+
v.value = !0;
|
|
1012
1020
|
const {
|
|
1013
|
-
error:
|
|
1021
|
+
error: s
|
|
1014
1022
|
} = await U.verify.sms.send.post({
|
|
1015
|
-
phone:
|
|
1023
|
+
phone: t.value.phone,
|
|
1016
1024
|
purpose: "bindPhone"
|
|
1017
1025
|
});
|
|
1018
|
-
|
|
1026
|
+
v.value = !1, s || r.value.startCountFn();
|
|
1019
1027
|
}
|
|
1020
1028
|
}
|
|
1021
1029
|
async function u() {
|
|
1022
|
-
|
|
1023
|
-
p ||
|
|
1024
|
-
phone:
|
|
1025
|
-
code:
|
|
1030
|
+
o.value.validate().then((p) => {
|
|
1031
|
+
p || g("submit", {
|
|
1032
|
+
phone: t.value.phone,
|
|
1033
|
+
code: t.value.code
|
|
1026
1034
|
});
|
|
1027
1035
|
});
|
|
1028
1036
|
}
|
|
1029
|
-
function
|
|
1030
|
-
|
|
1037
|
+
function n() {
|
|
1038
|
+
g("skip");
|
|
1031
1039
|
}
|
|
1032
|
-
return (p,
|
|
1040
|
+
return (p, s) => (h(), j("div", dt, [C("div", ct, [C("h3", ft, T(m.title), 1), C("p", mt, T(m.subtitle), 1)]), C("div", pt, [i(e(J), {
|
|
1033
1041
|
ref_key: "formRef",
|
|
1034
|
-
ref:
|
|
1035
|
-
model:
|
|
1042
|
+
ref: o,
|
|
1043
|
+
model: t.value,
|
|
1036
1044
|
size: m.size,
|
|
1037
1045
|
"auto-label-width": ""
|
|
1038
1046
|
}, {
|
|
1039
|
-
default:
|
|
1047
|
+
default: a(() => [i(e(A), {
|
|
1040
1048
|
field: "phone",
|
|
1041
1049
|
label: "手机号",
|
|
1042
1050
|
"hide-label": "",
|
|
@@ -1048,15 +1056,15 @@ const Oe = Object.assign(ne, {
|
|
|
1048
1056
|
message: "请输入有效的手机号"
|
|
1049
1057
|
}]
|
|
1050
1058
|
}, {
|
|
1051
|
-
default:
|
|
1052
|
-
modelValue:
|
|
1053
|
-
"onUpdate:modelValue":
|
|
1059
|
+
default: a(() => [i(e(M), {
|
|
1060
|
+
modelValue: t.value.phone,
|
|
1061
|
+
"onUpdate:modelValue": s[0] || (s[0] = (d) => t.value.phone = d),
|
|
1054
1062
|
placeholder: "请输入手机号",
|
|
1055
1063
|
autocomplete: "tel",
|
|
1056
1064
|
type: "tel"
|
|
1057
1065
|
}, null, 8, ["modelValue"])]),
|
|
1058
1066
|
_: 1
|
|
1059
|
-
}),
|
|
1067
|
+
}), i(e(A), {
|
|
1060
1068
|
field: "code",
|
|
1061
1069
|
label: "验证码",
|
|
1062
1070
|
"hide-label": "",
|
|
@@ -1065,41 +1073,41 @@ const Oe = Object.assign(ne, {
|
|
|
1065
1073
|
message: "请输入验证码"
|
|
1066
1074
|
}]
|
|
1067
1075
|
}, {
|
|
1068
|
-
default:
|
|
1069
|
-
modelValue:
|
|
1070
|
-
"onUpdate:modelValue":
|
|
1076
|
+
default: a(() => [C("div", vt, [i(e(M), {
|
|
1077
|
+
modelValue: t.value.code,
|
|
1078
|
+
"onUpdate:modelValue": s[1] || (s[1] = (d) => t.value.code = d),
|
|
1071
1079
|
placeholder: "请输入验证码",
|
|
1072
1080
|
autocomplete: "one-time-code"
|
|
1073
|
-
}, null, 8, ["modelValue"]),
|
|
1081
|
+
}, null, 8, ["modelValue"]), i(ie, {
|
|
1074
1082
|
ref_key: "SendVerifyCodeRef",
|
|
1075
|
-
ref:
|
|
1083
|
+
ref: r,
|
|
1076
1084
|
size: m.size,
|
|
1077
|
-
loading:
|
|
1085
|
+
loading: v.value,
|
|
1078
1086
|
style: {
|
|
1079
1087
|
"margin-left": "10px"
|
|
1080
1088
|
},
|
|
1081
1089
|
onSend: V
|
|
1082
1090
|
}, null, 8, ["size", "loading"])])]),
|
|
1083
1091
|
_: 1
|
|
1084
|
-
}), C("div",
|
|
1092
|
+
}), C("div", gt, [i(e(S), {
|
|
1085
1093
|
type: "primary",
|
|
1086
1094
|
loading: m.loading,
|
|
1087
1095
|
long: "",
|
|
1088
1096
|
size: m.size,
|
|
1089
1097
|
onClick: u
|
|
1090
1098
|
}, {
|
|
1091
|
-
default:
|
|
1099
|
+
default: a(() => [k(T(m.submitText), 1)]),
|
|
1092
1100
|
_: 1
|
|
1093
1101
|
}, 8, ["loading", "size"])])]),
|
|
1094
1102
|
_: 1
|
|
1095
|
-
}, 8, ["model", "size"])]), m.showSkip ? (h(), j("div",
|
|
1096
|
-
onClick:
|
|
1103
|
+
}, 8, ["model", "size"])]), m.showSkip ? (h(), j("div", ht, [i(e(Ie), {
|
|
1104
|
+
onClick: n
|
|
1097
1105
|
}, {
|
|
1098
|
-
default:
|
|
1106
|
+
default: a(() => [...s[2] || (s[2] = [k("稍后绑定", -1)])]),
|
|
1099
1107
|
_: 1
|
|
1100
1108
|
})])) : P("", !0)]));
|
|
1101
1109
|
}
|
|
1102
|
-
}),
|
|
1110
|
+
}), bt = /* @__PURE__ */ H(yt, [["__scopeId", "data-v-bb70264d"]]), kt = /* @__PURE__ */ O({
|
|
1103
1111
|
__name: "AuthkitPhoneBinding",
|
|
1104
1112
|
props: {
|
|
1105
1113
|
size: {
|
|
@@ -1109,21 +1117,21 @@ const Oe = Object.assign(ne, {
|
|
|
1109
1117
|
},
|
|
1110
1118
|
setup(f) {
|
|
1111
1119
|
const {
|
|
1112
|
-
userProfile:
|
|
1113
|
-
loading:
|
|
1120
|
+
userProfile: l,
|
|
1121
|
+
loading: g,
|
|
1114
1122
|
fetchUserProfile: m
|
|
1115
|
-
} = te(),
|
|
1116
|
-
var
|
|
1117
|
-
const u = ((
|
|
1123
|
+
} = te(), r = y("hidden"), v = f, o = $(() => {
|
|
1124
|
+
var n;
|
|
1125
|
+
const u = ((n = l.value) == null ? void 0 : n.phone) || "";
|
|
1118
1126
|
return u.length < 7 ? u : `${u.slice(0, 3)}****${u.slice(-4)}`;
|
|
1119
1127
|
});
|
|
1120
|
-
function
|
|
1121
|
-
|
|
1128
|
+
function t(u) {
|
|
1129
|
+
r.value = u;
|
|
1122
1130
|
}
|
|
1123
1131
|
async function V(u) {
|
|
1124
|
-
var
|
|
1125
|
-
|
|
1126
|
-
const
|
|
1132
|
+
var s, d;
|
|
1133
|
+
g.value = !0;
|
|
1134
|
+
const n = (s = l.value) != null && s.phone ? U.users.update.myPhone.post({
|
|
1127
1135
|
phone: u.phone,
|
|
1128
1136
|
code: u.code
|
|
1129
1137
|
}) : U.auth.bind.phone.post({
|
|
@@ -1131,128 +1139,128 @@ const Oe = Object.assign(ne, {
|
|
|
1131
1139
|
code: u.code
|
|
1132
1140
|
}), {
|
|
1133
1141
|
error: p
|
|
1134
|
-
} = await
|
|
1135
|
-
|
|
1142
|
+
} = await n;
|
|
1143
|
+
g.value = !1, p || (W.success((d = l.value) != null && d.phone ? "更改成功" : "绑定成功"), r.value = "hidden", m());
|
|
1136
1144
|
}
|
|
1137
|
-
return
|
|
1138
|
-
|
|
1139
|
-
}), (u,
|
|
1140
|
-
var p,
|
|
1141
|
-
return h(), j(Z, null, [!((p = e(
|
|
1145
|
+
return X(() => {
|
|
1146
|
+
l.value || m();
|
|
1147
|
+
}), (u, n) => {
|
|
1148
|
+
var p, s, d, z, E;
|
|
1149
|
+
return h(), j(Z, null, [!((p = e(l)) != null && p.phone) && r.value === "hidden" ? (h(), w(e(D), {
|
|
1142
1150
|
key: 0,
|
|
1143
1151
|
title: "绑定手机号"
|
|
1144
1152
|
}, {
|
|
1145
|
-
action:
|
|
1146
|
-
size:
|
|
1153
|
+
action: a(() => [i(e(S), {
|
|
1154
|
+
size: v.size,
|
|
1147
1155
|
type: "primary",
|
|
1148
|
-
onClick:
|
|
1156
|
+
onClick: n[0] || (n[0] = (x) => t("update"))
|
|
1149
1157
|
}, {
|
|
1150
|
-
default:
|
|
1158
|
+
default: a(() => [...n[2] || (n[2] = [k("绑定手机号", -1)])]),
|
|
1151
1159
|
_: 1
|
|
1152
1160
|
}, 8, ["size"])]),
|
|
1153
|
-
default:
|
|
1161
|
+
default: a(() => [n[3] || (n[3] = k(" 您还未绑定手机号,请点击绑定手机号。 ", -1))]),
|
|
1154
1162
|
_: 1
|
|
1155
|
-
})) : P("", !0), (
|
|
1163
|
+
})) : P("", !0), (s = e(l)) != null && s.phone && r.value === "hidden" ? (h(), w(e(D), {
|
|
1156
1164
|
key: 1,
|
|
1157
1165
|
title: "已绑定手机号"
|
|
1158
1166
|
}, {
|
|
1159
|
-
action:
|
|
1160
|
-
size:
|
|
1167
|
+
action: a(() => [i(e(S), {
|
|
1168
|
+
size: v.size,
|
|
1161
1169
|
type: "primary",
|
|
1162
|
-
onClick:
|
|
1170
|
+
onClick: n[1] || (n[1] = (x) => t("update"))
|
|
1163
1171
|
}, {
|
|
1164
|
-
default:
|
|
1172
|
+
default: a(() => [...n[4] || (n[4] = [k("更改手机号", -1)])]),
|
|
1165
1173
|
_: 1
|
|
1166
1174
|
}, 8, ["size"])]),
|
|
1167
|
-
default:
|
|
1175
|
+
default: a(() => [k(T(`您绑定的手机号为 ${o.value}`) + " ", 1)]),
|
|
1168
1176
|
_: 1
|
|
1169
|
-
})) : P("", !0),
|
|
1177
|
+
})) : P("", !0), r.value === "update" ? (h(), w(bt, {
|
|
1170
1178
|
key: 2,
|
|
1171
|
-
loading: e(
|
|
1172
|
-
size:
|
|
1173
|
-
title: (d = e(
|
|
1174
|
-
subtitle: (z = e(
|
|
1175
|
-
"submit-text": (
|
|
1179
|
+
loading: e(g),
|
|
1180
|
+
size: v.size,
|
|
1181
|
+
title: (d = e(l)) != null && d.phone ? "更改手机号" : "绑定手机号",
|
|
1182
|
+
subtitle: (z = e(l)) != null && z.phone ? "请输入新的手机号并完成短信验证" : "请绑定手机号以完成账号设置",
|
|
1183
|
+
"submit-text": (E = e(l)) != null && E.phone ? "更改手机号" : "绑定手机号",
|
|
1176
1184
|
onSubmit: V
|
|
1177
1185
|
}, null, 8, ["loading", "size", "title", "subtitle", "submit-text"])) : P("", !0)], 64);
|
|
1178
1186
|
};
|
|
1179
1187
|
}
|
|
1180
1188
|
});
|
|
1181
|
-
function
|
|
1182
|
-
return
|
|
1189
|
+
function he() {
|
|
1190
|
+
return ee.oauthCallbackUrl ? ee.oauthCallbackUrl : `${window.location.origin}/`;
|
|
1183
1191
|
}
|
|
1184
|
-
function
|
|
1185
|
-
const f = window.location.pathname + window.location.search + window.location.hash,
|
|
1186
|
-
!
|
|
1192
|
+
function _t() {
|
|
1193
|
+
const f = window.location.pathname + window.location.search + window.location.hash, l = new URLSearchParams(window.location.search);
|
|
1194
|
+
!l.has("token") && !l.has("error") && !l.has("bindSuccess") && sessionStorage.setItem("auth_redirect", f);
|
|
1187
1195
|
}
|
|
1188
|
-
async function ae(f,
|
|
1189
|
-
const
|
|
1190
|
-
if (!
|
|
1196
|
+
async function ae(f, l) {
|
|
1197
|
+
const g = ee.appId;
|
|
1198
|
+
if (!g) {
|
|
1191
1199
|
console.error(`${f} OAuth 失败: appId 未配置`);
|
|
1192
1200
|
return;
|
|
1193
1201
|
}
|
|
1194
|
-
const m = ge(),
|
|
1195
|
-
appId:
|
|
1196
|
-
|
|
1202
|
+
const m = he(), r = (l == null ? void 0 : l.inviteCode) || ge() || void 0, v = {
|
|
1203
|
+
appId: g,
|
|
1204
|
+
inviteCode: r,
|
|
1197
1205
|
redirectUri: m
|
|
1198
1206
|
};
|
|
1199
|
-
|
|
1200
|
-
const
|
|
1201
|
-
github: () => U.oauth.github.login.get(
|
|
1202
|
-
google: () => U.oauth.google.login.get(
|
|
1203
|
-
microsoft: () => U.oauth.microsoft.login.get(
|
|
1204
|
-
wechat: () => U.oauth.wechat.login.get(
|
|
1207
|
+
_t();
|
|
1208
|
+
const o = {
|
|
1209
|
+
github: () => U.oauth.github.login.get(v),
|
|
1210
|
+
google: () => U.oauth.google.login.get(v),
|
|
1211
|
+
microsoft: () => U.oauth.microsoft.login.get(v),
|
|
1212
|
+
wechat: () => U.oauth.wechat.login.get(v)
|
|
1205
1213
|
};
|
|
1206
1214
|
try {
|
|
1207
1215
|
const {
|
|
1208
|
-
data:
|
|
1209
|
-
} = await
|
|
1210
|
-
|
|
1211
|
-
} catch (
|
|
1212
|
-
console.error(`${f} OAuth 授权失败:`,
|
|
1216
|
+
data: t
|
|
1217
|
+
} = await o[f]();
|
|
1218
|
+
t != null && t.redirectUri ? window.location.href = t.redirectUri : console.error(`${f} OAuth 重定向URL为空`);
|
|
1219
|
+
} catch (t) {
|
|
1220
|
+
console.error(`${f} OAuth 授权失败:`, t);
|
|
1213
1221
|
}
|
|
1214
1222
|
}
|
|
1215
|
-
function
|
|
1223
|
+
function wt(f) {
|
|
1216
1224
|
ae("github", {
|
|
1217
|
-
|
|
1225
|
+
inviteCode: f
|
|
1218
1226
|
});
|
|
1219
1227
|
}
|
|
1220
|
-
function
|
|
1228
|
+
function zt(f) {
|
|
1221
1229
|
ae("google", {
|
|
1222
|
-
|
|
1230
|
+
inviteCode: f
|
|
1223
1231
|
});
|
|
1224
1232
|
}
|
|
1225
|
-
function
|
|
1233
|
+
function Vt(f) {
|
|
1226
1234
|
ae("microsoft", {
|
|
1227
|
-
|
|
1235
|
+
inviteCode: f
|
|
1228
1236
|
});
|
|
1229
1237
|
}
|
|
1230
|
-
function
|
|
1238
|
+
function Ct(f) {
|
|
1231
1239
|
ae("wechat", {
|
|
1232
|
-
|
|
1240
|
+
inviteCode: f
|
|
1233
1241
|
});
|
|
1234
1242
|
}
|
|
1235
|
-
function
|
|
1243
|
+
function $t() {
|
|
1236
1244
|
return {
|
|
1237
|
-
githubAuth:
|
|
1238
|
-
googleAuth:
|
|
1239
|
-
microsoftAuth:
|
|
1240
|
-
wechatAuth:
|
|
1245
|
+
githubAuth: wt,
|
|
1246
|
+
googleAuth: zt,
|
|
1247
|
+
microsoftAuth: Vt,
|
|
1248
|
+
wechatAuth: Ct,
|
|
1241
1249
|
startOauth: ae,
|
|
1242
|
-
getOauthCallbackUrl:
|
|
1250
|
+
getOauthCallbackUrl: he
|
|
1243
1251
|
};
|
|
1244
1252
|
}
|
|
1245
1253
|
const It = {
|
|
1246
1254
|
class: "oauth-binding-account"
|
|
1247
|
-
}, $t = {
|
|
1248
|
-
class: "oauth-binding-account__info"
|
|
1249
1255
|
}, Pt = {
|
|
1250
|
-
class: "oauth-binding-
|
|
1256
|
+
class: "oauth-binding-account__info"
|
|
1251
1257
|
}, St = {
|
|
1252
|
-
class: "oauth-binding-
|
|
1258
|
+
class: "oauth-binding-account__provider"
|
|
1253
1259
|
}, At = {
|
|
1260
|
+
class: "oauth-binding-account__name"
|
|
1261
|
+
}, Ut = {
|
|
1254
1262
|
class: "oauth-binding-verify-actions"
|
|
1255
|
-
},
|
|
1263
|
+
}, xt = /* @__PURE__ */ O({
|
|
1256
1264
|
__name: "AuthkitOAuthBinding",
|
|
1257
1265
|
props: {
|
|
1258
1266
|
provider: {
|
|
@@ -1269,58 +1277,58 @@ const It = {
|
|
|
1269
1277
|
}
|
|
1270
1278
|
},
|
|
1271
1279
|
setup(f) {
|
|
1272
|
-
const
|
|
1273
|
-
userProfile:
|
|
1280
|
+
const l = f, {
|
|
1281
|
+
userProfile: g,
|
|
1274
1282
|
fetchUserProfile: m
|
|
1275
1283
|
} = te(), {
|
|
1276
|
-
appsData:
|
|
1284
|
+
appsData: r
|
|
1277
1285
|
} = pe(), {
|
|
1278
|
-
getOauthCallbackUrl:
|
|
1279
|
-
} =
|
|
1286
|
+
getOauthCallbackUrl: v
|
|
1287
|
+
} = $t(), o = y("hidden"), t = y(), V = y(!1);
|
|
1280
1288
|
let u;
|
|
1281
|
-
const
|
|
1289
|
+
const n = $(() => {
|
|
1282
1290
|
var c;
|
|
1283
|
-
return ((c =
|
|
1284
|
-
}), p =
|
|
1285
|
-
const c =
|
|
1286
|
-
return c ? c.login || c.name || c.nickname || c.displayName || c.userPrincipalName || c.email || c.mail || c.openid ||
|
|
1287
|
-
}),
|
|
1288
|
-
const c =
|
|
1291
|
+
return ((c = g.value) == null ? void 0 : c[l.provider]) || null;
|
|
1292
|
+
}), p = $(() => {
|
|
1293
|
+
const c = n.value;
|
|
1294
|
+
return c ? c.login || c.name || c.nickname || c.displayName || c.userPrincipalName || c.email || c.mail || c.openid || l.label : "";
|
|
1295
|
+
}), s = $(() => {
|
|
1296
|
+
const c = n.value;
|
|
1289
1297
|
return (c == null ? void 0 : c.avatar_url) || (c == null ? void 0 : c.picture) || (c == null ? void 0 : c.headimgurl) || "";
|
|
1290
|
-
}), d =
|
|
1298
|
+
}), d = $(() => ({
|
|
1291
1299
|
github: "bi:github",
|
|
1292
1300
|
google: "flat-color-icons:google",
|
|
1293
1301
|
microsoft: "logos:microsoft-icon",
|
|
1294
1302
|
wechat: "ri:wechat-fill"
|
|
1295
|
-
})[
|
|
1296
|
-
const c =
|
|
1303
|
+
})[l.provider]), z = $(() => {
|
|
1304
|
+
const c = r.value.authMethods;
|
|
1297
1305
|
return c.signUp.email || c.login.emailPassword || c.login.emailCode;
|
|
1298
|
-
}),
|
|
1299
|
-
const c =
|
|
1306
|
+
}), E = $(() => {
|
|
1307
|
+
const c = r.value.authMethods;
|
|
1300
1308
|
return c.signUp.phone || c.login.phonePassword || c.login.phoneCode;
|
|
1301
|
-
}), x =
|
|
1309
|
+
}), x = $(() => {
|
|
1302
1310
|
var c;
|
|
1303
|
-
return z.value && !!((c =
|
|
1304
|
-
}), N =
|
|
1311
|
+
return z.value && !!((c = g.value) != null && c.email);
|
|
1312
|
+
}), N = $(() => {
|
|
1305
1313
|
var c;
|
|
1306
|
-
return
|
|
1307
|
-
}), L =
|
|
1314
|
+
return E.value && !!((c = g.value) != null && c.phone);
|
|
1315
|
+
}), L = $(() => {
|
|
1308
1316
|
const c = [];
|
|
1309
1317
|
return x.value && c.push("email"), N.value && c.push("phone"), c;
|
|
1310
|
-
}), K =
|
|
1318
|
+
}), K = $(() => z.value || E.value), _ = $(() => o.value !== "hidden" && L.value.length > 1 && !t.value), I = $(() => {
|
|
1311
1319
|
var c;
|
|
1312
|
-
return
|
|
1313
|
-
}),
|
|
1320
|
+
return o.value !== "hidden" && t.value === "email" && !!((c = g.value) != null && c.email);
|
|
1321
|
+
}), F = $(() => {
|
|
1314
1322
|
var c;
|
|
1315
|
-
return
|
|
1316
|
-
}), Q =
|
|
1317
|
-
function
|
|
1323
|
+
return o.value !== "hidden" && t.value === "phone" && !!((c = g.value) != null && c.phone);
|
|
1324
|
+
}), Q = $(() => o.value === "unbind" ? "解绑" : "绑定");
|
|
1325
|
+
function R(c) {
|
|
1318
1326
|
if (c === "hidden") {
|
|
1319
|
-
|
|
1327
|
+
o.value = c, t.value = void 0;
|
|
1320
1328
|
return;
|
|
1321
1329
|
}
|
|
1322
1330
|
if (!K.value) {
|
|
1323
|
-
c === "bind" && B(), c === "unbind" &&
|
|
1331
|
+
c === "bind" && B(), c === "unbind" && Y();
|
|
1324
1332
|
return;
|
|
1325
1333
|
}
|
|
1326
1334
|
const q = L.value;
|
|
@@ -1328,18 +1336,18 @@ const It = {
|
|
|
1328
1336
|
W.error("请先绑定应用已开启的邮箱或手机号后再操作第三方账号");
|
|
1329
1337
|
return;
|
|
1330
1338
|
}
|
|
1331
|
-
|
|
1339
|
+
o.value = c, t.value = q.length === 1 ? q[0] : void 0;
|
|
1332
1340
|
}
|
|
1333
1341
|
function b(c) {
|
|
1334
|
-
|
|
1342
|
+
t.value = c;
|
|
1335
1343
|
}
|
|
1336
1344
|
async function B() {
|
|
1337
|
-
const c =
|
|
1345
|
+
const c = ee.appId;
|
|
1338
1346
|
if (!c) {
|
|
1339
|
-
console.error(`${
|
|
1347
|
+
console.error(`${l.label} OAuth 失败: appId 未配置`);
|
|
1340
1348
|
return;
|
|
1341
1349
|
}
|
|
1342
|
-
const q =
|
|
1350
|
+
const q = v(), le = {
|
|
1343
1351
|
github: () => U.oauth.github.login.get({
|
|
1344
1352
|
appId: c,
|
|
1345
1353
|
mode: "bind",
|
|
@@ -1362,119 +1370,119 @@ const It = {
|
|
|
1362
1370
|
})
|
|
1363
1371
|
}, {
|
|
1364
1372
|
data: G
|
|
1365
|
-
} = await le[
|
|
1373
|
+
} = await le[l.provider]();
|
|
1366
1374
|
G != null && G.redirectUri && (V.value = !0, window.open(G.redirectUri, "_blank"));
|
|
1367
1375
|
}
|
|
1368
|
-
async function
|
|
1376
|
+
async function Y() {
|
|
1369
1377
|
const {
|
|
1370
1378
|
error: c
|
|
1371
1379
|
} = await U.users.unbind.oauth.post({
|
|
1372
|
-
provider:
|
|
1380
|
+
provider: l.provider
|
|
1373
1381
|
});
|
|
1374
|
-
c || (W.success("解绑成功"),
|
|
1382
|
+
c || (W.success("解绑成功"), o.value = "hidden", m());
|
|
1375
1383
|
}
|
|
1376
1384
|
function ue() {
|
|
1377
|
-
|
|
1385
|
+
o.value === "bind" && (o.value = "hidden", B()), o.value === "unbind" && Y();
|
|
1378
1386
|
}
|
|
1379
|
-
function
|
|
1387
|
+
function ye() {
|
|
1380
1388
|
V.value && m();
|
|
1381
1389
|
}
|
|
1382
|
-
return
|
|
1383
|
-
|
|
1390
|
+
return X(() => {
|
|
1391
|
+
g.value || m(), u = setInterval(ye, 1e3);
|
|
1384
1392
|
}), fe(() => {
|
|
1385
1393
|
u && clearInterval(u);
|
|
1386
1394
|
}), (c, q) => {
|
|
1387
1395
|
var le, G;
|
|
1388
|
-
return h(), j(Z, null, [!
|
|
1396
|
+
return h(), j(Z, null, [!n.value && o.value === "hidden" ? (h(), w(e(D), {
|
|
1389
1397
|
key: 0,
|
|
1390
|
-
title: `绑定${
|
|
1398
|
+
title: `绑定${l.label}`
|
|
1391
1399
|
}, {
|
|
1392
|
-
action:
|
|
1393
|
-
size:
|
|
1400
|
+
action: a(() => [i(e(S), {
|
|
1401
|
+
size: l.size,
|
|
1394
1402
|
type: "primary",
|
|
1395
|
-
onClick: q[0] || (q[0] = (oe) =>
|
|
1403
|
+
onClick: q[0] || (q[0] = (oe) => R("bind"))
|
|
1396
1404
|
}, {
|
|
1397
|
-
default:
|
|
1405
|
+
default: a(() => [k(" 绑定" + T(l.label), 1)]),
|
|
1398
1406
|
_: 1
|
|
1399
1407
|
}, 8, ["size"])]),
|
|
1400
|
-
default:
|
|
1408
|
+
default: a(() => [k(" 您还未绑定" + T(l.label) + "账号,请点击绑定。 ", 1)]),
|
|
1401
1409
|
_: 1
|
|
1402
|
-
}, 8, ["title"])) : P("", !0),
|
|
1410
|
+
}, 8, ["title"])) : P("", !0), n.value && o.value === "hidden" ? (h(), w(e(D), {
|
|
1403
1411
|
key: 1,
|
|
1404
|
-
title: `解绑${
|
|
1412
|
+
title: `解绑${l.label}`
|
|
1405
1413
|
}, {
|
|
1406
|
-
action:
|
|
1407
|
-
size:
|
|
1414
|
+
action: a(() => [i(e(S), {
|
|
1415
|
+
size: l.size,
|
|
1408
1416
|
type: "primary",
|
|
1409
|
-
onClick: q[1] || (q[1] = (oe) =>
|
|
1417
|
+
onClick: q[1] || (q[1] = (oe) => R("unbind"))
|
|
1410
1418
|
}, {
|
|
1411
|
-
default:
|
|
1419
|
+
default: a(() => [k(" 解绑" + T(l.label), 1)]),
|
|
1412
1420
|
_: 1
|
|
1413
1421
|
}, 8, ["size"])]),
|
|
1414
|
-
default:
|
|
1422
|
+
default: a(() => [C("div", It, [s.value ? (h(), w(e(se), {
|
|
1415
1423
|
key: 0,
|
|
1416
1424
|
class: "oauth-binding-account__avatar",
|
|
1417
|
-
"image-url":
|
|
1425
|
+
"image-url": s.value,
|
|
1418
1426
|
size: 42
|
|
1419
1427
|
}, null, 8, ["image-url"])) : (h(), w(e(se), {
|
|
1420
1428
|
key: 1,
|
|
1421
1429
|
class: "oauth-binding-account__avatar oauth-binding-account__avatar--placeholder",
|
|
1422
1430
|
size: 42
|
|
1423
1431
|
}, {
|
|
1424
|
-
default:
|
|
1432
|
+
default: a(() => [i(e(Be), {
|
|
1425
1433
|
icon: d.value,
|
|
1426
1434
|
width: 22
|
|
1427
1435
|
}, null, 8, ["icon"])]),
|
|
1428
1436
|
_: 1
|
|
1429
|
-
})), C("div",
|
|
1437
|
+
})), C("div", Pt, [C("div", St, T(l.label), 1), C("div", At, T(p.value), 1)])])]),
|
|
1430
1438
|
_: 1
|
|
1431
|
-
}, 8, ["title"])) : P("", !0), _.value ? (h(), w(e(
|
|
1439
|
+
}, 8, ["title"])) : P("", !0), _.value ? (h(), w(e(D), {
|
|
1432
1440
|
key: 2,
|
|
1433
1441
|
title: `${Q.value}前验证身份`
|
|
1434
1442
|
}, {
|
|
1435
|
-
action:
|
|
1443
|
+
action: a(() => [C("div", Ut, [x.value ? (h(), w(e(S), {
|
|
1436
1444
|
key: 0,
|
|
1437
|
-
size:
|
|
1445
|
+
size: l.size,
|
|
1438
1446
|
type: "primary",
|
|
1439
1447
|
onClick: q[2] || (q[2] = (oe) => b("email"))
|
|
1440
1448
|
}, {
|
|
1441
|
-
default:
|
|
1449
|
+
default: a(() => [...q[4] || (q[4] = [k(" 邮箱验证 ", -1)])]),
|
|
1442
1450
|
_: 1
|
|
1443
1451
|
}, 8, ["size"])) : P("", !0), N.value ? (h(), w(e(S), {
|
|
1444
1452
|
key: 1,
|
|
1445
|
-
size:
|
|
1453
|
+
size: l.size,
|
|
1446
1454
|
type: "primary",
|
|
1447
1455
|
onClick: q[3] || (q[3] = (oe) => b("phone"))
|
|
1448
1456
|
}, {
|
|
1449
|
-
default:
|
|
1457
|
+
default: a(() => [...q[5] || (q[5] = [k(" 手机验证 ", -1)])]),
|
|
1450
1458
|
_: 1
|
|
1451
1459
|
}, 8, ["size"])) : P("", !0)])]),
|
|
1452
|
-
default:
|
|
1460
|
+
default: a(() => [q[6] || (q[6] = k(" 请选择一种已绑定的验证方式。 ", -1))]),
|
|
1453
1461
|
_: 1
|
|
1454
|
-
}, 8, ["title"])) : P("", !0),
|
|
1462
|
+
}, 8, ["title"])) : P("", !0), I.value ? (h(), w(re, {
|
|
1455
1463
|
key: 3,
|
|
1456
|
-
size:
|
|
1457
|
-
email: (le = e(
|
|
1464
|
+
size: l.size,
|
|
1465
|
+
email: (le = e(g)) == null ? void 0 : le.email,
|
|
1458
1466
|
onNext: ue
|
|
1459
|
-
}, null, 8, ["size", "email"])) : P("", !0),
|
|
1467
|
+
}, null, 8, ["size", "email"])) : P("", !0), F.value ? (h(), w(ve, {
|
|
1460
1468
|
key: 4,
|
|
1461
|
-
size:
|
|
1462
|
-
phone: ((G = e(
|
|
1469
|
+
size: l.size,
|
|
1470
|
+
phone: ((G = e(g)) == null ? void 0 : G.phone) || "",
|
|
1463
1471
|
onNext: ue
|
|
1464
1472
|
}, null, 8, ["size", "phone"])) : P("", !0)], 64);
|
|
1465
1473
|
};
|
|
1466
1474
|
}
|
|
1467
|
-
}),
|
|
1475
|
+
}), qt = /* @__PURE__ */ H(xt, [["__scopeId", "data-v-596b697b"]]), Tt = {
|
|
1468
1476
|
class: "dependency-list"
|
|
1469
|
-
}, Tt = {
|
|
1470
|
-
class: "label"
|
|
1471
1477
|
}, Bt = {
|
|
1478
|
+
class: "label"
|
|
1479
|
+
}, Rt = {
|
|
1472
1480
|
class: "count"
|
|
1473
1481
|
}, Et = {
|
|
1474
1482
|
class: "action-bar"
|
|
1475
|
-
},
|
|
1483
|
+
}, Lt = {
|
|
1476
1484
|
class: "verify-code-row"
|
|
1477
|
-
},
|
|
1485
|
+
}, Nt = /* @__PURE__ */ O({
|
|
1478
1486
|
__name: "AuthkitAccountDelete",
|
|
1479
1487
|
props: {
|
|
1480
1488
|
size: {
|
|
@@ -1484,60 +1492,60 @@ const It = {
|
|
|
1484
1492
|
},
|
|
1485
1493
|
emits: ["deleted"],
|
|
1486
1494
|
setup(f, {
|
|
1487
|
-
emit:
|
|
1495
|
+
emit: l
|
|
1488
1496
|
}) {
|
|
1489
|
-
const
|
|
1490
|
-
userProfile:
|
|
1491
|
-
clearUserProfile:
|
|
1497
|
+
const g = f, m = l, {
|
|
1498
|
+
userProfile: r,
|
|
1499
|
+
clearUserProfile: v
|
|
1492
1500
|
} = te(), {
|
|
1493
|
-
clearAuth:
|
|
1494
|
-
} =
|
|
1501
|
+
clearAuth: o
|
|
1502
|
+
} = Re(), t = y("check"), V = y(!1), u = y([]), n = y(!1), p = y(""), s = y(0);
|
|
1495
1503
|
let d = null;
|
|
1496
|
-
const z =
|
|
1497
|
-
var
|
|
1498
|
-
const
|
|
1499
|
-
if (!
|
|
1500
|
-
const [b, B] =
|
|
1501
|
-
return b.length <= 2 ?
|
|
1502
|
-
}),
|
|
1504
|
+
const z = $(() => {
|
|
1505
|
+
var Y;
|
|
1506
|
+
const R = ((Y = r.value) == null ? void 0 : Y.email) || "";
|
|
1507
|
+
if (!R) return "";
|
|
1508
|
+
const [b, B] = R.split("@");
|
|
1509
|
+
return b.length <= 2 ? R : `${b.slice(0, 2)}***@${B}`;
|
|
1510
|
+
}), E = y(), x = y({
|
|
1503
1511
|
userToken: "",
|
|
1504
1512
|
password: "",
|
|
1505
1513
|
confirmText: ""
|
|
1506
1514
|
}), N = y(!1);
|
|
1507
|
-
function L(
|
|
1508
|
-
|
|
1515
|
+
function L(R, b) {
|
|
1516
|
+
R !== "注销" ? b('请输入"注销"以确认操作') : b();
|
|
1509
1517
|
}
|
|
1510
1518
|
async function K() {
|
|
1511
|
-
var
|
|
1512
|
-
if (V.value = !0, V.value = !1, !((
|
|
1519
|
+
var R;
|
|
1520
|
+
if (V.value = !0, V.value = !1, !((R = r.value) != null && R.email)) {
|
|
1513
1521
|
W.error("账号未绑定邮箱,无法进行注销验证。请先绑定邮箱");
|
|
1514
1522
|
return;
|
|
1515
1523
|
}
|
|
1516
|
-
|
|
1524
|
+
t.value = "sendCode";
|
|
1517
1525
|
}
|
|
1518
1526
|
async function _() {
|
|
1519
1527
|
var b;
|
|
1520
|
-
if (!((b =
|
|
1528
|
+
if (!((b = r.value) != null && b.email)) {
|
|
1521
1529
|
W.error("请先绑定邮箱");
|
|
1522
1530
|
return;
|
|
1523
1531
|
}
|
|
1524
|
-
|
|
1532
|
+
n.value = !0;
|
|
1525
1533
|
const {
|
|
1526
|
-
data:
|
|
1534
|
+
data: R
|
|
1527
1535
|
} = await U.verify.email.retry.post({
|
|
1528
|
-
email:
|
|
1536
|
+
email: r.value.email,
|
|
1529
1537
|
purpose: "deleteAccount"
|
|
1530
1538
|
});
|
|
1531
|
-
|
|
1539
|
+
n.value = !1, R && (p.value = R.emailVerifyId, W.success("验证码已发送"), t.value = "confirm", I());
|
|
1532
1540
|
}
|
|
1533
|
-
function
|
|
1534
|
-
|
|
1535
|
-
|
|
1541
|
+
function I() {
|
|
1542
|
+
s.value = 60, d && clearInterval(d), d = setInterval(() => {
|
|
1543
|
+
s.value--, s.value <= 0 && d && (clearInterval(d), d = null);
|
|
1536
1544
|
}, 1e3);
|
|
1537
1545
|
}
|
|
1538
|
-
async function
|
|
1546
|
+
async function F() {
|
|
1539
1547
|
var B;
|
|
1540
|
-
if (await ((B =
|
|
1548
|
+
if (await ((B = E.value) == null ? void 0 : B.validate())) return;
|
|
1541
1549
|
N.value = !0;
|
|
1542
1550
|
const {
|
|
1543
1551
|
error: b
|
|
@@ -1547,87 +1555,87 @@ const It = {
|
|
|
1547
1555
|
emailVerifyId: p.value,
|
|
1548
1556
|
confirmText: x.value.confirmText
|
|
1549
1557
|
});
|
|
1550
|
-
N.value = !1, b || (
|
|
1558
|
+
N.value = !1, b || (t.value = "success", v(), o(), m("deleted"));
|
|
1551
1559
|
}
|
|
1552
1560
|
function Q() {
|
|
1553
1561
|
window.location.href = "/";
|
|
1554
1562
|
}
|
|
1555
|
-
return (
|
|
1563
|
+
return (R, b) => t.value === "check" ? (h(), w(e(D), {
|
|
1556
1564
|
key: 0,
|
|
1557
1565
|
type: "warning",
|
|
1558
1566
|
title: "注销账号"
|
|
1559
1567
|
}, {
|
|
1560
|
-
action:
|
|
1561
|
-
size:
|
|
1568
|
+
action: a(() => [i(e(S), {
|
|
1569
|
+
size: g.size,
|
|
1562
1570
|
type: "primary",
|
|
1563
1571
|
status: "danger",
|
|
1564
1572
|
loading: V.value,
|
|
1565
1573
|
onClick: K
|
|
1566
1574
|
}, {
|
|
1567
|
-
default:
|
|
1575
|
+
default: a(() => [k(T(V.value ? "检查中..." : "开始注销"), 1)]),
|
|
1568
1576
|
_: 1
|
|
1569
1577
|
}, 8, ["size", "loading"])]),
|
|
1570
|
-
default:
|
|
1578
|
+
default: a(() => [b[6] || (b[6] = k(" 注销账号后,登录凭据、第三方绑定和当前登录态会被清除;历史订单、用量、审计等业务记录会保留用于对账和安全追溯。 ", -1))]),
|
|
1571
1579
|
_: 1
|
|
1572
|
-
})) :
|
|
1580
|
+
})) : t.value === "dependencies" ? (h(), j(Z, {
|
|
1573
1581
|
key: 1
|
|
1574
|
-
}, [
|
|
1582
|
+
}, [i(e(D), {
|
|
1575
1583
|
type: "error",
|
|
1576
1584
|
title: "无法注销账号"
|
|
1577
1585
|
}, {
|
|
1578
|
-
default:
|
|
1586
|
+
default: a(() => [...b[7] || (b[7] = [k(" 您的账号下还有以下资源,请先处理后再注销: ", -1)])]),
|
|
1579
1587
|
_: 1
|
|
1580
|
-
}), C("div",
|
|
1588
|
+
}), C("div", Tt, [(h(!0), j(Z, null, Ve(u.value, (B) => (h(), j("div", {
|
|
1581
1589
|
key: B.type,
|
|
1582
1590
|
class: "dependency-item"
|
|
1583
|
-
}, [C("span",
|
|
1584
|
-
size:
|
|
1585
|
-
onClick: b[0] || (b[0] = (B) =>
|
|
1591
|
+
}, [C("span", Bt, T(B.label), 1), C("span", Rt, T(B.count) + " 个", 1)]))), 128))]), C("div", Et, [i(e(S), {
|
|
1592
|
+
size: g.size,
|
|
1593
|
+
onClick: b[0] || (b[0] = (B) => t.value = "check")
|
|
1586
1594
|
}, {
|
|
1587
|
-
default:
|
|
1595
|
+
default: a(() => [...b[8] || (b[8] = [k("返回", -1)])]),
|
|
1588
1596
|
_: 1
|
|
1589
|
-
}, 8, ["size"])])], 64)) :
|
|
1597
|
+
}, 8, ["size"])])], 64)) : t.value === "sendCode" ? (h(), w(e(D), {
|
|
1590
1598
|
key: 2,
|
|
1591
1599
|
type: "normal",
|
|
1592
1600
|
title: "身份验证"
|
|
1593
1601
|
}, {
|
|
1594
|
-
action:
|
|
1595
|
-
default:
|
|
1596
|
-
size:
|
|
1597
|
-
onClick: b[1] || (b[1] = (B) =>
|
|
1602
|
+
action: a(() => [i(e(ce), null, {
|
|
1603
|
+
default: a(() => [i(e(S), {
|
|
1604
|
+
size: g.size,
|
|
1605
|
+
onClick: b[1] || (b[1] = (B) => t.value = "check")
|
|
1598
1606
|
}, {
|
|
1599
|
-
default:
|
|
1607
|
+
default: a(() => [...b[9] || (b[9] = [k("取消", -1)])]),
|
|
1600
1608
|
_: 1
|
|
1601
|
-
}, 8, ["size"]),
|
|
1602
|
-
size:
|
|
1609
|
+
}, 8, ["size"]), i(e(S), {
|
|
1610
|
+
size: g.size,
|
|
1603
1611
|
type: "primary",
|
|
1604
|
-
loading:
|
|
1612
|
+
loading: n.value,
|
|
1605
1613
|
onClick: _
|
|
1606
1614
|
}, {
|
|
1607
|
-
default:
|
|
1615
|
+
default: a(() => [k(T(n.value ? "发送中..." : "发送验证码"), 1)]),
|
|
1608
1616
|
_: 1
|
|
1609
1617
|
}, 8, ["size", "loading"])]),
|
|
1610
1618
|
_: 1
|
|
1611
1619
|
})]),
|
|
1612
|
-
default:
|
|
1620
|
+
default: a(() => [k(" 为确保账号安全,我们将向您的邮箱 " + T(z.value) + " 发送验证码 ", 1)]),
|
|
1613
1621
|
_: 1
|
|
1614
|
-
})) :
|
|
1622
|
+
})) : t.value === "confirm" ? (h(), j(Z, {
|
|
1615
1623
|
key: 3
|
|
1616
|
-
}, [
|
|
1624
|
+
}, [i(e(D), {
|
|
1617
1625
|
type: "warning",
|
|
1618
1626
|
title: "确认注销"
|
|
1619
1627
|
}, {
|
|
1620
|
-
default:
|
|
1628
|
+
default: a(() => [k(" 验证码已发送至 " + T(z.value) + ",注销后该账号将无法继续登录,请谨慎操作 ", 1)]),
|
|
1621
1629
|
_: 1
|
|
1622
|
-
}),
|
|
1630
|
+
}), i(e(J), {
|
|
1623
1631
|
ref_key: "formRef",
|
|
1624
|
-
ref:
|
|
1632
|
+
ref: E,
|
|
1625
1633
|
model: x.value,
|
|
1626
|
-
size:
|
|
1634
|
+
size: g.size,
|
|
1627
1635
|
class: "confirm-form",
|
|
1628
1636
|
layout: "vertical"
|
|
1629
1637
|
}, {
|
|
1630
|
-
default:
|
|
1638
|
+
default: a(() => [i(e(A), {
|
|
1631
1639
|
field: "userToken",
|
|
1632
1640
|
label: "邮箱验证码",
|
|
1633
1641
|
rules: [{
|
|
@@ -1635,22 +1643,22 @@ const It = {
|
|
|
1635
1643
|
message: "请输入验证码"
|
|
1636
1644
|
}]
|
|
1637
1645
|
}, {
|
|
1638
|
-
default:
|
|
1646
|
+
default: a(() => [C("div", Lt, [i(e(M), {
|
|
1639
1647
|
modelValue: x.value.userToken,
|
|
1640
1648
|
"onUpdate:modelValue": b[2] || (b[2] = (B) => x.value.userToken = B),
|
|
1641
1649
|
placeholder: "请输入6位验证码",
|
|
1642
1650
|
"max-length": 6,
|
|
1643
1651
|
"allow-clear": ""
|
|
1644
|
-
}, null, 8, ["modelValue"]),
|
|
1645
|
-
disabled:
|
|
1646
|
-
loading:
|
|
1652
|
+
}, null, 8, ["modelValue"]), i(e(S), {
|
|
1653
|
+
disabled: s.value > 0,
|
|
1654
|
+
loading: n.value,
|
|
1647
1655
|
onClick: _
|
|
1648
1656
|
}, {
|
|
1649
|
-
default:
|
|
1657
|
+
default: a(() => [k(T(s.value > 0 ? `${s.value}s 后重发` : "重新发送"), 1)]),
|
|
1650
1658
|
_: 1
|
|
1651
1659
|
}, 8, ["disabled", "loading"])])]),
|
|
1652
1660
|
_: 1
|
|
1653
|
-
}),
|
|
1661
|
+
}), i(e(A), {
|
|
1654
1662
|
field: "password",
|
|
1655
1663
|
label: "登录密码",
|
|
1656
1664
|
rules: [{
|
|
@@ -1658,14 +1666,14 @@ const It = {
|
|
|
1658
1666
|
message: "请输入密码"
|
|
1659
1667
|
}]
|
|
1660
1668
|
}, {
|
|
1661
|
-
default:
|
|
1669
|
+
default: a(() => [i(e(Pe), {
|
|
1662
1670
|
modelValue: x.value.password,
|
|
1663
1671
|
"onUpdate:modelValue": b[3] || (b[3] = (B) => x.value.password = B),
|
|
1664
1672
|
placeholder: "请输入您的登录密码",
|
|
1665
1673
|
"allow-clear": ""
|
|
1666
1674
|
}, null, 8, ["modelValue"])]),
|
|
1667
1675
|
_: 1
|
|
1668
|
-
}),
|
|
1676
|
+
}), i(e(A), {
|
|
1669
1677
|
field: "confirmText",
|
|
1670
1678
|
label: "请输入「注销」以确认",
|
|
1671
1679
|
rules: [{
|
|
@@ -1675,27 +1683,27 @@ const It = {
|
|
|
1675
1683
|
validator: L
|
|
1676
1684
|
}]
|
|
1677
1685
|
}, {
|
|
1678
|
-
default:
|
|
1686
|
+
default: a(() => [i(e(M), {
|
|
1679
1687
|
modelValue: x.value.confirmText,
|
|
1680
1688
|
"onUpdate:modelValue": b[4] || (b[4] = (B) => x.value.confirmText = B),
|
|
1681
1689
|
placeholder: "注销",
|
|
1682
1690
|
"allow-clear": ""
|
|
1683
1691
|
}, null, 8, ["modelValue"])]),
|
|
1684
1692
|
_: 1
|
|
1685
|
-
}, 8, ["rules"]),
|
|
1686
|
-
default:
|
|
1687
|
-
default:
|
|
1688
|
-
onClick: b[5] || (b[5] = (B) =>
|
|
1693
|
+
}, 8, ["rules"]), i(e(A), null, {
|
|
1694
|
+
default: a(() => [i(e(ce), null, {
|
|
1695
|
+
default: a(() => [i(e(S), {
|
|
1696
|
+
onClick: b[5] || (b[5] = (B) => t.value = "check")
|
|
1689
1697
|
}, {
|
|
1690
|
-
default:
|
|
1698
|
+
default: a(() => [...b[10] || (b[10] = [k("取消", -1)])]),
|
|
1691
1699
|
_: 1
|
|
1692
|
-
}),
|
|
1700
|
+
}), i(e(S), {
|
|
1693
1701
|
type: "primary",
|
|
1694
1702
|
status: "danger",
|
|
1695
1703
|
loading: N.value,
|
|
1696
|
-
onClick:
|
|
1704
|
+
onClick: F
|
|
1697
1705
|
}, {
|
|
1698
|
-
default:
|
|
1706
|
+
default: a(() => [k(T(N.value ? "注销中..." : "确认注销"), 1)]),
|
|
1699
1707
|
_: 1
|
|
1700
1708
|
}, 8, ["loading"])]),
|
|
1701
1709
|
_: 1
|
|
@@ -1703,43 +1711,43 @@ const It = {
|
|
|
1703
1711
|
_: 1
|
|
1704
1712
|
})]),
|
|
1705
1713
|
_: 1
|
|
1706
|
-
}, 8, ["model", "size"])], 64)) :
|
|
1714
|
+
}, 8, ["model", "size"])], 64)) : t.value === "success" ? (h(), w(e(Se), {
|
|
1707
1715
|
key: 4,
|
|
1708
1716
|
status: "success",
|
|
1709
1717
|
title: "账号已注销"
|
|
1710
1718
|
}, {
|
|
1711
|
-
subtitle:
|
|
1712
|
-
extra:
|
|
1719
|
+
subtitle: a(() => [...b[11] || (b[11] = [k(" 您的账号已成功注销,登录凭据和绑定身份已清除 ", -1)])]),
|
|
1720
|
+
extra: a(() => [i(e(S), {
|
|
1713
1721
|
type: "primary",
|
|
1714
1722
|
onClick: Q
|
|
1715
1723
|
}, {
|
|
1716
|
-
default:
|
|
1724
|
+
default: a(() => [...b[12] || (b[12] = [k("返回首页", -1)])]),
|
|
1717
1725
|
_: 1
|
|
1718
1726
|
})]),
|
|
1719
1727
|
_: 1
|
|
1720
1728
|
})) : P("", !0);
|
|
1721
1729
|
}
|
|
1722
|
-
}),
|
|
1730
|
+
}), Mt = /* @__PURE__ */ H(Nt, [["__scopeId", "data-v-da2ecd73"]]), Ot = {
|
|
1723
1731
|
class: "content"
|
|
1724
|
-
},
|
|
1732
|
+
}, Ft = {
|
|
1725
1733
|
class: "left"
|
|
1726
1734
|
}, Dt = {
|
|
1727
1735
|
class: "right"
|
|
1728
|
-
},
|
|
1736
|
+
}, jt = /* @__PURE__ */ O({
|
|
1729
1737
|
__name: "AuthkitAppSetting",
|
|
1730
1738
|
emits: ["confirm", "cancel"],
|
|
1731
1739
|
setup(f, {
|
|
1732
|
-
expose:
|
|
1733
|
-
emit:
|
|
1740
|
+
expose: l,
|
|
1741
|
+
emit: g
|
|
1734
1742
|
}) {
|
|
1735
|
-
const m =
|
|
1736
|
-
function
|
|
1743
|
+
const m = g;
|
|
1744
|
+
function r() {
|
|
1737
1745
|
m("cancel");
|
|
1738
1746
|
}
|
|
1739
|
-
function
|
|
1747
|
+
function v() {
|
|
1740
1748
|
L.value = !1, m("cancel");
|
|
1741
1749
|
}
|
|
1742
|
-
const
|
|
1750
|
+
const o = y("large"), t = y(["PersonalInformation"]), V = [{
|
|
1743
1751
|
provider: "github",
|
|
1744
1752
|
name: "GitHub",
|
|
1745
1753
|
meta: {
|
|
@@ -1765,24 +1773,24 @@ const It = {
|
|
|
1765
1773
|
}
|
|
1766
1774
|
}], {
|
|
1767
1775
|
appsData: u
|
|
1768
|
-
} = pe(),
|
|
1776
|
+
} = pe(), n = $(() => {
|
|
1769
1777
|
const _ = u.value.authMethods;
|
|
1770
1778
|
return _.signUp.email || _.login.emailPassword || _.login.emailCode;
|
|
1771
|
-
}), p =
|
|
1779
|
+
}), p = $(() => {
|
|
1772
1780
|
const _ = u.value.authMethods;
|
|
1773
1781
|
return _.signUp.phone || _.login.phonePassword || _.login.phoneCode;
|
|
1774
|
-
}),
|
|
1782
|
+
}), s = $(() => {
|
|
1775
1783
|
const _ = u.value.authMethods;
|
|
1776
1784
|
return _.login.emailPassword || _.login.phonePassword;
|
|
1777
|
-
}), d =
|
|
1778
|
-
var
|
|
1779
|
-
return (
|
|
1785
|
+
}), d = $(() => V.filter((_) => {
|
|
1786
|
+
var I, F;
|
|
1787
|
+
return (F = (I = u.value.oauth) == null ? void 0 : I[_.provider]) == null ? void 0 : F.enabled;
|
|
1780
1788
|
}).map((_) => ({
|
|
1781
1789
|
..._,
|
|
1782
1790
|
path: `OAuthBinding:${_.provider}`
|
|
1783
|
-
}))), z =
|
|
1791
|
+
}))), z = $(() => {
|
|
1784
1792
|
const _ = [];
|
|
1785
|
-
|
|
1793
|
+
n.value && _.push({
|
|
1786
1794
|
name: "邮箱",
|
|
1787
1795
|
path: "EmailBinding",
|
|
1788
1796
|
meta: {
|
|
@@ -1794,7 +1802,7 @@ const It = {
|
|
|
1794
1802
|
meta: {
|
|
1795
1803
|
icon: "mingcute:phone-fill"
|
|
1796
1804
|
}
|
|
1797
|
-
}),
|
|
1805
|
+
}), s.value && _.push({
|
|
1798
1806
|
name: "登录密码",
|
|
1799
1807
|
path: "SetPassword",
|
|
1800
1808
|
meta: {
|
|
@@ -1807,7 +1815,7 @@ const It = {
|
|
|
1807
1815
|
icon: "mdi:account-remove"
|
|
1808
1816
|
}
|
|
1809
1817
|
});
|
|
1810
|
-
const
|
|
1818
|
+
const I = [{
|
|
1811
1819
|
name: "个人信息",
|
|
1812
1820
|
path: "PersonalInformation",
|
|
1813
1821
|
meta: {
|
|
@@ -1822,91 +1830,92 @@ const It = {
|
|
|
1822
1830
|
},
|
|
1823
1831
|
children: _
|
|
1824
1832
|
}];
|
|
1825
|
-
return d.value.length > 0 &&
|
|
1833
|
+
return d.value.length > 0 && I.push({
|
|
1826
1834
|
name: "第三方账户",
|
|
1827
1835
|
path: "AccountBinding",
|
|
1828
1836
|
meta: {
|
|
1829
1837
|
icon: "mingcute:link-fill"
|
|
1830
1838
|
},
|
|
1831
1839
|
children: d.value
|
|
1832
|
-
}),
|
|
1833
|
-
}),
|
|
1840
|
+
}), I;
|
|
1841
|
+
}), E = $(() => d.value.find((_) => _.path === t.value[0]));
|
|
1834
1842
|
function x(_) {
|
|
1835
|
-
const
|
|
1836
|
-
|
|
1843
|
+
const I = _.path;
|
|
1844
|
+
t.value = [I];
|
|
1837
1845
|
}
|
|
1838
1846
|
const {
|
|
1839
1847
|
changeType: N,
|
|
1840
1848
|
show: L
|
|
1841
|
-
} =
|
|
1849
|
+
} = Le(m);
|
|
1842
1850
|
de(d, (_) => {
|
|
1843
|
-
|
|
1851
|
+
t.value[0].startsWith("OAuthBinding:") && !_.some((I) => I.path === t.value[0]) && (t.value = ["PersonalInformation"]);
|
|
1844
1852
|
}), de(z, (_) => {
|
|
1845
|
-
const
|
|
1853
|
+
const I = t.value[0];
|
|
1846
1854
|
_.some((Q) => {
|
|
1847
|
-
var
|
|
1848
|
-
return Q.path ===
|
|
1849
|
-
}) || (
|
|
1855
|
+
var R;
|
|
1856
|
+
return Q.path === I || ((R = Q.children) == null ? void 0 : R.some((b) => b.path === I));
|
|
1857
|
+
}) || (t.value = ["PersonalInformation"]);
|
|
1850
1858
|
});
|
|
1851
|
-
function K(_,
|
|
1852
|
-
L.value =
|
|
1859
|
+
function K(_, I) {
|
|
1860
|
+
L.value = I, N.value = "编辑";
|
|
1853
1861
|
}
|
|
1854
|
-
return
|
|
1862
|
+
return l({
|
|
1855
1863
|
setData: K
|
|
1856
|
-
}), (_,
|
|
1864
|
+
}), (_, I) => (h(), w(e(Ae), {
|
|
1857
1865
|
visible: e(L),
|
|
1858
|
-
"onUpdate:visible":
|
|
1866
|
+
"onUpdate:visible": I[1] || (I[1] = (F) => Ce(L) ? L.value = F : null),
|
|
1859
1867
|
"unmount-on-close": "",
|
|
1860
1868
|
"body-class": "AppSettingbodyClass",
|
|
1861
1869
|
"mask-closable": !1,
|
|
1862
1870
|
footer: !1,
|
|
1863
|
-
width: e(
|
|
1864
|
-
onCancel:
|
|
1871
|
+
width: e(be),
|
|
1872
|
+
onCancel: r
|
|
1865
1873
|
}, {
|
|
1866
|
-
title:
|
|
1867
|
-
default:
|
|
1868
|
-
"selected-keys":
|
|
1869
|
-
"onUpdate:selectedKeys":
|
|
1874
|
+
title: a(() => [...I[2] || (I[2] = [k(" 用户信息 ", -1)])]),
|
|
1875
|
+
default: a(() => [C("div", Ot, [C("div", Ft, [i(Ee, {
|
|
1876
|
+
"selected-keys": t.value,
|
|
1877
|
+
"onUpdate:selectedKeys": I[0] || (I[0] = (F) => t.value = F),
|
|
1870
1878
|
menus: z.value,
|
|
1871
1879
|
onChange: x
|
|
1872
|
-
}, null, 8, ["selected-keys", "menus"])]), C("div", Dt, [
|
|
1880
|
+
}, null, 8, ["selected-keys", "menus"])]), C("div", Dt, [t.value[0] === "PersonalInformation" ? (h(), w(He, {
|
|
1873
1881
|
key: 0,
|
|
1874
|
-
size:
|
|
1875
|
-
}, null, 8, ["size"])) : P("", !0),
|
|
1882
|
+
size: o.value
|
|
1883
|
+
}, null, 8, ["size"])) : P("", !0), t.value[0] === "EmailBinding" ? (h(), w(ut, {
|
|
1876
1884
|
key: 1,
|
|
1877
|
-
size:
|
|
1878
|
-
}, null, 8, ["size"])) : P("", !0),
|
|
1885
|
+
size: o.value
|
|
1886
|
+
}, null, 8, ["size"])) : P("", !0), t.value[0] === "PhoneBinding" ? (h(), w(kt, {
|
|
1879
1887
|
key: 2,
|
|
1880
|
-
size:
|
|
1881
|
-
}, null, 8, ["size"])) : P("", !0),
|
|
1888
|
+
size: o.value
|
|
1889
|
+
}, null, 8, ["size"])) : P("", !0), t.value[0] === "SetPassword" ? (h(), w(at, {
|
|
1882
1890
|
key: 3,
|
|
1883
|
-
size:
|
|
1884
|
-
}, null, 8, ["size"])) : P("", !0),
|
|
1891
|
+
size: o.value
|
|
1892
|
+
}, null, 8, ["size"])) : P("", !0), E.value ? (h(), w(qt, {
|
|
1885
1893
|
key: 4,
|
|
1886
|
-
provider:
|
|
1887
|
-
label:
|
|
1888
|
-
size:
|
|
1889
|
-
}, null, 8, ["provider", "label", "size"])) : P("", !0),
|
|
1894
|
+
provider: E.value.provider,
|
|
1895
|
+
label: E.value.name,
|
|
1896
|
+
size: o.value
|
|
1897
|
+
}, null, 8, ["provider", "label", "size"])) : P("", !0), t.value[0] === "AccountDelete" ? (h(), w(Mt, {
|
|
1890
1898
|
key: 5,
|
|
1891
|
-
size:
|
|
1892
|
-
onDeleted:
|
|
1899
|
+
size: o.value,
|
|
1900
|
+
onDeleted: v
|
|
1893
1901
|
}, null, 8, ["size"])) : P("", !0)])])]),
|
|
1894
1902
|
_: 1
|
|
1895
1903
|
}, 8, ["visible", "width"]));
|
|
1896
1904
|
}
|
|
1897
|
-
}),
|
|
1905
|
+
}), ra = /* @__PURE__ */ H(jt, [["__scopeId", "data-v-dd773794"]]);
|
|
1898
1906
|
export {
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1907
|
+
ra as A,
|
|
1908
|
+
bt as B,
|
|
1909
|
+
ut as E,
|
|
1910
|
+
qt as O,
|
|
1911
|
+
tt as P,
|
|
1904
1912
|
ie as S,
|
|
1905
|
-
|
|
1906
|
-
|
|
1913
|
+
kt as _,
|
|
1914
|
+
st as a,
|
|
1907
1915
|
re as b,
|
|
1908
|
-
|
|
1916
|
+
He as c,
|
|
1909
1917
|
ve as d,
|
|
1910
|
-
|
|
1911
|
-
|
|
1918
|
+
at as e,
|
|
1919
|
+
ge as r,
|
|
1920
|
+
$t as u
|
|
1912
1921
|
};
|