一些问题的修复
This commit is contained in:
@@ -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('验证码发送成功')
|
||||
|
||||
Reference in New Issue
Block a user