sentYzm() {
if (this.loginUser.email) {
if (/^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[a-zA-Z0-9]{2,6}$/.test(this.loginUser.email)) {
let t;
let that = this
clearInterval(t)
this.$axios.post('http://192.168.0.167:8084/risk/sm', {
account: this.loginUser.email,
type:0
}).then((msg) => {
console.log(msg.data)
if (msg.data.code != 10002){
console.log('msg.code != 0')
}else {
this.timesType=true
t = setInterval(function () {
if (that.times == 0) {
that.timesType=false
clearInterval(t)
that.times = 60
that.yzmTimes = '重新发送'
return
}
that.times--
that.yzmTimes = '剩余时间' + that.times + ' s'
}, 1000)
console.log('发送邮件成功,请留意邮箱!')
}
})
}
}
},
网友评论