Compare commits

...

2 Commits

Author SHA1 Message Date
liuyangyi 661aa6cea7 update --bug 2024-10-07 18:08:41 +08:00
liuyangyi 40378724b0 完善验证码逻辑 2024-10-06 14:21:42 +08:00
1 changed files with 19 additions and 1 deletions

View File

@ -152,7 +152,7 @@ export default {
if(response.data.code === '200'){
console.log('验证码发送成功:', response.data);
startCountdown(); //
}else{
}else{
console.log('验证码发送失败:', response.data);
phoneError.value = response.data.message;
}
@ -169,6 +169,24 @@ export default {
verificationCodeError.value = '请输入验证码';
return false;
}
axios.post('https://api.sso.ycymedu.com/api/syswechat/smslogin', {
phoneNumber: phone.value,
code:verificationCode.value,
redirect_uri:referer.value
})
.then(response => {
if(response.data.code === '200'){
console.log('验证码发送成功:', response.data);
startCountdown(); //
}else{
console.log('验证码发送失败:', response.data);
phoneError.value = response.data.message;
}
})
.catch(error => {
console.error('发送验证码失败:', error);
phoneError.value = '发送验证码失败,请稍后再试';
});
verificationCodeError.value = ''; //
return true;
});