data(){
return{
verfityCode:'获取验证码',
waittime:60
}
},
//方法------发送验证码成功后调用该方法
time() {
if (this.waittime == 0) {
this.verfityCode="获取验证码";
this.waittime = 60;
} else {
this.verfityCode = this.waittime+'s后重新发送' ;
this.waittime --;
setTimeout(()=> {
this.time()
},1000)
}
},