opt: 优化验证码发送逻辑,加入防刷验证

This commit is contained in:
RockYang
2023-07-04 17:15:02 +08:00
parent b60c723457
commit fa733afa51
5 changed files with 56 additions and 27 deletions

View File

@@ -31,7 +31,7 @@ const sendMsg = () => {
httpGet('/api/verify/token').then(res => {
httpPost('/api/verify/sms', {token: res.data, mobile: props.mobile}).then(() => {
ElMessage.success('短信发送成功')
let time = 120
let time = 10
btnText.value = time
const handler = setInterval(() => {
time = time - 1