From 8c085f63ebfa7363415dcd8ca8d156f9787cf54d Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Mon, 9 Sep 2024 16:13:05 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E5=BD=95=E6=B7=BB=E5=8A=A0=E6=89=8B?= =?UTF-8?q?=E6=9C=BA=E5=8F=B7=E8=BE=93=E5=85=A5=E6=AD=A3=E7=A1=AE=E6=8F=90?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/img/login/correct.svg | 1 + src/pages/account/login/accountApplyMatch.vue | 15 +++++++++++---- src/pages/account/login/index.vue | 17 ++++++++++++++--- 3 files changed, 26 insertions(+), 7 deletions(-) create mode 100644 src/assets/img/login/correct.svg 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); }