vue项目(一)

it2022-05-09  36

手机格式/^(13[0-9]|14[579]|15[0-3,5-9]|16[6]|17[0135678]|18[0-9]|19[89])\d{8}$/

//验证码             getCode() {                 const TIME_COUNT = 60;                 if(!this.timer) {                     this.count = TIME_COUNT;                     this.show = false;                     this.timer = setInterval(() => {                         if(this.count > 0 && this.count <= TIME_COUNT) {                             this.count--;                         } else {                             this.show = true;                             clearInterval(this.timer);                             this.timer = null;                         }                     }, 1000)                 }             },

 

 


最新回复(0)