methods: {
getLoginCode () {
this.delay = 60
this.$toast.loading('加载中')
getCode({
mobile: this.mobile
}).then(res => {
this.$toast.success(res.data.data)
})
this.codeText = `${this.delay}S后继续`
var idInt = setInterval(() => {
this.delay--
if (this.delay === 0) {
clearInterval(idInt)
this.codeText = '获取验证码'
return
}
this.codeText = `${this.delay}S后继续`
}, 1000)
}
}
}