91在线公开视频_全黄特一级_www.亚洲天堂网_杏导航aⅴ福利网站_久久久综合网_大又大粗又爽又黄少妇毛片

18842388900

網(wǎng)站建設(shè) APP開發(fā) 小程序

Article/文章

記錄成長點(diǎn)滴 分享您我感悟

您當(dāng)前位置>首頁 > 知識 > 軟件開發(fā)

微信小程序如何實(shí)現(xiàn)獲取驗(yàn)證碼后倒計(jì)時(shí)效果?(代碼示例)

發(fā)表時(shí)間:2019-05-20 08:50:05

文章來源:沈陽網(wǎng)站建設(shè)

標(biāo)簽:微信小程序 驗(yàn)證碼倒計(jì)時(shí)

分享:

瀏覽次數(shù):0

本篇文章給大家?guī)淼膬?nèi)容是介紹微信小程序如何實(shí)現(xiàn)獲取驗(yàn)證碼后倒計(jì)時(shí)效果?(代碼示例)。有一定的參考價(jià)值,有需要的朋友可以參考一下,希望對你們有所幫助。

首先我們來看看效果圖:

1.jpg

wxml代碼:

<input class='input-pwd' placeholder="新密碼" placeholder-style='color: #000' password focus bindconfirm='getPwd'/><input class='input-tel' type='number' placeholder="手機(jī)號" placeholder-style='color: #000' maxlength='11 confirm-type='done' /><input class='input-verify' type='number' placeholder-style='color: #000' placeholder='手機(jī)驗(yàn)證碼'></input><button class='verify-btn' disabled='{{disabled}}' bindtap="getVerificationCode">{{time}}</button><button class='confirm-btn' bindtap='confirm_btn'>確認(rèn)修改</butt沈陽軟件設(shè)計(jì)

<a href=http://www.www.fjxmxtpower.cn target=_blank class=infotextkey>沈陽<a href=http://www.www.fjxmxtpower.cn target=_blank class=infotextkey>軟件開發(fā)</a></a>,<a href=http://www.www.fjxmxtpower.cn target=_blank class=infotextkey>沈陽<a href=http://www.www.fjxmxtpower.cn target=_blank class=infotextkey>軟件公司</a></a>

on>

wxss代碼:

/* pages/forgetpwd/forgetpwd.wxss */input{  padding-left: 20rpx;  border-bottom: 1rpx solid #ccc;  height: 80rpx;  line-height: 80rpx;  width: 95%;  margin: 0 auto;  font-size: 28rpx;}.input-verify{  width: 67%;  margin-left: 10rpx;  float: left;}.verify-btn{  width: 26%;  height: 65rpx;  float: right;  line-height: 65rpx;  background: #fff;      color: #5FD79D;  margin: 20rpx 10rpx;  font-size: 28rpx;}.confirm-btn{  width: 80%;  height: 90rpx;  margin: 150rpx auto;  background: #5FD79D;      color: #fff;}

js代碼:

// pages/forgetpwd/forgetpwd.jsvar interval = null //倒計(jì)時(shí)函數(shù)Page({  /**   * 頁面的初始數(shù)據(jù)   */  data: {    time: '獲取驗(yàn)證碼', //倒計(jì)時(shí)     currentTime: 60  },  /**   * 生命周期函數(shù)--監(jiān)聽頁面加載   */  onLoad: function (options) {  },  getPwd:function(e){    console.log(e.detail.value)  },  /**   * 確認(rèn)修改   */  confirm_btn:function(){    wx.redirectTo({      url: '/pages/login/login',    })  },    getCode: function (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: '重新發(fā)送',          currentTime:60,          disabled: false           })      }    }, 1000)    },  getVerificationCode(){    this.getCode();    var that = this    that.setData({      disabled:true    })  },})

總結(jié):以上就是本篇文章的全部內(nèi)容,希望能對大家的學(xué)習(xí)有所幫助。

以上就是微信小程序如何實(shí)現(xiàn)獲取驗(yàn)證碼后倒計(jì)時(shí)效果?(代碼示例)的詳細(xì)內(nèi)容,更多請關(guān)注沈陽網(wǎng)站建設(shè)其它相關(guān)文章!

微信小程序,驗(yàn)證碼倒計(jì)時(shí)

相關(guān)案例查看更多

主站蜘蛛池模板: 镇沅| 文登市| 阿拉善左旗| 荥阳市| 永胜县| 伊宁县| 安顺市| 沙河市| 洪湖市| 比如县| 锦州市| 屯昌县| 福泉市| 永善县| 萨迦县| 额济纳旗| 江永县| 山东省| 裕民县| 原平市| 宝鸡市| 庆城县| 安溪县| 资兴市| 磐石市| 扎鲁特旗| 金川县| 七台河市| 延津县| 巴林左旗| 蓝田县| 吉水县| 吉安市| 鲁山县| 大丰市| 宜州市| 达孜县| 南郑县| 陇南市| 揭西县| 紫金县|