diff --git a/src/assets/img/login/correct.svg b/src/assets/img/login/correct.svg new file mode 100644 index 0000000..da507b2 --- /dev/null +++ b/src/assets/img/login/correct.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/pages/account/login/accountApplyMatch.vue b/src/pages/account/login/accountApplyMatch.vue index cd80300..4ff17cf 100644 --- a/src/pages/account/login/accountApplyMatch.vue +++ b/src/pages/account/login/accountApplyMatch.vue @@ -10,9 +10,11 @@ - - + + + + +

{{ phoneMsg }}

@@ -62,6 +64,7 @@ export default { return { accountVisible: false, exist: true, + phoneMsg: '', form: { schoolId: '', account: '', @@ -99,13 +102,17 @@ export default { // 注册手机号输入完回调。没有账号才能继续操作 async checkAccountByPhoneReg (val) { if (!this.$parent.phoneReg.test(val)) { + this.$refs.phoneItem.clearValidate() + this.phoneMsg = '请输入正确的手机号' this.exist = true return false } try { const { message } = await this.$get(`${this.api.forgotPreVerification}?phoneOrEmail=${val}&platform=${Setting.platformId}`) - this.exist = message === 'success' // 用户已存在 + const exist = message === 'success' // 用户已存在 + this.exist = exist // 用户已存在 + this.phoneMsg = exist ? '该手机号已注册!' : '' this.form.workNumber = this.exist ? '' : val } catch (e) { } }, diff --git a/src/pages/account/login/index.vue b/src/pages/account/login/index.vue index ffd14a8..f130002 100644 --- a/src/pages/account/login/index.vue +++ b/src/pages/account/login/index.vue @@ -31,7 +31,10 @@ + @keyup.enter.native="submit"> + +

{{ diaClientMsg }}

@@ -148,7 +151,10 @@ + @input="val => checkAccountByPhone(val, 1)"> + +

{{ diaClientMsg }}

@@ -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); }