@huyooo/ui 0.7.20 → 0.7.26

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.
Files changed (64) hide show
  1. package/dist/{AuthkitAuthModal-DxxZlUbh.js → AuthkitAuthModal-C1Kgu1TA.js} +670 -685
  2. package/dist/{AuthkitSignInPhone-BfqNvheZ.js → AuthkitSignInPhone-BG7r63dN.js} +224 -232
  3. package/dist/{Clipboard-C_4QFg2W.js → Clipboard-8rWlOPTZ.js} +2 -2
  4. package/dist/{Contact-DJtDuS50.js → Contact-Bpl7sIjY.js} +2 -2
  5. package/dist/{FeedbackItem-CI-w_fOt.js → FeedbackItem-DMpvHrOD.js} +3 -3
  6. package/dist/{FeedbackModal-3k-cMuoY.js → FeedbackModal-DIhSPUPO.js} +329 -342
  7. package/dist/{MessageHandle-Pxxvhs-7.js → MessageHandle-WA95I84_.js} +212 -236
  8. package/dist/{MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-BVvzvLUA.js → MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-BRficqbp.js} +26 -28
  9. package/dist/{MessageNotifications-FkiOW4qU.js → MessageNotifications-DmgFNjH7.js} +1 -1
  10. package/dist/{PaySubscriptions-BHTKDYFN.js → PaySubscriptions-F5sNex0h.js} +50 -74
  11. package/dist/{ReferrerReferees-9wk0_tGC.js → ReferrerReferees-DMA8Tj5i.js} +30 -32
  12. package/dist/{Upload.vue_vue_type_script_setup_true_lang-RZzfS9p1.js → Upload.vue_vue_type_script_setup_true_lang-D7ZGc2ZS.js} +1 -1
  13. package/dist/{UserAccountMenu-CKGTR8GB.js → UserAccountMenu-CkUtqNxY.js} +7 -7
  14. package/dist/{WidthContainer-BC30d-AV.js → WidthContainer-DSQui1pX.js} +7 -7
  15. package/dist/api/Authkit/Users.d.ts +7 -7
  16. package/dist/api/Authkit/apps.d.ts +2 -2
  17. package/dist/api/Authkit/auth.d.ts +10 -10
  18. package/dist/api/Authkit/oauth.d.ts +3 -3
  19. package/dist/api/Authkit/verify.d.ts +18 -5
  20. package/dist/api/Buckets/Files.d.ts +7 -7
  21. package/dist/api/Buckets.d.ts +2 -2
  22. package/dist/api/Invoices.d.ts +6 -6
  23. package/dist/api/Message/ChangelogNotifications.d.ts +2 -31
  24. package/dist/api/Message/EventNotifications.d.ts +2 -35
  25. package/dist/api/Message/MessageNotifications.d.ts +5 -35
  26. package/dist/api/Message/NoticeNotifications.d.ts +5 -42
  27. package/dist/api/Messages.d.ts +2 -2
  28. package/dist/api/Orders.d.ts +9 -9
  29. package/dist/api/Products.d.ts +6 -6
  30. package/dist/api/Quotas.d.ts +6 -6
  31. package/dist/api/Referrer.d.ts +1 -1
  32. package/dist/api/Subscriptions.d.ts +7 -7
  33. package/dist/api/index.d.ts +8 -8
  34. package/dist/authkit.js +6 -6
  35. package/dist/common/globalConfig.d.ts +2 -2
  36. package/dist/common.js +1 -1
  37. package/dist/composables/Authkit/useAuthkitAppsAuthPageInfo.d.ts +1 -1
  38. package/dist/composables/Authkit/useAuthkitAuth.d.ts +3 -3
  39. package/dist/composables/useMessageNotifications.d.ts +3 -3
  40. package/dist/composables.js +9 -9
  41. package/dist/feedback.js +3 -3
  42. package/dist/index.js +24 -24
  43. package/dist/main.d.ts +1 -0
  44. package/dist/message.js +3 -3
  45. package/dist/pay.js +1 -1
  46. package/dist/privateCom.js +1 -1
  47. package/dist/referrer.js +1 -1
  48. package/dist/request-B4CMspsP.js +196 -0
  49. package/dist/style.css +1 -1
  50. package/dist/upload.js +2 -2
  51. package/dist/{useAuthkitAppsAuthPageInfo-AFq46sfo.js → useAuthkitAppsAuthPageInfo-CtsTqri7.js} +17 -19
  52. package/dist/{useAuthkitCreateAndUpdate-BZXteclG.js → useAuthkitCreateAndUpdate-BUyZbiBj.js} +1 -1
  53. package/dist/useAuthkitUsersProfile-B7wHZwe-.js +257 -0
  54. package/dist/{useDownloads-2DzDw0ic.js → useDownloads-Cl_-B4sP.js} +1 -1
  55. package/dist/useMessageNotifications-CP7gi893.js +78 -0
  56. package/dist/{useSEO-BmD-Tu3B.js → useSEO-C_4yDk7S.js} +2 -2
  57. package/dist/{useTableHandle-SmqaOxbN.js → useTableHandle-6ekhLVbK.js} +1 -1
  58. package/dist/{useUploadCos-8imaHXLO.js → useUploadCos-dYc8op7M.js} +10 -7
  59. package/dist/user.js +1 -1
  60. package/dist/utils/request.d.ts +25 -2
  61. package/package.json +1 -1
  62. package/dist/auth-CfexrvhT.js +0 -188
  63. package/dist/useAuthkitUsersProfile-B26kPQrp.js +0 -234
  64. package/dist/useMessageNotifications-DiF1CPlT.js +0 -84
@@ -1,4 +1,4 @@
1
- import { defineComponent as z, computed as N, createElementBlock as k, openBlock as g, normalizeStyle as O, createElementVNode as s, createCommentVNode as $, renderSlot as D, ref as m, toDisplayString as P, createVNode as t, unref as l, withCtx as i, createTextVNode as V, onMounted as K, createBlock as E, useSlots as G } from "vue";
1
+ import { defineComponent as z, computed as N, createElementBlock as w, openBlock as g, normalizeStyle as O, createElementVNode as s, createCommentVNode as $, renderSlot as D, ref as m, toDisplayString as P, createVNode as o, unref as a, withCtx as r, createTextVNode as V, onMounted as K, createBlock as E, useSlots as G } from "vue";
2
2
  import { _ as C } from "./_plugin-vue_export-helper-CHgC5LLL.js";
3
3
  /* empty css */
4
4
  /* empty css */
@@ -7,14 +7,13 @@ import { _ as C } from "./_plugin-vue_export-helper-CHgC5LLL.js";
7
7
  /* empty css */
8
8
  /* empty css */
9
9
  /* empty css */
10
- import { List as J, ListItem as x, ListItemMeta as T, Avatar as F, Button as R, Form as A, FormItem as b, Input as w, Link as M } from "@arco-design/web-vue";
11
- import { a as Q } from "./useAuthkitAppsAuthPageInfo-AFq46sfo.js";
12
- import { o as W } from "./auth-CfexrvhT.js";
13
- import { u as X, a as Y } from "./useAuthkitUsersProfile-B26kPQrp.js";
14
- import { S as U, v as Z, q as L, g as ee, h as te } from "./AuthkitAuthModal-DxxZlUbh.js";
10
+ import { List as J, ListItem as x, ListItemMeta as T, Avatar as F, Button as R, Form as A, FormItem as b, Input as S, Link as M } from "@arco-design/web-vue";
11
+ import { a as Q } from "./useAuthkitAppsAuthPageInfo-CtsTqri7.js";
12
+ import { o as W, u as X, a as Y } from "./useAuthkitUsersProfile-B7wHZwe-.js";
13
+ import { S as U, v as Z, q as L, g as ee, h as te } from "./AuthkitAuthModal-C1Kgu1TA.js";
15
14
  const oe = {
16
15
  class: "header"
17
- }, le = ["href"], ae = {
16
+ }, ae = ["href"], le = {
18
17
  class: "container"
19
18
  }, se = /* @__PURE__ */ z({
20
19
  __name: "AuthkitAuthContainer",
@@ -59,29 +58,29 @@ const oe = {
59
58
  }
60
59
  },
61
60
  setup(y) {
62
- const p = y, n = N(() => p.backgroundType === "color" ? {
63
- backgroundColor: p.backgroundColor
61
+ const f = y, n = N(() => f.backgroundType === "color" ? {
62
+ backgroundColor: f.backgroundColor
64
63
  } : {
65
- backgroundImage: `url(${p.backgroundImage})`
64
+ backgroundImage: `url(${f.backgroundImage})`
66
65
  });
67
- return (a, f) => (g(), k("div", {
66
+ return (l, p) => (g(), w("div", {
68
67
  class: "auth",
69
68
  style: O(n.value)
70
- }, [s("div", oe, [p.name ? (g(), k("a", {
69
+ }, [s("div", oe, [f.name ? (g(), w("a", {
71
70
  key: 0,
72
- href: p.appHomePage,
71
+ href: f.appHomePage,
73
72
  target: "_self",
74
73
  class: "link",
75
74
  style: O({
76
- color: p.linkColor
75
+ color: f.linkColor
77
76
  })
78
- }, " 返回主页 ", 12, le)) : $("", !0)]), s("div", ae, [D(a.$slots, "default", {}, void 0, !0)])], 4));
77
+ }, " 返回主页 ", 12, ae)) : $("", !0)]), s("div", le, [D(l.$slots, "default", {}, void 0, !0)])], 4));
79
78
  }
80
- }), Ze = /* @__PURE__ */ C(se, [["__scopeId", "data-v-203946ff"]]), ie = {
79
+ }), Ye = /* @__PURE__ */ C(se, [["__scopeId", "data-v-203946ff"]]), ie = {
81
80
  class: "box"
82
- }, ne = {
83
- class: "title"
84
81
  }, re = {
82
+ class: "title"
83
+ }, ne = {
85
84
  class: "content"
86
85
  }, de = {
87
86
  class: "redirect"
@@ -139,51 +138,46 @@ const oe = {
139
138
  }
140
139
  },
141
140
  setup(y) {
142
- const p = m(!1), n = y, a = m({
141
+ const f = m(!1), n = y, l = m({
143
142
  appKey: "",
144
143
  name: "",
145
144
  homePageUrl: "",
146
145
  createAt: "",
147
146
  authorizationCallback: ""
148
147
  });
149
- function f() {
150
- Q({
151
- id: n.clientId
152
- }).then(({
148
+ async function p() {
149
+ const {
153
150
  data: u
154
- }) => {
155
- a.value = u;
156
- }).catch((u) => {
157
- console.error("获取应用信息失败:", u);
151
+ } = await Q({
152
+ id: n.clientId
158
153
  });
154
+ u && (l.value = u);
159
155
  }
160
- f();
161
- function d() {
162
- p.value = !0, W({
156
+ p();
157
+ async function d() {
158
+ f.value = !0;
159
+ const {
160
+ data: u
161
+ } = await W({
163
162
  client_id: n.clientId,
164
163
  response_type: n.responseType,
165
164
  scope: n.scope,
166
165
  state: n.state,
167
166
  redirect_uri: n.redirectUri
168
- }).then(({
169
- data: u
170
- }) => {
171
- p.value = !1, window.location = u.authorizeUrl;
172
- }).catch((u) => {
173
- p.value = !1, console.error("授权失败:", u);
174
167
  });
168
+ f.value = !1, u && (window.location = u.authorizeUrl);
175
169
  }
176
- return (u, e) => (g(), k("div", ie, [s("div", ne, P(`授权 ${a.value.name}`), 1), s("div", re, [t(l(J), null, {
177
- default: i(() => [t(l(x), null, {
178
- default: i(() => {
170
+ return (u, e) => (g(), w("div", ie, [s("div", re, P(`授权 ${l.value.name}`), 1), s("div", ne, [o(a(J), null, {
171
+ default: r(() => [o(a(x), null, {
172
+ default: r(() => {
179
173
  var _;
180
- return [t(l(T), {
181
- title: a.value.name,
174
+ return [o(a(T), {
175
+ title: l.value.name,
182
176
  description: `想要使用您的${(_ = n.userInfo) == null ? void 0 : _.nickname}账户`
183
177
  }, {
184
- avatar: i(() => {
178
+ avatar: r(() => {
185
179
  var v;
186
- return [t(l(F), {
180
+ return [o(a(F), {
187
181
  shape: "square",
188
182
  "image-url": (v = n.userInfo) == null ? void 0 : v.avatar
189
183
  }, null, 8, ["image-url"])];
@@ -192,15 +186,15 @@ const oe = {
192
186
  }, 8, ["title", "description"])];
193
187
  }),
194
188
  _: 1
195
- }), t(l(x), null, {
196
- default: i(() => [t(l(T), {
189
+ }), o(a(x), null, {
190
+ default: r(() => [o(a(T), {
197
191
  title: "公开信息",
198
192
  description: "头像、昵称"
199
193
  }, {
200
- avatar: i(() => [t(l(F), {
194
+ avatar: r(() => [o(a(F), {
201
195
  shape: "square"
202
196
  }, {
203
- default: i(() => [...e[0] || (e[0] = [s("img", {
197
+ default: r(() => [...e[0] || (e[0] = [s("img", {
204
198
  alt: "avatar",
205
199
  src: "https://p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/3ee5f13fb09879ecb5185e440cef6eb9.png~tplv-uwbnlip3yd-webp.webp"
206
200
  }, null, -1)])]),
@@ -209,15 +203,15 @@ const oe = {
209
203
  _: 1
210
204
  })]),
211
205
  _: 1
212
- }), t(l(x), null, {
213
- default: i(() => [t(l(T), {
206
+ }), o(a(x), null, {
207
+ default: r(() => [o(a(T), {
214
208
  title: "个人用户数据",
215
209
  description: "电子邮件地址"
216
210
  }, {
217
- avatar: i(() => [t(l(F), {
211
+ avatar: r(() => [o(a(F), {
218
212
  shape: "square"
219
213
  }, {
220
- default: i(() => [...e[1] || (e[1] = [s("img", {
214
+ default: r(() => [...e[1] || (e[1] = [s("img", {
221
215
  alt: "avatar",
222
216
  src: "https://p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/3ee5f13fb09879ecb5185e440cef6eb9.png~tplv-uwbnlip3yd-webp.webp"
223
217
  }, null, -1)])]),
@@ -228,22 +222,22 @@ const oe = {
228
222
  _: 1
229
223
  })]),
230
224
  _: 1
231
- }), t(l(R), {
225
+ }), o(a(R), {
232
226
  type: "primary",
233
227
  size: n.size,
234
- loading: p.value,
228
+ loading: f.value,
235
229
  onClick: d
236
230
  }, {
237
- default: i(() => [...e[2] || (e[2] = [V(" 授权 ", -1)])]),
231
+ default: r(() => [...e[2] || (e[2] = [V(" 授权 ", -1)])]),
238
232
  _: 1
239
233
  }, 8, ["size", "loading"]), s("div", de, [e[3] || (e[3] = s("div", {
240
234
  style: {
241
235
  color: "#888",
242
236
  "font-size": "12px"
243
237
  }
244
- }, "授权后将跳转至", -1)), s("div", ue, P(a.value.authorizationCallback), 1)])])]));
238
+ }, "授权后将跳转至", -1)), s("div", ue, P(l.value.authorizationCallback), 1)])])]));
245
239
  }
246
- }), et = /* @__PURE__ */ C(ce, [["__scopeId", "data-v-cc821ddc"]]), pe = {
240
+ }), Ze = /* @__PURE__ */ C(ce, [["__scopeId", "data-v-4e4aa0b7"]]), pe = {
247
241
  class: "oauth-callback"
248
242
  }, fe = {
249
243
  key: 0,
@@ -263,55 +257,55 @@ const oe = {
263
257
  },
264
258
  emits: ["success", "error", "needBindIdentity"],
265
259
  setup(y, {
266
- emit: p
260
+ emit: f
267
261
  }) {
268
- const n = y, a = p, f = m(!0), d = m(""), {
262
+ const n = y, l = f, p = m(!0), d = m(""), {
269
263
  setToken: u,
270
264
  initializeAuth: e
271
265
  } = X(), {
272
266
  fetchUserProfile: _
273
267
  } = Y();
274
268
  async function v() {
275
- const c = new URLSearchParams(window.location.search), o = c.get("error");
276
- if (o) {
277
- d.value = decodeURIComponent(o), f.value = !1, a("error", d.value);
269
+ const c = new URLSearchParams(window.location.search), t = c.get("error");
270
+ if (t) {
271
+ d.value = decodeURIComponent(t), p.value = !1, l("error", d.value);
278
272
  return;
279
273
  }
280
- const r = c.get("token"), h = c.get("userId"), I = c.get("appId"), q = c.get("needBindIdentity") === "true";
281
- if (!r) {
282
- d.value = "登录失败:未收到认证令牌", f.value = !1, a("error", d.value);
274
+ const i = c.get("token"), h = c.get("userId"), k = c.get("appId"), q = c.get("needBindIdentity") === "true";
275
+ if (!i) {
276
+ d.value = "登录失败:未收到认证令牌", p.value = !1, l("error", d.value);
283
277
  return;
284
278
  }
285
279
  try {
286
- u(r), await _();
280
+ u(i), await _();
287
281
  const B = window.location.pathname;
288
- if (window.history.replaceState({}, "", B), q && (a("needBindIdentity", {
289
- token: r,
282
+ if (window.history.replaceState({}, "", B), q && (l("needBindIdentity", {
283
+ token: i,
290
284
  userId: h || "",
291
- appId: I || ""
285
+ appId: k || ""
292
286
  }), n.bindIdentityRedirect)) {
293
- f.value = !1, setTimeout(() => {
287
+ p.value = !1, setTimeout(() => {
294
288
  window.location.href = n.bindIdentityRedirect;
295
289
  }, 300);
296
290
  return;
297
291
  }
298
- a("success", {
299
- token: r,
292
+ l("success", {
293
+ token: i,
300
294
  userId: h || "",
301
- appId: I || "",
295
+ appId: k || "",
302
296
  needBindIdentity: q
303
297
  });
304
298
  const H = sessionStorage.getItem("auth_redirect");
305
299
  sessionStorage.removeItem("auth_redirect");
306
300
  const j = H || n.defaultRedirect || "/";
307
- f.value = !1, setTimeout(() => {
301
+ p.value = !1, setTimeout(() => {
308
302
  window.location.href = j;
309
303
  }, 500);
310
304
  } catch (B) {
311
- console.error("OAuth 回调处理失败:", B), d.value = "登录处理失败,请重试", f.value = !1, a("error", d.value);
305
+ console.error("OAuth 回调处理失败:", B), d.value = "登录处理失败,请重试", p.value = !1, l("error", d.value);
312
306
  }
313
307
  }
314
- function S() {
308
+ function I() {
315
309
  const c = sessionStorage.getItem("auth_redirect");
316
310
  sessionStorage.removeItem("auth_redirect"), window.location.href = c || n.defaultRedirect || "/";
317
311
  }
@@ -320,33 +314,33 @@ const oe = {
320
314
  if (c.has("token") || c.has("error"))
321
315
  v();
322
316
  else if (e()) {
323
- const o = sessionStorage.getItem("auth_redirect");
324
- sessionStorage.removeItem("auth_redirect"), window.location.href = o || n.defaultRedirect || "/";
317
+ const t = sessionStorage.getItem("auth_redirect");
318
+ sessionStorage.removeItem("auth_redirect"), window.location.href = t || n.defaultRedirect || "/";
325
319
  } else
326
- d.value = "无效的访问", f.value = !1;
327
- }), (c, o) => (g(), k("div", pe, [f.value ? (g(), k("div", fe, [o[0] || (o[0] = s("div", {
320
+ d.value = "无效的访问", p.value = !1;
321
+ }), (c, t) => (g(), w("div", pe, [p.value ? (g(), w("div", fe, [t[0] || (t[0] = s("div", {
328
322
  class: "spinner"
329
- }, null, -1)), s("p", null, P(y.loadingText), 1)])) : d.value ? (g(), k("div", me, [o[1] || (o[1] = s("div", {
323
+ }, null, -1)), s("p", null, P(y.loadingText), 1)])) : d.value ? (g(), w("div", me, [t[1] || (t[1] = s("div", {
330
324
  class: "error-icon"
331
- }, "✕", -1)), o[2] || (o[2] = s("h2", null, "登录失败", -1)), s("p", null, P(d.value), 1), s("button", {
325
+ }, "✕", -1)), t[2] || (t[2] = s("h2", null, "登录失败", -1)), s("p", null, P(d.value), 1), s("button", {
332
326
  class: "retry-btn",
333
- onClick: S
334
- }, "返回重试")])) : (g(), k("div", ve, [...o[3] || (o[3] = [s("div", {
327
+ onClick: I
328
+ }, "返回重试")])) : (g(), w("div", ve, [...t[3] || (t[3] = [s("div", {
335
329
  class: "success-icon"
336
330
  }, "✓", -1), s("p", null, "登录成功,正在跳转...", -1)])]))]));
337
331
  }
338
- }), tt = /* @__PURE__ */ C(he, [["__scopeId", "data-v-07b0e1e4"]]), ge = {
332
+ }), et = /* @__PURE__ */ C(he, [["__scopeId", "data-v-07b0e1e4"]]), ge = {
339
333
  class: "BindEmail"
340
334
  }, ye = {
341
335
  class: "content"
342
336
  }, _e = {
343
337
  class: "sendVerifyCodeItem"
344
- }, ke = {
338
+ }, we = {
345
339
  class: "handle"
346
- }, be = {
340
+ }, ke = {
347
341
  key: 0,
348
342
  class: "skip"
349
- }, we = /* @__PURE__ */ z({
343
+ }, be = /* @__PURE__ */ z({
350
344
  __name: "AuthkitBindEmail",
351
345
  props: {
352
346
  size: {
@@ -366,25 +360,23 @@ const oe = {
366
360
  },
367
361
  emits: ["submit", "skip"],
368
362
  setup(y, {
369
- emit: p
363
+ emit: f
370
364
  }) {
371
- const n = p, a = y, f = m(), d = m(!1), u = m(), e = m({
365
+ const n = f, l = y, p = m(), d = m(!1), u = m(), e = m({
372
366
  email: void 0,
373
367
  userToken: void 0,
374
368
  emailVerifyId: void 0
375
369
  });
376
370
  async function _() {
377
- u.value.validateField(["email"]).then((c) => {
378
- c || (d.value = !0, Z({
371
+ if (!await u.value.validateField(["email"])) {
372
+ d.value = !0;
373
+ const {
374
+ data: t
375
+ } = await Z({
379
376
  email: e.value.email
380
- }).then(({
381
- data: o
382
- }) => {
383
- e.value.emailVerifyId = o.emailVerifyId, d.value = !1, f.value.startCountFn();
384
- }).catch(() => {
385
- d.value = !1;
386
- }));
387
- });
377
+ });
378
+ d.value = !1, t && (e.value.emailVerifyId = t.emailVerifyId, p.value.startCountFn());
379
+ }
388
380
  }
389
381
  async function v() {
390
382
  u.value.validate().then((c) => {
@@ -395,23 +387,23 @@ const oe = {
395
387
  });
396
388
  });
397
389
  }
398
- function S() {
390
+ function I() {
399
391
  n("skip");
400
392
  }
401
- return (c, o) => (g(), k("div", ge, [o[4] || (o[4] = s("div", {
393
+ return (c, t) => (g(), w("div", ge, [t[4] || (t[4] = s("div", {
402
394
  class: "header"
403
395
  }, [s("h3", {
404
396
  class: "title"
405
397
  }, "绑定邮箱"), s("p", {
406
398
  class: "subtitle"
407
- }, "请绑定邮箱以完成账号设置,绑定后可使用邮箱登录")], -1)), s("div", ye, [t(l(A), {
399
+ }, "请绑定邮箱以完成账号设置,绑定后可使用邮箱登录")], -1)), s("div", ye, [o(a(A), {
408
400
  ref_key: "formRef",
409
401
  ref: u,
410
402
  model: e.value,
411
- size: a.size,
403
+ size: l.size,
412
404
  "auto-label-width": ""
413
405
  }, {
414
- default: i(() => [t(l(b), {
406
+ default: r(() => [o(a(b), {
415
407
  field: "email",
416
408
  label: "邮箱",
417
409
  "hide-label": "",
@@ -423,15 +415,15 @@ const oe = {
423
415
  message: "请输入有效的邮箱"
424
416
  }]
425
417
  }, {
426
- default: i(() => [t(l(w), {
418
+ default: r(() => [o(a(S), {
427
419
  modelValue: e.value.email,
428
- "onUpdate:modelValue": o[0] || (o[0] = (r) => e.value.email = r),
420
+ "onUpdate:modelValue": t[0] || (t[0] = (i) => e.value.email = i),
429
421
  placeholder: "请输入邮箱",
430
422
  autocomplete: "email",
431
423
  type: "email"
432
424
  }, null, 8, ["modelValue"])]),
433
425
  _: 1
434
- }), t(l(b), {
426
+ }), o(a(b), {
435
427
  field: "userToken",
436
428
  label: "验证码",
437
429
  "hide-label": "",
@@ -440,15 +432,15 @@ const oe = {
440
432
  message: "请输入验证码"
441
433
  }]
442
434
  }, {
443
- default: i(() => [s("div", _e, [t(l(w), {
435
+ default: r(() => [s("div", _e, [o(a(S), {
444
436
  modelValue: e.value.userToken,
445
- "onUpdate:modelValue": o[1] || (o[1] = (r) => e.value.userToken = r),
437
+ "onUpdate:modelValue": t[1] || (t[1] = (i) => e.value.userToken = i),
446
438
  placeholder: "请输入验证码",
447
439
  autocomplete: "one-time-code"
448
- }, null, 8, ["modelValue"]), t(U, {
440
+ }, null, 8, ["modelValue"]), o(U, {
449
441
  ref_key: "SendVerifyCodeRef",
450
- ref: f,
451
- size: a.size,
442
+ ref: p,
443
+ size: l.size,
452
444
  loading: d.value,
453
445
  style: {
454
446
  "margin-left": "10px"
@@ -456,25 +448,25 @@ const oe = {
456
448
  onSend: _
457
449
  }, null, 8, ["size", "loading"])])]),
458
450
  _: 1
459
- }), s("div", ke, [t(l(R), {
451
+ }), s("div", we, [o(a(R), {
460
452
  type: "primary",
461
- loading: a.loading,
453
+ loading: l.loading,
462
454
  long: "",
463
- size: a.size,
455
+ size: l.size,
464
456
  onClick: v
465
457
  }, {
466
- default: i(() => [...o[2] || (o[2] = [V(" 绑定邮箱 ", -1)])]),
458
+ default: r(() => [...t[2] || (t[2] = [V(" 绑定邮箱 ", -1)])]),
467
459
  _: 1
468
460
  }, 8, ["loading", "size"])])]),
469
461
  _: 1
470
- }, 8, ["model", "size"])]), a.showSkip ? (g(), k("div", be, [t(l(M), {
471
- onClick: S
462
+ }, 8, ["model", "size"])]), l.showSkip ? (g(), w("div", ke, [o(a(M), {
463
+ onClick: I
472
464
  }, {
473
- default: i(() => [...o[3] || (o[3] = [V("稍后绑定", -1)])]),
465
+ default: r(() => [...t[3] || (t[3] = [V("稍后绑定", -1)])]),
474
466
  _: 1
475
467
  })])) : $("", !0)]));
476
468
  }
477
- }), ot = /* @__PURE__ */ C(we, [["__scopeId", "data-v-ad4da8d9"]]), Se = {
469
+ }), tt = /* @__PURE__ */ C(be, [["__scopeId", "data-v-32e32de7"]]), Se = {
478
470
  class: "BindPhone"
479
471
  }, Ie = {
480
472
  class: "content"
@@ -504,22 +496,22 @@ const oe = {
504
496
  },
505
497
  emits: ["submit", "skip"],
506
498
  setup(y, {
507
- emit: p
499
+ emit: f
508
500
  }) {
509
- const n = p, a = y, f = m(), d = m(!1), u = m(), e = m({
501
+ const n = f, l = y, p = m(), d = m(!1), u = m(), e = m({
510
502
  phone: void 0,
511
503
  code: void 0
512
504
  });
513
505
  async function _() {
514
- u.value.validateField(["phone"]).then((c) => {
515
- c || (d.value = !0, L({
506
+ if (!await u.value.validateField(["phone"])) {
507
+ d.value = !0;
508
+ const {
509
+ error: t
510
+ } = await L({
516
511
  phone: e.value.phone
517
- }).then(() => {
518
- d.value = !1, f.value.startCountFn();
519
- }).catch(() => {
520
- d.value = !1;
521
- }));
522
- });
512
+ });
513
+ d.value = !1, t || p.value.startCountFn();
514
+ }
523
515
  }
524
516
  async function v() {
525
517
  u.value.validate().then((c) => {
@@ -529,23 +521,23 @@ const oe = {
529
521
  });
530
522
  });
531
523
  }
532
- function S() {
524
+ function I() {
533
525
  n("skip");
534
526
  }
535
- return (c, o) => (g(), k("div", Se, [o[4] || (o[4] = s("div", {
527
+ return (c, t) => (g(), w("div", Se, [t[4] || (t[4] = s("div", {
536
528
  class: "header"
537
529
  }, [s("h3", {
538
530
  class: "title"
539
531
  }, "绑定手机号"), s("p", {
540
532
  class: "subtitle"
541
- }, "请绑定手机号以完成账号设置")], -1)), s("div", Ie, [t(l(A), {
533
+ }, "请绑定手机号以完成账号设置")], -1)), s("div", Ie, [o(a(A), {
542
534
  ref_key: "formRef",
543
535
  ref: u,
544
536
  model: e.value,
545
- size: a.size,
537
+ size: l.size,
546
538
  "auto-label-width": ""
547
539
  }, {
548
- default: i(() => [t(l(b), {
540
+ default: r(() => [o(a(b), {
549
541
  field: "phone",
550
542
  label: "手机号",
551
543
  "hide-label": "",
@@ -557,15 +549,15 @@ const oe = {
557
549
  message: "请输入有效的手机号"
558
550
  }]
559
551
  }, {
560
- default: i(() => [t(l(w), {
552
+ default: r(() => [o(a(S), {
561
553
  modelValue: e.value.phone,
562
- "onUpdate:modelValue": o[0] || (o[0] = (r) => e.value.phone = r),
554
+ "onUpdate:modelValue": t[0] || (t[0] = (i) => e.value.phone = i),
563
555
  placeholder: "请输入手机号",
564
556
  autocomplete: "tel",
565
557
  type: "tel"
566
558
  }, null, 8, ["modelValue"])]),
567
559
  _: 1
568
- }), t(l(b), {
560
+ }), o(a(b), {
569
561
  field: "code",
570
562
  label: "验证码",
571
563
  "hide-label": "",
@@ -574,15 +566,15 @@ const oe = {
574
566
  message: "请输入验证码"
575
567
  }]
576
568
  }, {
577
- default: i(() => [s("div", Ve, [t(l(w), {
569
+ default: r(() => [s("div", Ve, [o(a(S), {
578
570
  modelValue: e.value.code,
579
- "onUpdate:modelValue": o[1] || (o[1] = (r) => e.value.code = r),
571
+ "onUpdate:modelValue": t[1] || (t[1] = (i) => e.value.code = i),
580
572
  placeholder: "请输入验证码",
581
573
  autocomplete: "one-time-code"
582
- }, null, 8, ["modelValue"]), t(U, {
574
+ }, null, 8, ["modelValue"]), o(U, {
583
575
  ref_key: "SendVerifyCodeRef",
584
- ref: f,
585
- size: a.size,
576
+ ref: p,
577
+ size: l.size,
586
578
  loading: d.value,
587
579
  style: {
588
580
  "margin-left": "10px"
@@ -590,25 +582,25 @@ const oe = {
590
582
  onSend: _
591
583
  }, null, 8, ["size", "loading"])])]),
592
584
  _: 1
593
- }), s("div", ze, [t(l(R), {
585
+ }), s("div", ze, [o(a(R), {
594
586
  type: "primary",
595
- loading: a.loading,
587
+ loading: l.loading,
596
588
  long: "",
597
- size: a.size,
589
+ size: l.size,
598
590
  onClick: v
599
591
  }, {
600
- default: i(() => [...o[2] || (o[2] = [V(" 绑定手机号 ", -1)])]),
592
+ default: r(() => [...t[2] || (t[2] = [V(" 绑定手机号 ", -1)])]),
601
593
  _: 1
602
594
  }, 8, ["loading", "size"])])]),
603
595
  _: 1
604
- }, 8, ["model", "size"])]), a.showSkip ? (g(), k("div", Ce, [t(l(M), {
605
- onClick: S
596
+ }, 8, ["model", "size"])]), l.showSkip ? (g(), w("div", Ce, [o(a(M), {
597
+ onClick: I
606
598
  }, {
607
- default: i(() => [...o[3] || (o[3] = [V("稍后绑定", -1)])]),
599
+ default: r(() => [...t[3] || (t[3] = [V("稍后绑定", -1)])]),
608
600
  _: 1
609
601
  })])) : $("", !0)]));
610
602
  }
611
- }), lt = /* @__PURE__ */ C(qe, [["__scopeId", "data-v-a4313398"]]), $e = {
603
+ }), ot = /* @__PURE__ */ C(qe, [["__scopeId", "data-v-858398f4"]]), $e = {
612
604
  class: "SignUpPhone"
613
605
  }, Re = {
614
606
  class: "content"
@@ -636,9 +628,9 @@ const oe = {
636
628
  },
637
629
  emits: ["switchSignIn", "submit"],
638
630
  setup(y, {
639
- emit: p
631
+ emit: f
640
632
  }) {
641
- const n = p, a = y, f = m(), d = m(!1), u = m(), e = m({
633
+ const n = f, l = y, p = m(), d = m(!1), u = m(), e = m({
642
634
  phone: void 0,
643
635
  code: void 0,
644
636
  password: void 0,
@@ -648,27 +640,27 @@ const oe = {
648
640
  required: !0,
649
641
  message: "请输入确认密码"
650
642
  }, {
651
- validator: (o, r) => {
652
- e.value.password && o !== e.value.password ? r("两次密码输入不一致") : r();
643
+ validator: (t, i) => {
644
+ e.value.password && t !== e.value.password ? i("两次密码输入不一致") : i();
653
645
  }
654
646
  }];
655
647
  function v() {
656
648
  n("switchSignIn");
657
649
  }
658
- async function S() {
659
- u.value.validateField(["phone"]).then((o) => {
660
- o || (d.value = !0, L({
650
+ async function I() {
651
+ if (!await u.value.validateField(["phone"])) {
652
+ d.value = !0;
653
+ const {
654
+ error: i
655
+ } = await L({
661
656
  phone: e.value.phone
662
- }).then(() => {
663
- d.value = !1, f.value.startCountFn();
664
- }).catch(() => {
665
- d.value = !1;
666
- }));
667
- });
657
+ });
658
+ d.value = !1, i || p.value.startCountFn();
659
+ }
668
660
  }
669
661
  async function c() {
670
- u.value.validate().then((o) => {
671
- o || n("submit", {
662
+ u.value.validate().then((t) => {
663
+ t || n("submit", {
672
664
  phone: e.value.phone,
673
665
  code: e.value.code,
674
666
  password: e.value.password,
@@ -676,14 +668,14 @@ const oe = {
676
668
  });
677
669
  });
678
670
  }
679
- return (o, r) => (g(), k("div", $e, [s("div", Re, [t(l(A), {
671
+ return (t, i) => (g(), w("div", $e, [s("div", Re, [o(a(A), {
680
672
  ref_key: "formRef",
681
673
  ref: u,
682
674
  model: e.value,
683
- size: a.size,
675
+ size: l.size,
684
676
  "auto-label-width": ""
685
677
  }, {
686
- default: i(() => [t(l(b), {
678
+ default: r(() => [o(a(b), {
687
679
  field: "phone",
688
680
  label: "手机号",
689
681
  "hide-label": "",
@@ -695,15 +687,15 @@ const oe = {
695
687
  message: "请输入有效的手机号"
696
688
  }]
697
689
  }, {
698
- default: i(() => [t(l(w), {
690
+ default: r(() => [o(a(S), {
699
691
  modelValue: e.value.phone,
700
- "onUpdate:modelValue": r[0] || (r[0] = (h) => e.value.phone = h),
692
+ "onUpdate:modelValue": i[0] || (i[0] = (h) => e.value.phone = h),
701
693
  placeholder: "请输入手机号",
702
694
  autocomplete: "tel",
703
695
  type: "tel"
704
696
  }, null, 8, ["modelValue"])]),
705
697
  _: 1
706
- }), t(l(b), {
698
+ }), o(a(b), {
707
699
  field: "code",
708
700
  label: "验证码",
709
701
  "hide-label": "",
@@ -712,59 +704,59 @@ const oe = {
712
704
  message: "请输入验证码"
713
705
  }]
714
706
  }, {
715
- default: i(() => [s("div", Pe, [t(l(w), {
707
+ default: r(() => [s("div", Pe, [o(a(S), {
716
708
  modelValue: e.value.code,
717
- "onUpdate:modelValue": r[1] || (r[1] = (h) => e.value.code = h),
709
+ "onUpdate:modelValue": i[1] || (i[1] = (h) => e.value.code = h),
718
710
  placeholder: "请输入验证码",
719
711
  autocomplete: "one-time-code"
720
- }, null, 8, ["modelValue"]), t(U, {
712
+ }, null, 8, ["modelValue"]), o(U, {
721
713
  ref_key: "SendVerifyCodeRef",
722
- ref: f,
723
- size: a.size,
714
+ ref: p,
715
+ size: l.size,
724
716
  loading: d.value,
725
717
  style: {
726
718
  "margin-left": "10px"
727
719
  },
728
- onSend: S
720
+ onSend: I
729
721
  }, null, 8, ["size", "loading"])])]),
730
722
  _: 1
731
- }), a.requirePassword ? (g(), E(l(b), {
723
+ }), l.requirePassword ? (g(), E(a(b), {
732
724
  key: 0,
733
725
  field: "password",
734
726
  label: "密码",
735
727
  "hide-label": "",
736
728
  rules: [{
737
- required: a.requirePassword,
729
+ required: l.requirePassword,
738
730
  message: "密码请输入"
739
731
  }, {
740
732
  minLength: 10,
741
733
  message: "密码不能少于10字符"
742
734
  }]
743
735
  }, {
744
- default: i(() => [t(l(w), {
736
+ default: r(() => [o(a(S), {
745
737
  modelValue: e.value.password,
746
- "onUpdate:modelValue": r[2] || (r[2] = (h) => e.value.password = h),
738
+ "onUpdate:modelValue": i[2] || (i[2] = (h) => e.value.password = h),
747
739
  placeholder: "请输入密码(可选)",
748
740
  type: "password",
749
741
  autocomplete: "new-password"
750
742
  }, null, 8, ["modelValue"])]),
751
743
  _: 1
752
- }, 8, ["rules"])) : $("", !0), a.requirePassword && e.value.password ? (g(), E(l(b), {
744
+ }, 8, ["rules"])) : $("", !0), l.requirePassword && e.value.password ? (g(), E(a(b), {
753
745
  key: 1,
754
746
  field: "confirmPassword",
755
747
  label: "确认密码",
756
748
  "hide-label": "",
757
749
  rules: _
758
750
  }, {
759
- default: i(() => [t(l(w), {
751
+ default: r(() => [o(a(S), {
760
752
  modelValue: e.value.confirmPassword,
761
- "onUpdate:modelValue": r[3] || (r[3] = (h) => e.value.confirmPassword = h),
753
+ "onUpdate:modelValue": i[3] || (i[3] = (h) => e.value.confirmPassword = h),
762
754
  placeholder: "请输入确认密码",
763
755
  type: "password",
764
756
  autocomplete: "new-password"
765
757
  }, null, 8, ["modelValue"])]),
766
758
  _: 1
767
- })) : $("", !0), t(l(b), {
759
+ })) : $("", !0), o(a(b), {
768
760
  field: "referrerId",
769
761
  label: "邀请人",
770
762
  "hide-label": "",
@@ -772,29 +764,29 @@ const oe = {
772
764
  required: !1
773
765
  }]
774
766
  }, {
775
- default: i(() => [t(l(w), {
767
+ default: r(() => [o(a(S), {
776
768
  modelValue: e.value.referrerId,
777
- "onUpdate:modelValue": r[4] || (r[4] = (h) => e.value.referrerId = h),
769
+ "onUpdate:modelValue": i[4] || (i[4] = (h) => e.value.referrerId = h),
778
770
  placeholder: "邀请人ID(可选)",
779
771
  autocomplete: "off"
780
772
  }, null, 8, ["modelValue"])]),
781
773
  _: 1
782
- }), s("div", Ae, [t(l(R), {
774
+ }), s("div", Ae, [o(a(R), {
783
775
  type: "primary",
784
- loading: a.loading,
776
+ loading: l.loading,
785
777
  long: "",
786
- size: a.size,
778
+ size: l.size,
787
779
  onClick: c
788
780
  }, {
789
- default: i(() => [...r[5] || (r[5] = [V(" 注册 ", -1)])]),
781
+ default: r(() => [...i[5] || (i[5] = [V(" 注册 ", -1)])]),
790
782
  _: 1
791
783
  }, 8, ["loading", "size"])])]),
792
784
  _: 1
793
- }, 8, ["model", "size"])]), t(ee, {
785
+ }, 8, ["model", "size"])]), o(ee, {
794
786
  onSwitchSignIn: v
795
787
  })]));
796
788
  }
797
- }), at = /* @__PURE__ */ C(Ue, [["__scopeId", "data-v-930b6d57"]]), Be = {
789
+ }), at = /* @__PURE__ */ C(Ue, [["__scopeId", "data-v-eb9d153f"]]), Be = {
798
790
  class: "SignInPhone"
799
791
  }, xe = {
800
792
  class: "content"
@@ -817,30 +809,30 @@ const oe = {
817
809
  },
818
810
  emits: ["submit", "switchSignUp", "switchResetPassword"],
819
811
  setup(y, {
820
- emit: p
812
+ emit: f
821
813
  }) {
822
- const n = p, a = y, f = G(), d = N(() => !!f.OAuth), u = m(), e = m(!1), _ = m(), v = m({
814
+ const n = f, l = y, p = G(), d = N(() => !!p.OAuth), u = m(), e = m(!1), _ = m(), v = m({
823
815
  phone: void 0,
824
816
  code: void 0
825
817
  });
826
- function S() {
818
+ function I() {
827
819
  n("switchSignUp");
828
820
  }
829
821
  function c() {
830
822
  n("switchResetPassword");
831
823
  }
832
- async function o() {
833
- _.value.validateField(["phone"]).then((h) => {
834
- h || (e.value = !0, L({
824
+ async function t() {
825
+ if (!await _.value.validateField(["phone"])) {
826
+ e.value = !0;
827
+ const {
828
+ error: k
829
+ } = await L({
835
830
  phone: v.value.phone
836
- }).then(() => {
837
- e.value = !1, u.value.startCountFn();
838
- }).catch(() => {
839
- e.value = !1;
840
- }));
841
- });
831
+ });
832
+ e.value = !1, k || u.value.startCountFn();
833
+ }
842
834
  }
843
- async function r() {
835
+ async function i() {
844
836
  _.value.validate().then((h) => {
845
837
  h || n("submit", {
846
838
  identifier: v.value.phone,
@@ -849,14 +841,14 @@ const oe = {
849
841
  });
850
842
  });
851
843
  }
852
- return (h, I) => (g(), k("div", Be, [s("div", xe, [t(l(A), {
844
+ return (h, k) => (g(), w("div", Be, [s("div", xe, [o(a(A), {
853
845
  ref_key: "formRef",
854
846
  ref: _,
855
847
  model: v.value,
856
- size: a.size,
848
+ size: l.size,
857
849
  "auto-label-width": ""
858
850
  }, {
859
- default: i(() => [t(l(b), {
851
+ default: r(() => [o(a(b), {
860
852
  field: "phone",
861
853
  label: "手机号",
862
854
  "hide-label": "",
@@ -868,15 +860,15 @@ const oe = {
868
860
  message: "请输入有效的手机号"
869
861
  }]
870
862
  }, {
871
- default: i(() => [t(l(w), {
863
+ default: r(() => [o(a(S), {
872
864
  modelValue: v.value.phone,
873
- "onUpdate:modelValue": I[0] || (I[0] = (q) => v.value.phone = q),
865
+ "onUpdate:modelValue": k[0] || (k[0] = (q) => v.value.phone = q),
874
866
  placeholder: "请输入手机号",
875
867
  autocomplete: "tel",
876
868
  type: "tel"
877
869
  }, null, 8, ["modelValue"])]),
878
870
  _: 1
879
- }), t(l(b), {
871
+ }), o(a(b), {
880
872
  field: "code",
881
873
  label: "验证码",
882
874
  "hide-label": "",
@@ -885,47 +877,47 @@ const oe = {
885
877
  message: "请输入验证码"
886
878
  }]
887
879
  }, {
888
- default: i(() => [s("div", Te, [t(l(w), {
880
+ default: r(() => [s("div", Te, [o(a(S), {
889
881
  modelValue: v.value.code,
890
- "onUpdate:modelValue": I[1] || (I[1] = (q) => v.value.code = q),
882
+ "onUpdate:modelValue": k[1] || (k[1] = (q) => v.value.code = q),
891
883
  placeholder: "请输入验证码",
892
884
  autocomplete: "one-time-code"
893
- }, null, 8, ["modelValue"]), t(U, {
885
+ }, null, 8, ["modelValue"]), o(U, {
894
886
  ref_key: "SendVerifyCodeRef",
895
887
  ref: u,
896
- size: a.size,
888
+ size: l.size,
897
889
  loading: e.value,
898
890
  style: {
899
891
  "margin-left": "10px"
900
892
  },
901
- onSend: o
893
+ onSend: t
902
894
  }, null, 8, ["size", "loading"])])]),
903
895
  _: 1
904
- }), s("div", Fe, [t(l(R), {
896
+ }), s("div", Fe, [o(a(R), {
905
897
  type: "primary",
906
- loading: a.loading,
898
+ loading: l.loading,
907
899
  long: "",
908
- size: a.size,
909
- onClick: r
900
+ size: l.size,
901
+ onClick: i
910
902
  }, {
911
- default: i(() => [...I[2] || (I[2] = [V(" 登录 ", -1)])]),
903
+ default: r(() => [...k[2] || (k[2] = [V(" 登录 ", -1)])]),
912
904
  _: 1
913
905
  }, 8, ["loading", "size"])])]),
914
906
  _: 1
915
907
  }, 8, ["model", "size"])]), d.value ? D(h.$slots, "OAuth", {
916
908
  key: 0
917
- }, void 0, !0) : $("", !0), t(te, {
918
- onSwitchSignUp: S,
909
+ }, void 0, !0) : $("", !0), o(te, {
910
+ onSwitchSignUp: I,
919
911
  onSwitchResetPassword: c
920
912
  })]));
921
913
  }
922
- }), st = /* @__PURE__ */ C(Le, [["__scopeId", "data-v-6802272c"]]);
914
+ }), lt = /* @__PURE__ */ C(Le, [["__scopeId", "data-v-bee74836"]]);
923
915
  export {
924
- Ze as A,
925
- et as a,
926
- tt as b,
927
- ot as c,
928
- lt as d,
916
+ Ye as A,
917
+ Ze as a,
918
+ et as b,
919
+ tt as c,
920
+ ot as d,
929
921
  at as e,
930
- st as f
922
+ lt as f
931
923
  };