getYzm(){
if(this.data.telephone.length != 11){
wx.showToast({
title: '您输入的手机号码有误',
icon:'none'
})
return
}
this.getCode()
this.setData({
disabled:true
})
},
getCode(options) {
var that = this;
var currentTime = that.data.currentTime
interval = setInterval(function () {
currentTime--;
that.setData({
time: currentTime + '秒后重新发送'
})
if (currentTime <= 0) {
clearInterval(interval)
that.setData({
time: '重新发送',
currentTime: 60,
disabled: false
})
}
}, 1000)
let data ={
mobile:this.data.telephone
}
app.post(url +'api/v1/aliyun/sendsms',data).then((res)=>{
})
},