From f1b3a5d1e7824d44a280b65d82a81231ae699942 Mon Sep 17 00:00:00 2001
From: 张诺 <2864490065@qq.com>
Date: 星期二, 19 八月 2025 15:16:50 +0800
Subject: [PATCH] 禁用login 获取验证码功能 使页面不需要验证码即可登录

---
 src/views/login.vue |   48 ++++++++++++++++++++++++++++++++----------------
 1 files changed, 32 insertions(+), 16 deletions(-)

diff --git a/src/views/login.vue b/src/views/login.vue
index d4767c2..f726aa1 100644
--- a/src/views/login.vue
+++ b/src/views/login.vue
@@ -70,7 +70,7 @@
 </template>
 
 <script setup>
-import { getCodeImg } from "@/api/login"
+// import { getCodeImg } from "@/api/login"
 import Cookies from "js-cookie"
 import { encrypt, decrypt } from "@/utils/jsencrypt"
 import useUserStore from '@/store/modules/user'
@@ -135,23 +135,23 @@
       }).catch(() => {
         loading.value = false
         // 閲嶆柊鑾峰彇楠岃瘉鐮�
-        if (captchaEnabled.value) {
-          getCode()
-        }
+        // if (captchaEnabled.value) {
+        //   getCode()
+        // }
       })
     }
   })
 }
 
-function getCode() {
-  getCodeImg().then(res => {
-    captchaEnabled.value = res.captchaEnabled === undefined ? true : res.captchaEnabled
-    if (captchaEnabled.value) {
-      codeUrl.value = "data:image/gif;base64," + res.img
-      loginForm.value.uuid = res.uuid
-    }
-  })
-}
+// function getCode() {
+//   getCodeImg().then(res => {
+//     captchaEnabled.value = res.captchaEnabled === undefined ? true : res.captchaEnabled
+//     if (captchaEnabled.value) {
+//       codeUrl.value = "data:image/gif;base64," + res.img
+//       loginForm.value.uuid = res.uuid
+//     }
+//   })
+// }
 
 function getCookie() {
   const username = Cookies.get("username")
@@ -164,7 +164,7 @@
   }
 }
 
-getCode()
+// getCode()
 getCookie()
 </script>
 
@@ -174,7 +174,7 @@
   //justify-content: center;
   //align-items: center;
   height: 100%;
-  background-image: url("../assets/images/login-background.png");
+  background-image: url("../assets/images/Logo2Back.jpg");
   background-size: cover;
   position: relative;
 }
@@ -186,11 +186,21 @@
 }
 .login-card {
   background: #ffffff;
-  width: 384px;
+  padding: 20px;
+  width: 430px;
   position: absolute;
   top: 50%;
   transform: translate(0, -50%);
   right: 206px;
+}
+@media (max-width: 992px) {
+  .login-card {
+    width: 300px;
+    position: absolute;
+    top: 50%;
+    left: 50%; /* 鏂板姘村钩瀹氫綅鍩哄噯 */
+    transform: translate(-50%, -50%); /* 鍚屾椂澶勭悊XY杞村亸绉� */
+  }
 }
 .login-form {
   border-radius: 6px;
@@ -243,4 +253,10 @@
   font-size: 20px;
   color: #000000;
 }
+@media (max-width: 992px) {
+  :deep(.el-form-item__content) {
+    width: 260px;
+    
+  }
+}
 </style>

--
Gitblit v1.9.3