| | |
| | | emailError: false, |
| | | imgCode: '', |
| | | countDown: 0, |
| | | mailCountDown: 0, |
| | | userInfoBox: false, |
| | | height: '', //屏幕高度 |
| | | }, |
| | |
| | | this.setData({ |
| | | userInfoBox: e.detail.visible, |
| | | countDown: 0, |
| | | mailCountDown: 0 |
| | | }); |
| | | }, |
| | | editIconInfo(e) { |
| | |
| | | }, |
| | | |
| | | getPhoneCode() { |
| | | if (this.data.countDown > 0) return false |
| | | if (this.data.userInfoForm.phone && this.data.userInfoForm.captcha) { |
| | | app.MG.identity |
| | | .getPhoneCode({ |
| | |
| | | icon: 'none', |
| | | duration: 1000 |
| | | }) |
| | | // 开启短信验证倒计时 |
| | | this.getSecondEmail(60) |
| | | } else { |
| | | wx.showToast({ |
| | | title: '邮箱验证码发送失败', |
| | |
| | | }) |
| | | } |
| | | }, |
| | | getSecondEmail(time) { |
| | | if (this.data.mailCountDown <= 0) { |
| | | this.setData({ |
| | | mailCountDown: time, |
| | | }); |
| | | |
| | | let timer = setInterval(() => { |
| | | let count = this.data.mailCountDown - 1; |
| | | this.setData({ |
| | | mailCountDown: count, |
| | | }); |
| | | |
| | | if (count === 0) { |
| | | clearInterval(timer); |
| | | } |
| | | }, 1000); |
| | | } |
| | | }, |
| | | |
| | | confirmInfo() { |
| | | if (this.data.editType == 'nickName') { |