|
|
@ -64,9 +64,6 @@ |
|
|
import * as Verify from '@/utils/verify' |
|
|
import * as Verify from '@/utils/verify' |
|
|
import whpop from './components/WhPopup' |
|
|
import whpop from './components/WhPopup' |
|
|
|
|
|
|
|
|
//倒计时120s |
|
|
|
|
|
const st = 120 |
|
|
|
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
components: { |
|
|
components: { |
|
|
// nothing |
|
|
// nothing |
|
|
@ -95,6 +92,8 @@ |
|
|
utchk2:false, |
|
|
utchk2:false, |
|
|
// 需要打开的链接 |
|
|
// 需要打开的链接 |
|
|
murl:"", |
|
|
murl:"", |
|
|
|
|
|
//倒计时 |
|
|
|
|
|
st:120, |
|
|
// 显示/隐藏弹窗 |
|
|
// 显示/隐藏弹窗 |
|
|
showPopup: false, |
|
|
showPopup: false, |
|
|
} |
|
|
} |
|
|
@ -132,32 +131,34 @@ |
|
|
|
|
|
|
|
|
// 发送验证码 |
|
|
// 发送验证码 |
|
|
getsmscode(){ |
|
|
getsmscode(){ |
|
|
this.$toast("sss") |
|
|
|
|
|
this.countDown(2200) |
|
|
|
|
|
// 检查手机号是否填写 |
|
|
// 检查手机号是否填写 |
|
|
// let mb = this.mobile |
|
|
let mb = this.mobile |
|
|
// if(this.validteMobile(mb)){ |
|
|
if(this.validteMobile(mb)){ |
|
|
// regApi.sendSms(mb).then(res=>{ |
|
|
regApi.sendSms(mb).then(res=>{ |
|
|
// if(res.resultCode=="00000000"){ |
|
|
if(res.resultCode=="00000000"){ |
|
|
// if(res.data ==1){ |
|
|
if(res.data ==1){ |
|
|
// this.$toast("手机号已被注册") |
|
|
this.$toast("手机号已被注册") |
|
|
// // 倒计时 |
|
|
// 倒计时 |
|
|
// } |
|
|
this.countDown() |
|
|
// } |
|
|
} |
|
|
// console.log(res) |
|
|
} |
|
|
// }); |
|
|
console.log(res) |
|
|
// } |
|
|
}); |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 倒计时 |
|
|
// 倒计时 |
|
|
countDown(st){ |
|
|
countDown(){ |
|
|
this.$refs.abtn.$el.innerText=st+"秒" |
|
|
let app = this |
|
|
const ss = setTimeout({ |
|
|
app.$refs.abtn.$el.innerText=app.st+"秒" |
|
|
if(st>1){ |
|
|
let qq = app.st |
|
|
st=st-1 |
|
|
console.log(qq) |
|
|
countDown(st) |
|
|
setTimeout(function(){ |
|
|
// }else{ |
|
|
if(app.st>1){ |
|
|
// st = 0 |
|
|
app.st-- |
|
|
|
|
|
app.countDown(app.st) |
|
|
|
|
|
}else{ |
|
|
|
|
|
app.st = "获取验证码" |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
},1000) |
|
|
},1000) |
|
|
|