From f033da325dd16825bbca0d1ac71cc76420dfc8a2 Mon Sep 17 00:00:00 2001
From: Junjie <DELL@qq.com>
Date: 星期五, 09 一月 2026 11:14:36 +0800
Subject: [PATCH] #

---
 src/main/webapp/views/login.html |  276 +++++++++++++++++++++++++++++++++++++++---------------
 1 files changed, 197 insertions(+), 79 deletions(-)

diff --git a/src/main/webapp/views/login.html b/src/main/webapp/views/login.html
index 37fa7c5..96fe62b 100644
--- a/src/main/webapp/views/login.html
+++ b/src/main/webapp/views/login.html
@@ -4,6 +4,8 @@
     <meta charset="UTF-8">
     <title>绯荤粺鐧诲綍</title>
     <link rel="stylesheet" href="../static/layui/css/layui.css" media="all">
+    <link rel="icon" type="image/x-icon" href="../static/images/wcs_logo.png" />
+    <link rel="stylesheet" href="../static/css/animate.min.css">
     <script type="text/javascript" src="../static/layui/layui.js"></script>
     <script type="text/javascript" src="../static/js/common.js"></script>
     <style>
@@ -13,8 +15,9 @@
         body.login-bg {
             color: #777;
             height: 100%;
-            background-image: linear-gradient(to right, #ff9569 0%, #e92758 100%);
-            /*background-image: linear-gradient(-90deg, #29bdd9 0%, #276ace 100%);*/
+            /*background-image: linear-gradient(to right, #ff9569 0%, #e92758 100%);*/
+            /*background-image: linear-gradient(-90deg, #a2e7f3 0%, #98baee 100%);*/
+            background-image: url("../static/images/login.png");
             /*background: -webkit-linear-gradient(red, blue); !* Safari 5.1 - 6.0 *!;*/
             /*background-image: url("../static/image/login_bg.jpg");*/
             /*background-repeat: no-repeat;*/
@@ -30,19 +33,21 @@
             left: 50%;
             margin-top: -210px;
             margin-left: -220px;
-            width: 440px;
-            min-height: 420px;
+            width: 400px;
+            min-height: 380px;
             padding: 50px;
             text-align: center;
             border-radius: 5px;
-
+            box-shadow: 0px 0px 10px rgb(168, 165, 165);
             transform-origin: 50% 50%;
-            animation: loading 1s 0s forwards;
+            /*animation: loading 1s 0s forwards;*/
             transform: rotateX(0deg);
         }
 
         #login-wrapper h2 {
+            color: rgba(64,158,255,0.9);
             font-size: 26px;
+            font-weight: bold;
             margin-bottom: 30px;
         }
 
@@ -71,40 +76,23 @@
             font-size: 18px;
         }
         .layui-btn-normal {
-            background-color: #0767aa;
+            background-color: rgba(64,158,255,0.9);
             font-size: 20px;
             border-radius: 4px;
             height: 52px;
         }
-        #code-box {
-            position: relative;
-            height: 42px;
-        }
-        #code-label {
-            z-index: 999;
-        }
-        #code {
-            position: absolute;
-            left: 0;
-            top: 0;
-            display: inline-block;
-            width: 60%;
-        }
-        #codeImg {
-            border: 1px solid rgba(0,0,0,0.1);
-            position: absolute;
-            right: 5%;
-            top: 0;
-            width: 30%;
-            height: 90%;
-        }
     </style>
 </head>
-<body class="login-bg">
+<body class="login-bg animsition">
 
-<div id="login-wrapper">
+<div id="login-wrapper" class="animate__animated animate__bounceInDown">
     <header>
-        <h2>WCS 绯荤粺鐧诲綍</h2>
+        <h2 id="login-title" style="cursor: pointer; user-select: none;">WCS绯荤粺V3.0</h2>
+        <div id="system-btns" style="display: none; margin-bottom: 20px;">
+            <button class="layui-btn layui-btn-normal layui-btn-sm" id="btn-project-name">鑾峰彇椤圭洰鍚嶇О</button>
+            <button class="layui-btn layui-btn-normal layui-btn-sm" id="btn-server-info">鑾峰彇绯荤粺閰嶇疆</button>
+            <button class="layui-btn layui-btn-normal layui-btn-sm" id="btn-activate">涓�閿縺娲�</button>
+        </div>
     </header>
     <div class="layui-form layadmin-user-login-body">
         <div class="layui-form-item">
@@ -115,18 +103,18 @@
             <label class="layui-icon layui-icon-password layadmin-user-login-icon"></label>
             <input id="password" class="layui-input" type="password" name="password" lay-verify="password" placeholder="瀵嗙爜">
         </div>
-        <div id="code-box" class="layui-form-item" style="">
-            <label id="code-label" class="layui-icon layui-icon-vercode layadmin-user-login-icon"></label>
-            <input id="code" class="layui-input" type="text" name="password" lay-verify="code" placeholder="楠岃瘉鐮�">
-            <img id="codeImg" title="鐪嬩笉娓咃紵鐐瑰嚮鎹竴寮犮��">
-        </div>
+<!--        <div id="code-box" class="layui-form-item" style="">-->
+<!--            <label id="code-label" class="layui-icon layui-icon-vercode layadmin-user-login-icon"></label>-->
+<!--            <input id="code" class="layui-input" type="text" name="password" lay-verify="code" placeholder="楠岃瘉鐮�">-->
+<!--            <img id="codeImg" title="鐪嬩笉娓咃紵鐐瑰嚮鎹竴寮犮��">-->
+<!--        </div>-->
         <!--<div class="layui-form-item">-->
             <!--<input id="rememberPwd" style="vertical-align: middle" type="checkbox" lay-filter="remPwd" lay-skin="switch" lay-text="寮�鍚瘄鍏抽棴" title="璁颁綇瀵嗙爜" checked="checked">-->
             <!--<span style="vertical-align: middle;font-size: 15px">璁颁綇瀵嗙爜</span>-->
         <!--</div>-->
     </div>
     <div class="layui-form-item login-submit">
-        <button id="login-button" class="layui-btn layui-btn-fluid layui-btn-normal" lay-submit="" lay-filter="login">鐧� 褰�</button>
+        <button id="login-button" class="layui-btn layui-btn-fluid layui-btn-normal" lay-submit="" lay-filter="login">鐧� &nbsp  &nbsp 褰�</button>
     </div>
 </div>
 
@@ -135,44 +123,173 @@
 <script type="text/javascript" src="../static/js/tools/md5.js"></script>
 <script type="text/javascript">
 
-    // 楠岃瘉鐮佸紑鍏�
-    var codeSwitch = 'Y';
-    $.ajax({
-        url: baseUrl+"/code/switch.action",
-        async: false,
-        success: function (res) {
-            if (res.data === 'N'){
-                codeSwitch = res.data;
-                $('#code-box').css("display", "none");
-            }
-        }
-    });
+    // // 楠岃瘉鐮佸紑鍏�
+    // var codeSwitch = 'Y';
+    // $.ajax({
+    //     url: baseUrl+"/code/switch.action",
+    //     async: false,
+    //     success: function (res) {
+    //         if (res.data === 'N'){
+    //             codeSwitch = res.data;
+    //             $('#code-box').css("display", "none");
+    //         }
+    //     }
+    // });
 
-    // 鍒濆鍖栭獙璇佺爜
-    initCode();
-    $('#codeImg').click(function () {
-        initCode();
-    });
-    function initCode() {
-        var random = Math.random();
-        $('#codeImg').attr("src", baseUrl+"/code.action?sd="+random);
-        setTimeout(function () {
-            $.ajax({
-                url: baseUrl+"/code.do",
-                data: {sd: random},
-                method: 'POST',
-                async: false,
-                success: function (code) {
-                    sessionStorage.setItem("code", code);
-                }
-            });
-        }, 100);
-    }
+    // // 鍒濆鍖栭獙璇佺爜
+    // initCode();
+    // $('#codeImg').click(function () {
+    //     initCode();
+    // });
+    // function initCode() {
+    //     var random = Math.random();
+    //     $('#codeImg').attr("src", baseUrl+"/code.action?sd="+random);
+    //     setTimeout(function () {
+    //         $.ajax({
+    //             url: baseUrl+"/code.do",
+    //             data: {sd: random},
+    //             method: 'POST',
+    //             async: false,
+    //             success: function (code) {
+    //                 sessionStorage.setItem("code", code);
+    //             }
+    //         });
+    //     }, 100);
+    // }
 
     layui.use(['form','layer'],function () {
         var form = layui.form,
             layer = layui.layer,
             $ = layui.jquery;
+
+        // 杩炵画鐐瑰嚮涓夋鏍囬鏄剧ず闅愯棌鍔熻兘
+        var titleClickCount = 0;
+        var titleClickTimer = null;
+        $('#login-title').click(function() {
+            titleClickCount++;
+            if (titleClickTimer) {
+                clearTimeout(titleClickTimer);
+            }
+            if (titleClickCount >= 3) {
+                $('#system-btns').show();
+                titleClickCount = 0;
+            } else {
+                titleClickTimer = setTimeout(function() {
+                    titleClickCount = 0;
+                }, 500);
+            }
+        });
+
+        // 鑾峰彇绯荤粺閰嶇疆
+        $('#btn-server-info').click(function() {
+            $.ajax({
+                url: baseUrl + "/license/getServerInfos",
+                headers: {'token': localStorage.getItem('token')},
+                method: 'GET',
+                success: function (res) {
+                    var pretty = '';
+                    try {
+                        pretty = JSON.stringify(res, null, 2);
+                    } catch (e) {
+                        pretty = res;
+                    }
+                    var html = ''
+                        + '<div style="padding:15px 20px 5px 20px;">'
+                        +   '<div style="font-weight:600;margin-bottom:8px;">绯荤粺閰嶇疆淇℃伅</div>'
+                        +   '<pre id="server-info-pre" style="background:#f7f7f7;border:1px solid #e6e6e6;border-radius:6px;padding:12px;white-space:pre-wrap;word-wrap:break-word;max-height:360px;overflow:auto;">'
+                        +       pretty
+                        +   '</pre>'
+                        +   '<div class="layui-btn-container" style="text-align:right;margin-top:6px;">'
+                        +       '<button class="layui-btn layui-btn-primary" id="copy-server-info">澶嶅埗</button>'
+                        +   '</div>'
+                        + '</div>';
+                    layer.open({
+                        type: 1,
+                        title: '鑾峰彇绯荤粺閰嶇疆',
+                        area: ['640px','480px'],
+                        shadeClose: true,
+                        content: html,
+                        success: function (layero, index) {
+                            layero.find('#copy-server-info').on('click', function () {
+                                var text = layero.find('#server-info-pre').text();
+                                if (navigator.clipboard && navigator.clipboard.writeText) {
+                                    navigator.clipboard.writeText(text).then(function () {
+                                        layer.msg('宸插鍒跺埌鍓创鏉�');
+                                    }).catch(function () {
+                                        fallbackCopy(text);
+                                    });
+                                } else {
+                                    fallbackCopy(text);
+                                }
+                            });
+                        }
+                    });
+                },
+                error: function () {
+                    layer.msg('鑾峰彇绯荤粺閰嶇疆淇℃伅澶辫触');
+                }
+            });
+            return false;
+        });
+
+        function fallbackCopy(text) {
+            try {
+                var textarea = document.createElement('textarea');
+                textarea.value = text;
+                textarea.style.position = 'fixed';
+                textarea.style.opacity = '0';
+                document.body.appendChild(textarea);
+                textarea.select();
+                document.execCommand('copy');
+                document.body.removeChild(textarea);
+                layer.msg('宸插鍒跺埌鍓创鏉�');
+            } catch (err) {
+                layer.msg('澶嶅埗澶辫触');
+            }
+        }
+
+        // 涓�閿縺娲�
+        $('#btn-activate').click(function() {
+            layer.confirm('纭畾鎵ц涓�閿縺娲诲悧', function(index){
+                layer.close(index);
+                $.ajax({
+                    url: baseUrl + "/license/activate",
+                    headers: {'token': localStorage.getItem('token')},
+                    method: 'POST',
+                    success: function (res) {
+                        if (res.code === 200){
+                            layer.msg('婵�娲绘垚鍔�');
+                        } else {
+                            layer.msg(res.msg)
+                        }
+                    },
+                    error: function () {
+                        layer.msg('婵�娲诲け璐�');
+                    }
+                });
+            });
+            return false;
+        });
+
+        // 鑾峰彇椤圭洰鍚嶇О
+        $('#btn-project-name').click(function() {
+            $.ajax({
+                url: baseUrl + "/license/getProjectName",
+                headers: {'token': localStorage.getItem('token')},
+                method: 'GET',
+                success: function (res) {
+                    if (res.code === 200){
+                        layer.alert(res.msg);
+                    } else {
+                        layer.msg(res.msg)
+                    }
+                },
+                error: function () {
+                    layer.msg('鑾峰彇椤圭洰鍚嶇О澶辫触');
+                }
+            });
+            return false;
+        });
 
         form.on('submit(login)', function (data) {
             var mobile = $("#mobile").val();
@@ -185,15 +302,15 @@
                 layer.msg("璇疯緭鍏ュ瘑鐮�", {offset: '150px'});
                 return;
             }
-            var code = $("#code").val();
-            if (code === "" && codeSwitch === 'Y') {
-                layer.msg("璇疯緭鍏ラ獙璇佺爜", {offset: '150px'});
-                return;
-            }
-            if (sessionStorage.getItem("code").toUpperCase() !== code.toUpperCase()&&codeSwitch==='Y'){
-                layer.msg("楠岃瘉鐮侀敊璇�", {offset: '150px'});
-                return;
-            }
+            // var code = $("#code").val();
+            // if (code === "" && codeSwitch === 'Y') {
+            //     layer.msg("璇疯緭鍏ラ獙璇佺爜", {offset: '150px'});
+            //     return;
+            // }
+            // if (sessionStorage.getItem("code").toUpperCase() !== code.toUpperCase()&&codeSwitch==='Y'){
+            //     layer.msg("楠岃瘉鐮侀敊璇�", {offset: '150px'});
+            //     return;
+            // }
 
             var user = {
                 mobile: mobile,
@@ -224,4 +341,5 @@
 
     });
 </script>
+<script type></script>
 </html>
\ No newline at end of file

--
Gitblit v1.9.1