提交 0191bd15 authored 作者: lihuihui's avatar lihuihui

update

上级 97e5ed62
......@@ -21,7 +21,7 @@
</div>
<div class="input">
<input type="text" placeholder="请输入验证码" v-model="form.accountLogin2.sms_code"/>
<div :class="time.second == 60 ? 'yzm-btn' : 'active yzm-btn'">{{ time.second == 60 ? '获取验证码' : `已发送验证码(${time.second})` }}</div>
<div @click="getLoginCode" :class="time.second == 60 ? 'yzm-btn' : 'active yzm-btn'">{{ time.second == 60 ? '获取验证码' : `已发送验证码(${time.second})` }}</div>
</div>
</div>
<div class="box-btn" @click="login">登录</div>
......@@ -130,7 +130,8 @@ export default {
action.Login.login(param).then((res) => {
if (res.code === 5004) {
this.$router.push({
path: '/details'
path: '/details',
query: param
})
// 跳转
}
......@@ -152,6 +153,7 @@ export default {
this.clearTickCode()
},
getRegisterCode() {
// const mobile = thisform.accountLogin2.mobile || this.form.register.mobile
if (!(/^1[3-9]\d{9}$/.test(this.form.register.mobile))) {
Toast('手机号不正确')
return false
......@@ -163,6 +165,19 @@ export default {
})
}
},
getLoginCode() {
// const mobile = thisform.accountLogin2.mobile || this.form.register.mobile
if (!(/^1[3-9]\d{9}$/.test(this.form.accountLogin2.mobile))) {
Toast('手机号不正确')
return false
}
if (this.time.second === 60) {
action.Login.getSendCode({ mobile: this.form.accountLogin2.mobile }).then((res) => {
res.code === 0 && (this.tickCode())
Toast(res.msg)
})
}
},
tickCode() {
clearInterval(this.time.clearTime)
this.time.clearTime = setInterval(() => {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论