一些问题的修复

This commit is contained in:
xiaowang
2026-03-19 14:10:59 +08:00
parent 580a89c64d
commit 3527e248d1
50 changed files with 847 additions and 165 deletions
@@ -340,6 +340,12 @@ const handleSendVerificationCode = async () => {
return
}
const phoneRegex = /^1[3-9]\d{9}$/
if (!phoneRegex.test(bindPhoneForm.phone)) {
message.error('手机号格式不正确')
return
}
try {
await userApi.sendVerificationCode({ phone: bindPhoneForm.phone })
message.success('验证码发送成功')
@@ -357,6 +363,12 @@ const handleSendChangePhoneVerificationCode = async () => {
return
}
const phoneRegex = /^1[3-9]\d{9}$/
if (!phoneRegex.test(changePhoneForm.newPhone)) {
message.error('手机号格式不正确')
return
}
try {
await userApi.sendVerificationCode({ phone: changePhoneForm.newPhone })
message.success('验证码发送成功')
@@ -374,6 +386,12 @@ const handleSendChangePasswordVerificationCode = async () => {
return
}
const phoneRegex = /^1[3-9]\d{9}$/
if (!phoneRegex.test(userInfo.value.phone)) {
message.error('手机号格式不正确')
return
}
try {
await userApi.sendVerificationCode({ phone: userInfo.value.phone })
message.success('验证码发送成功')