|
|
|
@ -31,7 +31,10 @@ |
|
|
|
|
<el-form-item prop="account" ref="phoneItem"> |
|
|
|
|
<label class="label account"></label> |
|
|
|
|
<el-input v-model.trim="form.account" placeholder="请输入手机号/邮箱" @input="val => checkAccountByPhone(val, 0)" |
|
|
|
|
@keyup.enter.native="submit"></el-input> |
|
|
|
|
@keyup.enter.native="submit"> |
|
|
|
|
<img v-if="verFormEnable" slot="suffix" class="correct-icon" src="@/assets/img/login/correct.svg" |
|
|
|
|
alt=""> |
|
|
|
|
</el-input> |
|
|
|
|
<p v-if="diaClientMsg" class="el-form-item__error">{{ diaClientMsg }}</p> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item prop="code"> |
|
|
|
@ -148,7 +151,10 @@ |
|
|
|
|
<el-form class="dia-form" ref="pwForm" label-width="110px" :model="pwForm" :rules="pwRules"> |
|
|
|
|
<el-form-item prop="phoneOrEmail" label="手机号/邮箱" ref="diaPhoneItem"> |
|
|
|
|
<el-input placeholder="请输入手机号/邮箱" v-model.trim="pwForm.phoneOrEmail" |
|
|
|
|
@input="val => checkAccountByPhone(val, 1)"></el-input> |
|
|
|
|
@input="val => checkAccountByPhone(val, 1)"> |
|
|
|
|
<img v-if="diaClientExist" slot="suffix" style="margin-top: -6px;" src="@/assets/img/login/correct.svg" |
|
|
|
|
alt=""> |
|
|
|
|
</el-input> |
|
|
|
|
<p v-if="diaClientMsg" class="el-form-item__error">{{ diaClientMsg }}</p> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item prop="code" label="验证码"> |
|
|
|
@ -510,7 +516,7 @@ export default { |
|
|
|
|
async checkAccountByPhone (val, type) { |
|
|
|
|
if (!this.phoneReg.test(val) && !this.mailReg.test(val)) { |
|
|
|
|
this.$refs[type ? 'diaPhoneItem' : 'phoneItem'].clearValidate() |
|
|
|
|
this.diaClientMsg = '' |
|
|
|
|
this.diaClientMsg = '请输入正确的手机号/邮箱' |
|
|
|
|
this[type ? 'diaClientExist' : 'verFormEnable'] = false |
|
|
|
|
return false |
|
|
|
|
} |
|
|
|
@ -845,6 +851,11 @@ export default { |
|
|
|
|
background: url(../../../assets/img/login/account.png) 0 0/100% 100% no-repeat; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.correct-icon { |
|
|
|
|
width: 30px; |
|
|
|
|
margin: 11px 3px 0 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.school { |
|
|
|
|
background-image: url(../../../assets/img/login/school.png); |
|
|
|
|
} |
|
|
|
|