From e3ffd6d6c9dbf6be99869efd027864c9e4972949 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=86=8A=E9=A3=9E?= Date: Wed, 21 Feb 2024 16:44:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/login/index.vue | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 98e72e44..6e563c7e 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -180,6 +180,7 @@ export default { loginType: null, location: null, isShow: false, + showCode: false, Img1 } }, @@ -230,8 +231,11 @@ export default { this.loginType = this.$route.query.loginType this.$refs.loginForm.validate(valid => { if (valid) { - this.isShow = true - // this.onSuccess() + if (this.showCode) { + this.isShow = true + } else { + this.onSuccess() + } } else { // console.log('error submit!!') return false @@ -240,6 +244,7 @@ export default { }, loginIn() { this.loading = true + this.showCode = false this.$store.dispatch('user/login', this.loginForm).then((res) => { if (!res) { // 当前用户为首次登录,请先修改密码之后再次登录 @@ -274,6 +279,7 @@ export default { }) }) .catch(() => { + this.showCode = true this.loading = false }) },