From 25bcededa0bd50ef0a347d5e7de4c59dff23aa2e Mon Sep 17 00:00:00 2001
From: odjbin <1042039504@qq.com>
Date: Tue, 5 Mar 2024 21:58:53 +0800
Subject: [PATCH 1/2] =?UTF-8?q?fix=20:=20=E4=BF=AE=E5=A4=8Dloading?=
=?UTF-8?q?=E5=8A=A0=E8=BD=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/login/index.vue | 58 +++++++++++++++++++++------------------
1 file changed, 32 insertions(+), 26 deletions(-)
diff --git a/src/views/login/index.vue b/src/views/login/index.vue
index 918cd88..1656965 100644
--- a/src/views/login/index.vue
+++ b/src/views/login/index.vue
@@ -1,37 +1,39 @@
科研管理平台
-
+
-
+
-
+
-
+
- 登录
+ 登录
@@ -115,15 +118,18 @@ onBeforeUnmount(() => {
}
}
}
+
.code {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
+
.el-input {
// width: ;
flex: 2;
}
+
img {
height: 32px;
flex: 1;
From 565c976f7f09e70d4a4aaa1a6d2011da8f2f473f Mon Sep 17 00:00:00 2001
From: odjbin <1042039504@qq.com>
Date: Tue, 5 Mar 2024 22:13:36 +0800
Subject: [PATCH 2/2] =?UTF-8?q?fix=20:=20=E4=BF=AE=E5=A4=8Dloading?=
=?UTF-8?q?=E5=8A=A0=E8=BD=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/login/index.vue | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/src/views/login/index.vue b/src/views/login/index.vue
index 1656965..f216894 100644
--- a/src/views/login/index.vue
+++ b/src/views/login/index.vue
@@ -68,19 +68,18 @@ const handleLogin = (instance) => {
if (!instance) return
instance.validate(async (valid, fields) => {
if (!valid) return
- const loading = ElLoading.service({
- lock: true,
- text: '登录中...',
- background: 'rgba(0, 0, 0, 0.7)',
- })
// 发送请求
await authStore.userLogin(loginForm).then(res => {
- if (res.code === 1000) {
+ if (res) {
+ ElLoading.service({
+ lock: true,
+ text: '登录中...',
+ background: 'rgba(0, 0, 0, 0.7)',
+ })
router.push('/')
} else {
getCode()
}
- loading.close()
})
})
}
@@ -88,7 +87,11 @@ const handleLogin = (instance) => {
getCode()
onBeforeUnmount(() => {
- ElLoading.service({text: '正在加载系统资源', background: '#409eff', lock: true}).close()
+ ElLoading.service({
+ lock: true,
+ text: '登录中...',
+ background: 'rgba(0, 0, 0, 0.7)',
+ }).close()
})