getverifycode(){if(this.vaildatephone()){this.vaildtebtn();}}vaildtebtn(){let time = 60;let timer= setInterval({if(time==0){clearInterval(timer);this.btntitle="获取验证码";this.disabled=false;}else{//倒计时this.btntitle=time+ "秒后重试";this.diabled=true;time--;}}},1000)//判断手机号码是否正确vaildatephone(){if(!this.phone){this.errors = {phone:"手机号码不能为空"};return false;} else if (!/^1[345678]\d{9}$/.test(this.phone)){this.errors = {phone: "请填写正确的手机号码"};return false;}else {this.errors = {};return true;}}
1200字范文,内容丰富有趣,写作的好帮手!