修改了验证

This commit is contained in:
luyuan 2020-11-17 16:27:40 +08:00
parent 5b1f165528
commit 5b4a1efb39
Signed by: theluyuan
GPG Key ID: A7972FD973317FF3

View File

@ -279,8 +279,9 @@ export default defineComponent({
* 点击获取验证码 触发60S倒计时
*/
let lock = false;
const getcode: () => void = () => {
const getcode = async () => {
console.log(11111);
if (lock) {
return;
}
@ -288,6 +289,11 @@ export default defineComponent({
message.error(lan.$t('shoujihaoweikong'));
return;
}
const iszc = await checkuser({phone: phone.value.phone})
if(iszc.code == 0){
message.error(lan.$t('zhanghaocunzai'))
return ;
}
lock = true;
sendsms(phone.value.quhao, phone.value.phone);
const timestep = setInterval(() => {
@ -374,11 +380,7 @@ export default defineComponent({
);
if (res) {
const iszc = await checkuser({phone: phone.value.phone})
if(iszc.code == 0){
message.error(lan.$t('zhanghaocunzai'))
return ;
}
stepnow.value = e;
}