From 66510450a254daed07b97cc10698cb1a228d716f Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期五, 06 三月 2026 10:01:27 +0800
Subject: [PATCH] 优化

---
 admin/src/views/login.vue |   48 +++++++++++++++++-------------------------------
 1 files changed, 17 insertions(+), 31 deletions(-)

diff --git a/admin/src/views/login.vue b/admin/src/views/login.vue
index 6b33f2b..88ffee6 100644
--- a/admin/src/views/login.vue
+++ b/admin/src/views/login.vue
@@ -3,7 +3,7 @@
     <img src="@/assets/images/bg@2x.png" class="main_bg" alt="">
     <div class="login_wrap">
       <div class="login_img">
-        <div class="h3" style="font-size: 30px; margin-bottom: 0;">{{password.title || ''}}</div>
+        <div class="h3" style="font-size: 30px; margin-left: 140px; margin-bottom: 0;">鑺滄箹鐑熻崏</div>
         <div class="h3">鏅烘収鐗╂祦鍥尯瀹夋秷涓�浣撳寲绯荤粺</div>
       </div>
       <div class="form_wrap">
@@ -73,23 +73,22 @@
 </template>
 
 <script>
-import { mapMutations, mapState } from 'vuex'
-import { getCaptcha, loginByPassword, sendSmsPost, loginByPhone, getSystemConfig } from '@/api/system/common'
-import Cookies from 'js-cookie'
+import { mapMutations } from 'vuex'
+import { getCaptcha, loginByPassword, sendSmsPost, loginByPhone } from '@/api/system/common'
+import Cookies from "js-cookie"
 import { Message } from 'element-ui'
 
 export default {
   name: 'Login',
-  data () {
+  data() {
     return {
-      title: process.env.VUE_APP_TITLE,
       loading: false,
       isRemPsd: false,
       username: '',
       password: '',
       phone: '',
       downTime: 0,
-      paramConfig:{},
+
       smsCode: '',
       activeTab: '0',
       // 楠岃瘉鐮�
@@ -101,31 +100,18 @@
       }
     }
   },
-  computed: {
-    ...mapState(['sysConfig'])
-  },
-  mounted () {
+  mounted() {
     this.username = localStorage.getItem('username') || ''
     this.password = localStorage.getItem('password') || ''
     this.phone = localStorage.getItem('phone') || ''
     const isRemPsd = localStorage.getItem('isRemPsd') || false
     this.isRemPsd = JSON.parse(isRemPsd)
     this.refreshCaptcha()
-    this.getSystemConfig()
   },
   methods: {
-    ...mapMutations(['setUserInfo', 'setSysconfig']),
-    getSystemConfig () {
-      getSystemConfig()
-        .then((res) => {
-          if (res  ) {
-            this.paramConfig  = res||{}
-            this.setSysconfig(res)
-          }
-        })
-    },
+    ...mapMutations(['setUserInfo']),
     // 鐧诲綍
-    login () {
+    login() {
       if (this.loading) {
         return
       }
@@ -181,8 +167,9 @@
           this.loading = false
         })
       }
+
     },
-    getCode () {
+    getCode() {
       console.log('getCode')
       const { phone } = this
       if (!phone || phone.length != 11) {
@@ -191,7 +178,7 @@
       sendSmsPost({ phone, type: 0 }).then(res => {
         Message.success('鐭俊鍙戦�佹垚鍔�')
         this.downTime = 60
-        const timer = setInterval(() => {
+        let timer = setInterval(() => {
           if (this.downTime == 0) {
             return clearInterval(timer)
           }
@@ -199,11 +186,11 @@
         }, 1000)
       })
     },
-    tabClick (val) {
+    tabClick(val) {
       this.activeTab = val
     },
     // 鍒锋柊楠岃瘉鐮�
-    refreshCaptcha () {
+    refreshCaptcha() {
       this.captcha.loading = true
       getCaptcha()
         .then(data => {
@@ -220,7 +207,7 @@
         })
     },
     // 鐧诲綍鍓嶉獙璇�
-    __check () {
+    __check() {
       if (this.username.trim() === '') {
         this.$tip.error('璇疯緭鍏ョ敤鎴峰悕')
         return false
@@ -235,7 +222,7 @@
       }
       return true
     }
-  }
+  },
 
 }
 </script>
@@ -280,6 +267,7 @@
       height: 600px;
       background: url("../assets/images/login_img@2x.png");
       background-size: 100% 100%;
+      padding-left: 40px;
       padding-top: 60px;
 
       .h2 {
@@ -290,14 +278,12 @@
         align-items: center;
         justify-content: center;
         border-radius: 4px;
-        text-align: center;
         width: 208px;
         display: flex;
         margin-bottom: 12px;
       }
 
       .h3 {
-        text-align: center;
         font-size: 28px;
         font-weight: 700;
         color: #fff;

--
Gitblit v1.9.3