getVerificationCode: function() { var that = this; var currentTime = that.data.currentTime; that.setData({ codename: currentTime + '秒', disabled:true }) var interval = setInterval(function() { that.setData({ codename: (currentTime - 1) + '秒' }) currentTime--; if (currentTime <= 0) { clearInterval(interval) that.setData({ codename: '重新获取', currentTime: 60, disabled: false }) } }, 1000) },