|
|
|
@ -46,7 +46,7 @@ |
|
|
|
|
|
|
|
<!-- 找回密码 注册 --> |
|
|
|
<view class="regtips"> |
|
|
|
<view>已拥有账户?<a class="loginnow" @tap="gologin">登录</a></view> |
|
|
|
<view>已拥有账户?<a class="loginnow" @tap="debounce(gologin,500)">登录</a></view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<!-- 弹框 --> |
|
|
|
@ -92,6 +92,8 @@ |
|
|
|
utchk2:false, |
|
|
|
// 需要打开的链接 |
|
|
|
murl:"", |
|
|
|
// 是否倒计时 |
|
|
|
isCutdown:false, |
|
|
|
//倒计时 |
|
|
|
st:120, |
|
|
|
// 显示/隐藏弹窗 |
|
|
|
@ -133,14 +135,27 @@ |
|
|
|
getsmscode(){ |
|
|
|
// 检查手机号是否填写 |
|
|
|
let mb = this.mobile |
|
|
|
if(this.validteMobile(mb)){ |
|
|
|
if(this.validteMobile(mb) && this.isCutdown!=true){ |
|
|
|
regApi.sendSms(mb).then(res=>{ |
|
|
|
if(res.resultCode=="00000000"){ |
|
|
|
if(res.data ==1){ |
|
|
|
this.$toast("手机号已被注册") |
|
|
|
// 倒计时 |
|
|
|
this.countDown() |
|
|
|
this.st = 60 |
|
|
|
}else{ // 手机号未被注册 |
|
|
|
//发送验证码? |
|
|
|
let pars={username:mb,purpose:1} |
|
|
|
regApi.sendVerifyCode(pars).then(res=>{ |
|
|
|
// console.log("verify code",res) |
|
|
|
if(res.resultCode === "00000000"){ |
|
|
|
// 倒计时 |
|
|
|
this.countDown() |
|
|
|
this.$toast("发送成功") |
|
|
|
}else{ |
|
|
|
this.$error(res.resultMsg) |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
// |
|
|
|
} |
|
|
|
console.log(res) |
|
|
|
}); |
|
|
|
@ -152,15 +167,17 @@ |
|
|
|
let app = this |
|
|
|
app.$refs.abtn.$el.innerText=app.st+"秒" |
|
|
|
let qq = app.st |
|
|
|
console.log(qq) |
|
|
|
// console.log(qq) |
|
|
|
setTimeout(function(){ |
|
|
|
if(app.st>1){ |
|
|
|
app.st-- |
|
|
|
app.countDown(app.st) |
|
|
|
//倒计时ing |
|
|
|
app.isCutdown=true |
|
|
|
}else{ |
|
|
|
app.st = "获取验证码" |
|
|
|
app.st=0 |
|
|
|
app.$refs.abtn.$el.innerText = "获取验证码" |
|
|
|
} |
|
|
|
|
|
|
|
},1000) |
|
|
|
|
|
|
|
}, |
|
|
|
|