| | |
| | | title: '正在获取验证码' |
| | | }) |
| | | getCode({phone: this.form.phone }).then(val => { |
| | | this.startCountdown() |
| | | uni.hideLoading(); |
| | | this.tips = `${this.countdownTime}s后重新获取` |
| | | uni.$u.toast('验证码已发送'); |
| | | if(val.data.code == 200) { |
| | | this.startCountdown() |
| | | uni.hideLoading(); |
| | | this.tips = `${this.countdownTime}s后重新获取` |
| | | uni.$u.toast('验证码已发送'); |
| | | } |
| | | }).catch(err => { |
| | | this.isSendCode = false |
| | | }) |
| | | } else { |
| | | uni.$u.toast('倒计时结束后再发送'); |
| | |
| | | }, 1000) |
| | | }, |
| | | loging() { |
| | | if(!this.form.phone){ |
| | | uni.showToast({ |
| | | title: '请输入手机号', |
| | | icon: 'none' |
| | | }) |
| | | return |
| | | } |
| | | if(!this.form.code){ |
| | | uni.showToast({ |
| | | title: '请输入验证码', |
| | | icon: 'none' |
| | | }) |
| | | return |
| | | } |
| | | codeLogin(this.form).then(val => { |
| | | if(val.data.token) { |
| | | this.loginToken = val.data.token |