微信小程序验证码获取倒计时效果-微信小程序验证码功能-小程序图形验证码
wxmlbuttondisabled'{{disabled}}'data-id"2"bindtap"getVerificationCode"{{time}}/buttonjsvarintervalnull//倒计时函数Page({data:{date:'请选择日期',fun_id:2,time:'获取验证码',//倒计时currentTime:61},getCode:function(options){varthatthis;varcurrentTimethat.data.currentTimeintervalsetInterval(function(){currentTime--;that.setData({time:currentTime+'秒'})if(currentTime0){clearInterval(interval)that.setData({time:'重新发送',currentTime:61,disabled:false})}},100)},getVerificationCode(){this.getCode();varthatthisthat.setData({disabled:true})},})
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。

