修复密码输入可访问性并统一新手机号为中国大陆区号

This commit is contained in:
cieanyau committed 2026-11-06 04:53:45 +08:00
1 parent 990b802553
commit f6ab3c9087
15 files changed
+592 -362

No files matched your search

+3 -20
View File
@@ -36,7 +36,7 @@ import { n as auth_redirect_n } from "~/lib/auth-redirect.js";
import { t as auth_redirect_t } from "~/lib/auth-redirect.js";
import inputtext from "primevue/inputtext";
import CaptchaField from "~/components/CaptchaField.vue";
import password from "primevue/password";
import password from "~/components/PasswordField.vue";
import PhoneCodeField from "~/components/PhoneCodeField.vue";
import { t as useCaptcha_t } from "~/lib/useCaptcha.js";
import { t as composables_t } from "~/lib/composables-2.js";
@@ -94,7 +94,6 @@ var D = {
code: ``,
password: ``,
re_password: ``,
phone_code: `86`,
}),
W = ref(``),
G = ref(!1),
@@ -120,7 +119,6 @@ var D = {
action: `password_reset`,
captcha: K,
error: W,
phoneCode: () => U.phone_code,
});
// 复用 password_reset 场景的验证码发送与倒计时,不在页面另写一套短信请求。
function fe() {
@@ -140,8 +138,6 @@ var D = {
if (!e)
return (W.value =
H.value === `email` ? `请输入邮箱` : `请输入手机号`);
if (H.value === `phone` && !/^[1-9]\d{0,3}$/.test(U.phone_code))
return (W.value = `请输入有效的国际电话区号`);
if (!U.code.trim()) return (W.value = `请输入验证码`);
if (!U.password) return (W.value = `请输入新密码`);
if (U.password !== U.re_password)
@@ -151,7 +147,7 @@ var D = {
(await z.post(`/account/password_reset`, {
type: H.value,
account: e,
phone_code: U.phone_code,
phone_code: `86`,
code: U.code.trim(),
password: U.password,
re_password: U.re_password,
@@ -205,20 +201,7 @@ var D = {
},
[
unref(H) === `phone`
? (openBlock(),
createBlock(
f,
{
key: 0,
modelValue: unref(U).phone_code,
"onUpdate:modelValue": (o[0] ||= (e) =>
(unref(U).phone_code = e)),
disabled: unref(G) || unref(Q),
},
null,
8,
[`modelValue`, `disabled`],
))
? (openBlock(), createBlock(f, { key: 0 }))
: createCommentVNode(``, !0),
createElementVNode(`div`, O, [
(o[8] ||= createElementVNode(