Envía el código de verificación. Sin antecedentes

También encontré esto en línea e imité la escritura de otra persona. oye oye 

                                                 

<button v-show="sendcode" class="btn" type="button" name="button" @click="sendbtn">获取验证码</button>
<span v-show="!sendcode" class="time-span"><span>{
   
   {time}}</span>秒后重新发送验证码</span>
    // 发送验证码
    sendbtn(){
      this.sendcode = false
      this.time = 6
      var auth_time = setInterval(()=> {
        this.time--
        if(this.time <= 0){
          this.sendcode = true;
          clearInterval(auth_time)
        }
      },1000)
    },

 

 

Supongo que te gusta

Origin blog.csdn.net/qq_42809973/article/details/95458039
Recomendado
Clasificación