|
@@ -8,10 +8,11 @@
|
|
|
<h3 class="title">手机号码登录</h3>
|
|
|
<p class="tips">手机号码登录,未注册将自动创建智能白板账号</p>
|
|
|
<el-form-item prop="username">
|
|
|
- <el-input v-model="loginForm.username" name="username" type="text" placeholder="手机号" />
|
|
|
+ <el-input v-model="loginForm.username" name="username" type="text" placeholder="手机号" focus="true" @keyup.enter.native="handleCode" />
|
|
|
</el-form-item>
|
|
|
<el-form-item prop="code">
|
|
|
<el-input
|
|
|
+ ref="code"
|
|
|
v-model="loginForm.code"
|
|
|
name="code"
|
|
|
type="text"
|
|
@@ -101,11 +102,12 @@ export default {
|
|
|
// },
|
|
|
handleCode() {
|
|
|
this.$refs.loginForm.validate(valid => {
|
|
|
+ // this.$nextTick(() => {
|
|
|
+ // this.$refs.code.focus()
|
|
|
+ // })
|
|
|
if (valid && (!this.flag)) {
|
|
|
this.$store.dispatch('sendMag', this.loginForm).then(() => {
|
|
|
this.countDown()
|
|
|
- }).catch(() => {
|
|
|
-
|
|
|
})
|
|
|
} else {
|
|
|
console.log('error submit!!')
|