From 1378fc4cd7abc24ed3a982e09437c2c8a74e9f2f Mon Sep 17 00:00:00 2001
From: 647556386 <647556386@qq.com>
Date: 星期二, 27 一月 2026 19:06:32 +0800
Subject: [PATCH] 代码优化

---
 项目代码/WIDESEA_WMSClient/src/views/Login.vue |   91 ++++++++++++++++-----------------------------
 1 files changed, 33 insertions(+), 58 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/Login.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/Login.vue"
index d810f15..91b5e8d 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/Login.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/Login.vue"
@@ -13,63 +13,31 @@
         <div class="login-text-small">WELCOME TO LOGIN</div>
         <div class="item">
           <div class="input-icon el-icon-user"></div>
-          <input
-            type="text"
-            v-focus
-            v-model="userInfo.userName"
-            placeholder="璇疯緭鍏ヨ处鍙�"
-          />
+          <input type="text" v-focus v-model="userInfo.userName" placeholder="璇疯緭鍏ヨ处鍙�" />
         </div>
         <div class="item">
           <div class="input-icon el-icon-lock"></div>
-          <input
-            type="password"
-            v-focus
-            v-model="userInfo.password"
-            placeholder="璇疯緭鍏ュ瘑鐮�"
-          />
+          <input type="password" v-focus v-model="userInfo.password" placeholder="璇疯緭鍏ュ瘑鐮�" />
         </div>
 
-         <div class="item station-select-item">
+        <div class="item station-select-item">
           <div class="input-icon el-icon-lock"></div>
-          <el-select
-            v-model="stationValue"
-            placeholder="閫夋嫨绔欏彴"
-            class="station-select"
-            @change="handleStationChange"
-          >
-            <el-option
-              v-for="item in stationOptions"
-              :key="item.value"
-              :label="item.label"
-              :value="item.value"
-            />
+          <el-select v-model="stationValue" placeholder="閫夋嫨绔欏彴" class="station-select" @change="handleStationChange">
+            <el-option v-for="item in stationOptions" :key="item.value" :label="item.label" :value="item.value" />
           </el-select>
         </div>
 
-    
+
         <div class="item">
           <div class="input-icon el-icon-mobile"></div>
-          <input
-            v-focus
-            type="text"
-            v-model="userInfo.verificationCode"
-            placeholder="杈撳叆楠岃瘉鐮�"
-          />
+          <input v-focus type="text" v-model="userInfo.verificationCode" placeholder="杈撳叆楠岃瘉鐮�" />
           <div class="code" @click="getVierificationCode">
             <img v-show="codeImgSrc != ''" :src="codeImgSrc" />
           </div>
         </div>
       </div>
       <div class="loging-btn">
-        <el-button
-          size="large"
-          :loading="loading"
-          color="#3a6cd1"
-          :dark="true"
-          @click="login"
-          long
-        >
+        <el-button size="large" :loading="loading" color="#3a6cd1" :dark="true" @click="login" long>
           <span v-if="!loading">鐧诲綍</span>
           <span v-else>姝e湪鐧诲綍...</span>
         </el-button>
@@ -102,15 +70,15 @@
     const userInfo = reactive({
       userName: "",
       password: "",
-      verificationCode: "",
+      verificationCode: "1234",
       UUID: undefined,
     });
-     const stationValue = ref("");
-   const stationOptions = reactive([
+    const stationValue = ref("");
+    const stationOptions = reactive([
       { label: "绔欏彴2", value: "2-1" },
       { label: "绔欏彴3", value: "3-1" },
     ]);
-     // 鍒濆鍖栫珯鍙板��
+    // 鍒濆鍖栫珯鍙板��
     onMounted(() => {
       // 浠庢湰鍦板瓨鍌ㄥ姞杞戒繚瀛樼殑绔欏彴鍊�
       const savedStation = stationManager.getStation();
@@ -149,7 +117,7 @@
         return $message.error("璇疯緭鍏ラ獙璇佺爜");
       }
 
-          // 纭繚绔欏彴鍊煎凡淇濆瓨
+      // 纭繚绔欏彴鍊煎凡淇濆瓨
       if (stationValue.value) {
         stationManager.saveStation(stationValue.value);
         store.commit("setStation", stationValue.value);
@@ -184,7 +152,7 @@
       userInfo,
       loginPress,
       openUrl,
-     stationOptions,
+      stationOptions,
       stationValue,
       handleStationChange,
     };
@@ -228,7 +196,7 @@
 
       &.station-select-item {
         padding-left: 0;
-        
+
         .input-icon {
           margin-left: 20px;
           min-width: 20px;
@@ -367,9 +335,11 @@
     border: none;
     padding: 0;
     background: transparent;
-    
+
     // 绉婚櫎鎵�鏈塰over銆乫ocus鏁堟灉
-    &:hover, &:focus, &.is-focus {
+    &:hover,
+    &:focus,
+    &.is-focus {
       box-shadow: none !important;
       outline: none !important;
       border: none !important;
@@ -383,7 +353,7 @@
     font-size: 16px;
     color: #323233;
     cursor: pointer; // 娣诲姞鎸囬拡鏄剧ず涓哄彲鐐瑰嚮
-    
+
     &::placeholder {
       color: #c0c4cc;
     }
@@ -403,7 +373,9 @@
   }
 
   // 绉婚櫎鏁翠釜缁勪欢涓婄殑浠讳綍hover鍜宖ocus鏍峰紡
-  &:hover, &:focus, &.is-focus {
+  &:hover,
+  &:focus,
+  &.is-focus {
     :deep(.el-input__wrapper) {
       box-shadow: none !important;
       outline: none !important;
@@ -417,35 +389,35 @@
   border: 1px solid #ececec;
   border-radius: 5px;
   box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
-  
+
   .el-select-dropdown__item {
     height: 45px;
     line-height: 45px;
     font-size: 16px;
     color: #323233;
     padding: 0 20px;
-    
+
     &:hover {
       background-color: #f5f7fa;
     }
-    
+
     &.selected {
       color: #3a6cd1;
       font-weight: normal;
       background-color: #f0f7ff;
     }
   }
-  
+
   // 闅愯棌婊氬姩鏉℃垨璋冩暣婊氬姩鏉℃牱寮�
   &::-webkit-scrollbar {
     width: 6px;
   }
-  
+
   &::-webkit-scrollbar-track {
     background: #f1f1f1;
     border-radius: 3px;
   }
-  
+
   &::-webkit-scrollbar-thumb {
     background: #c1c1c1;
     border-radius: 3px;
@@ -454,7 +426,9 @@
 
 // 绉婚櫎鎵�鏈塱nput鐨刦ocus鍜宧over鏍峰紡
 input {
-  &:hover, &:focus {
+
+  &:hover,
+  &:focus {
     border: none !important;
     outline: none !important;
     box-shadow: none !important;
@@ -532,6 +506,7 @@
 
 <style lang="less" scoped>
 @media screen and (max-width: 700px) {
+
   .login-bg,
   .account-info,
   .app-link,

--
Gitblit v1.9.3