Browse Source

获取验证码

master
chenkun 4 months ago
parent
commit
ad3fd2df22
1 changed files with 11 additions and 8 deletions
  1. +11
    -8
      pages_order/auth/loginAndRegisterAndForgetPassword.vue

+ 11
- 8
pages_order/auth/loginAndRegisterAndForgetPassword.vue View File

@ -183,17 +183,20 @@
},
getCode() {
if (this.$refs.code.canGetCode) {
//
uni.showLoading({
title: '正在获取验证码'
})
setTimeout(() => {
uni.hideLoading();
// this.start()
uni.$uv.toast('验证码已发送');
//
this.$refs.code.start();
}, 2000);
this.$api('sendSms', {
username: this.form1.userName,
}, res => {
if (res.code == 200) {
uni.hideLoading();
// this.start()
uni.$uv.toast('验证码已发送');
//
this.$refs.code.start();
}
})
} else {
uni.$uv.toast('请勿重复发送');
}


Loading…
Cancel
Save