From 4ad1f324ab1fd2b51504afc00b43b4ee40f029c2 Mon Sep 17 00:00:00 2001 From: lsh <lsh@163.com> Date: 星期四, 20 二月 2025 09:40:03 +0800 Subject: [PATCH] # --- src/main/webapp/views/pda/login.html | 40 +++++++++++++++++++++++++++++----------- 1 files changed, 29 insertions(+), 11 deletions(-) diff --git a/src/main/webapp/views/pda/login.html b/src/main/webapp/views/pda/login.html index 9bf1c23..a03b30f 100644 --- a/src/main/webapp/views/pda/login.html +++ b/src/main/webapp/views/pda/login.html @@ -12,11 +12,23 @@ height: 100%; overflow: hidden; } + 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: -webkit-linear-gradient(red, blue); !* Safari 5.1 - 6.0 *!;*/ + /*background-image: url("../static/image/login_bg.jpg");*/ + /*background-repeat: no-repeat;*/ + /*background-size: cover;*/ + /*background-position: top center;*/ + } + #login-wrapper { box-sizing:border-box; background: #fff; height: 100%; - padding: 60px 40px; + padding: 100px 60px; text-align: center; overflow: hidden; } @@ -33,9 +45,9 @@ position: relative; } .layui-form-item .layui-input { - height: 30px; + height: 40px; padding-left: 20px; - font-size: 14px; + font-size: 16px; border: 1px solid #767676; color: inherit; border-radius: 3px; @@ -58,7 +70,7 @@ } </style> </head> -<body> +<body class="login-bg"> <div id="login-wrapper"> <header> @@ -66,7 +78,7 @@ </header> <div class="layui-form layadmin-user-login-body"> <div class="layui-form-item"> - <input id="mobile" class="layui-input" type="text" name="mobile" lay-verify="mobile" placeholder="璐﹀彿" autocomplete="off"> + <input id="username" class="layui-input" type="text" name="username" lay-verify="username" placeholder="璐﹀彿" autocomplete="off"> </div> <div class="layui-form-item"> <input id="password" class="layui-input" type="password" name="password" lay-verify="password" placeholder="瀵嗙爜" autocomplete="off"> @@ -91,32 +103,36 @@ $ = layui.jquery; form.on('submit(login)', function (data) { - var mobile = $("#mobile").val(); - if (mobile === "") { - alert("璇疯緭鍏ユ墜鏈哄彿"); + var username = $("#username").val(); + if (username === "") { + layer.msg("璇疯緭鍏ヨ处鍙�", {icon: 2}) + $("#username").focus(); return; } var password = $("#password").val(); if (password === "") { - alert("璇疯緭鍏ュ瘑鐮�"); + layer.msg("璇疯緭鍏ュ瘑鐮�", {icon: 2}) + $("#password").focus(); return; } var user = { - mobile: mobile, + username: username, password: hex_md5(password) }; + debugger $.ajax({ url: baseUrl+"/login.action", data: user, method: 'POST', success: function (res) { if (res.code === 200){ + layer.msg("鐧诲綍鎴愬姛", {icon: 1}) localStorage.setItem("token", res.data.token); localStorage.setItem("username", res.data.username); window.location.href = "index.html"; } else { - alert(res.msg); + layer.msg(res.msg, {icon: 2}) } } }); @@ -126,6 +142,8 @@ $('body').keydown(function () { if (event.keyCode === 13) { $("#login-button").click(); + } else if (event.keyCode === 115) { + $("#login-button").click(); } }); -- Gitblit v1.9.1