本文共 473 字,大约阅读时间需要 1 分钟。
获取验证码 { {auth_time}} 秒之重新发送
data() { return { sendAuthCode: true,/*布尔值,通过v-show控制显示‘获取按钮’还是‘倒计时’ */ auth_time: 0, /*倒计时 计数器*/ } },
getCode() { this.sendAuthCode = false; this.auth_time = 60; var auth_timetimer = setInterval(() => { this.auth_time--; if (this.auth_time <= 0) { this.sendAuthCode = true; clearInterval(auth_timetimer); } }, 1000); },
转载地址:http://namez.baihongyu.com/