From 04412c75e4f856f73378970b5b672be47ac0a5b5 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 02 四月 2025 16:54:58 +0800
Subject: [PATCH] 2025-04-02

---
 src/index.js               |    2 +
 src/views/login/index.scss |   37 +++++++-----------
 public/manifest.json       |    2 
 src/views/login/index.jsx  |   21 +++++++++-
 4 files changed, 36 insertions(+), 26 deletions(-)

diff --git a/public/manifest.json b/public/manifest.json
index 18d9315..a87928a 100644
--- a/public/manifest.json
+++ b/public/manifest.json
@@ -6,5 +6,5 @@
   "display": "standalone",
   "theme_color": "#000000",
   "background_color": "#ffffff",
-  "mk_version": "20250301"
+  "mk_version": "20250402"
 }
diff --git a/src/index.js b/src/index.js
index 07da582..a03d6c9 100644
--- a/src/index.js
+++ b/src/index.js
@@ -247,6 +247,8 @@
         GLOB.showline = _systemMsg.showline || ''
         GLOB.navBar = _systemMsg.navBar || 'shutter'
         GLOB.appVersion = _systemMsg.app_version || ''
+        GLOB.loginOtop = _systemMsg.loginOtop || ''
+        GLOB.loginOleft = _systemMsg.loginOleft || ''
         sessionStorage.setItem('appname', _systemMsg.appname || '')
 
         let levels = [30, 10, 20, 40, 50, 60, 70, 80, 90, 100]
diff --git a/src/views/login/index.jsx b/src/views/login/index.jsx
index 9d0ab7b..20043a7 100644
--- a/src/views/login/index.jsx
+++ b/src/views/login/index.jsx
@@ -616,7 +616,9 @@
               navBar: res.menu_type, // shutter 鐧惧彾绐椼�乴inkage_navigation 鑱斿姩鑿滃崟銆乴inkage 鑱斿姩鑿滃崟_鏃犲鑸爮銆乵enu_board 鑿滃崟闈㈡澘銆乵enu_board_navigation 鑿滃崟闈㈡澘_鏍囩椤�
               app_version: res.app_version,
               Member_Level: 0,
-              appname: res.appname || ''
+              appname: res.appname || '',
+              loginOtop: res.loginOtop || '',
+              loginOleft: res.loginOleft || ''
             }
 
             if ([10, 20, 30, 40, 50, 60, 70, 80, 90, 100].includes(res.member_level)) {
@@ -730,6 +732,9 @@
               window.location.reload()
               return
             }
+
+            window.GLOB.loginOtop = systemMsg.loginOtop
+            window.GLOB.loginOleft = systemMsg.loginOleft
             
             this.setState({
               loginWays: login_ways,
@@ -903,8 +908,20 @@
   render () {
     const { lineColor, bgImage, loginlogo, copyRight, webSite, ICP, loginWays } = this.state
 
+    let wrapStyle = {}
+
+    if (bgImage) {
+      wrapStyle.backgroundImage = `url(${bgImage})`
+    }
+    if (window.GLOB.loginOtop) {
+      wrapStyle['--mk-login-offset-top'] = window.GLOB.loginOtop
+    }
+    if (window.GLOB.loginOleft) {
+      wrapStyle['--mk-login-offset-left'] = window.GLOB.loginOleft
+    }
+
     return (
-      <div className="login-container" id="mk-login-view" style={bgImage ? {backgroundImage: 'url(' + bgImage + ')'} : {}}>
+      <div className="login-container" id="mk-login-view" style={wrapStyle}>
         <div className="logo" style={lineColor ? {borderColor: lineColor} : {}}>
           {loginlogo ? <img src={loginlogo} alt=""/> : null}
           {this.state.platName ? <p className="plat-name">{this.state.platName}</p> : null}
diff --git a/src/views/login/index.scss b/src/views/login/index.scss
index a5b2e89..cb8b3af 100644
--- a/src/views/login/index.scss
+++ b/src/views/login/index.scss
@@ -5,6 +5,9 @@
   background-size: cover;
   background-repeat: no-repeat;
   background-position: center center;
+  --mk-login-offset-top: 0px;
+  --mk-login-offset-left: 0px;
+
   .logo {
     position: relative;
     height: 100px;
@@ -28,11 +31,14 @@
 
   .login-middle {
     position: relative;
-    height: calc(100vh - 194px);
+    height: calc(100vh - 200px);
     min-height: 420px;
-    background-size: cover;
-    background-position: center center;
     border-bottom: 2px solid var(--mk-sys-color);
+    display: flex;
+    align-items: center;
+    justify-content: right;
+    padding-right: 20vw;
+    overflow: hidden;
 
     .login-form-button {
       background-color: var(--mk-sys-color);
@@ -51,15 +57,15 @@
 
     .login-form {
       position: relative;
-      float: right;
-      margin-top: 5%;
-      margin-right: 20%;
       background: #ffffff;
       width: 22vw;
       min-width: 300px;
       border-radius: 5px;
       overflow: hidden;
       border: 1px solid #bfbfbf;
+      top: var(--mk-login-offset-top, 0px);
+      left: var(--mk-login-offset-left, 0px);
+      transition: all 0.2s;
 
       .login-way-title {
         font-size: 18px;
@@ -324,23 +330,8 @@
 @media screen and (max-width: 500px) {
   .login-container {
     .login-middle {
-      .login-form {
-        float: unset;
-        margin: 0 auto;
-        margin-top: 5%;
-      }
-    }
-  }
-}
-
-@media screen and (min-width: 1550px) {
-  .login-container {
-    .ant-tabs.ant-tabs-card {
-      .ant-tabs-card-bar {
-        .ant-tabs-tab {
-          font-size: 20px;
-        }
-      }
+      justify-content: center;
+      padding-right: 0px;
     }
   }
 }
\ No newline at end of file

--
Gitblit v1.8.0