From 6f7a815b2d6e4f30e7ccf901b24d5103aaa72078 Mon Sep 17 00:00:00 2001 From: zyx <zyx123456> Date: 星期一, 25 十二月 2023 10:23:08 +0800 Subject: [PATCH] Merge branch 'tzskasrs-1' of http://47.97.1.152:5880/r/zy-asrs into tzskasrs-1 --- src/main/webapp/views/login.html | 356 +++++++++++++++++++++++++++++------------------------------ 1 files changed, 174 insertions(+), 182 deletions(-) diff --git a/src/main/webapp/views/login.html b/src/main/webapp/views/login.html index 040a2b3..295f9c6 100644 --- a/src/main/webapp/views/login.html +++ b/src/main/webapp/views/login.html @@ -1,204 +1,196 @@ <!DOCTYPE html> -<html lang="zh-CN"> - -<head> +<html lang="en"> + <head> <meta charset="utf-8"> - <title>鑷姩浠撳偍 - 绠$悊绯荤粺</title> - <link rel="icon" type="image/x-icon" href="../static/image/log.png" /> - <link rel="stylesheet" href="../static/layui/css/layui.css" media="all"> - <link rel="stylesheet" href="../static/css/login0.css"> -</head> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <title>娴欐睙涓壃 鈹� login of zoneyung wms</title> + <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1"> + <meta name="description" content="study of Instancing with three.js"> + <meta name="keywords" content="undefined, Yoichi Kobayashi, WebGL, three.js"> + <meta name="theme-color" content="#111111"> + <meta name="msapplication-TileImage" content="/sketch-threejs/img/common/ms_tileimage.png"> + <meta name="msapplication-TileColor" content="#111111"> + <link rel="stylesheet" href="../static/css/font/font-awesome-4.7.0/css/font-awesome.css"> + <link rel="stylesheet" href="../static/css/main.min.css"> + <link rel="stylesheet" href="../static/css/login.css"> + <style> + #sidebar{ + /*瀹氫綅*/ + position: absolute; + top: 50%; + right: 1%; + transform: translateY(-50%); + width: 20%; + height: 95%; + /*鐗规晥*/ + background: rgba(255,255,255,0.6); + border-radius: 5px; + color: #ffffff; + z-index: 99; + box-shadow: 3px 3px 6px 3px rgba(0, 0, 0, .3); + } -<body> -<div class="dowebok"> - <div class="container"> - <div class="left"> - <div class="login">鐧诲綍</div> - <div class="eula">娆㈣繋鍏変复锛岃杈撳叆鎮ㄧ殑鐢靛瓙閭鍜屽瘑鐮佷互鐧诲綍锛�</div> - </div> - <div class="right"> - <svg viewBox="0 0 320 300"> - <defs> - <linearGradient inkscape:collect="always" id="linearGradient" x1="13" y1="193.49992" x2="307" - y2="193.49992" gradientUnits="userSpaceOnUse"> - <stop style="stop-color:#ff00ff;" offset="0" id="stop876" /> - <stop style="stop-color:#ff0000;" offset="1" id="stop878" /> - </linearGradient> - </defs> - <path d="m 40,120.00016 239.99984,-3.2e-4 c 0,0 24.99263,0.79932 25.00016,35.00016 0.008,34.20084 -25.00016,35 -25.00016,35 h -239.99984 c 0,-0.0205 -25,4.01348 -25,38.5 0,34.48652 25,38.5 25,38.5 h 215 c 0,0 20,-0.99604 20,-25 0,-24.00396 -20,-25 -20,-25 h -190 c 0,0 -20,1.71033 -20,25 0,24.00396 20,25 20,25 h 168.57143" /> - </svg> - <div class="form"> -<!-- <input type="password" style="position: absolute; z-index: -1">--> - <label for="username">鐢靛瓙閭欢</label> - <input type="text" id="username"> - <label for="password">瀵嗙爜</label> - <input type="password" id="password"> - <input type="submit" id="submit" onclick="login()" value="鐧婚檰"> - </div> - </div> + .login-contain { + position: relative; + width: 100%; + height: 100%; + } + .login-box { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + width: 100%; + text-align: center; + } + + </style> + </head> + <body> + <div class="l-page l-page--white" data-id="instancing"> + <div style="position: fixed; + z-index: 100; + top: 22px; + left: 20px;"> + <img src="../static/image/logo.png" alt="" style="width: 20%"> + </div> + <div class="p-sketch-outline"> + <h2 class="p-sketch-outline__title">Automatic Storage and Retrieval System</h2> + <p class="p-sketch-outline__date">posted: 2018.01.01 / update: 2022.03.18 + </p> + <p class="p-sketch-outline__description">wms made with various simple objects.</p> + </div> + <canvas class="p-canvas-webgl" id="canvas-webgl"></canvas> </div> -</div> -<script type="text/javascript" src="../static/js/jquery/jquery-3.3.1.min.js"></script> -<script type="text/javascript" src="../static/js/tools/anime.min.js"></script> -<script type="text/javascript" src="../static/js/tools/md5.js"></script> -<script type="text/javascript" src="../static/layui/layui.js"></script> -<script type="text/javascript" src="../static/js/common.js"></script> -<script type="text/javascript"> + <!-- 渚ц竟鏍� --> + <div id="sidebar"> + <div class="login-contain"> + <div class="login-box"> + <img src="../static/image/logo.png" alt="" style="width: 80%"> +<!-- <span class="login100-form-title p-t-20 p-b-45">涓壃绔嬪簱</span>--> +<!-- <span class="login100-form-title p-t-20 p-b-45" style="margin: 15px 0;color: #868686;font-size: 24px">WMS</span>--> + <div class="wrap-input100 validate-input m-b-10" data-validate="璇疯緭鍏ョ敤鎴峰悕"> + <input id="username" class="input100" type="text" name="username" placeholder="username" autocomplete="off"> + <span class="focus-input100"></span> + <span class="symbol-input100"> + <i class="fa fa-user"></i> + </span> + </div> + <div class="wrap-input100 validate-input m-b-10" data-validate="璇疯緭鍏ュ瘑鐮�"> + <input id="password" class="input100" type="password" name="pass" placeholder="password"> + <span class="focus-input100"></span> + <span class="symbol-input100"> + <i class="fa fa-lock"></i> + </span> + </div> + <div class="container-login100-form-btn p-t-10"> + <button class="login100-form-btn login-btn">Login</button> + </div> + <div class="container-login100-form-btn p-t-10" style="display: none;margin-top: 50px;" id="updateLicense"> + <form enctype="multipart/form-data" style="display: none;"> + <input id="license" type="file" name="file" > + </form> + <button class="login100-form-btn" id="submitLicense">鏇存柊璁稿彲璇�</button> + </div> + </div> + </div> + </div> - $(function () { + <script type="text/javascript" src="../static/js/tools/main.min.js"></script> + <script type="text/javascript" src="../static/js/jquery/jquery-3.3.1.min.js"></script> + <script type="text/javascript" src="../static/js/tools/md5.js"></script> + <script type="text/javascript" src="../static/layer/layer.js"></script> + <script type="text/javascript" src="../static/js/common.js"></script> + <script> + // remember pwd + $(function () { var oldUserName = localStorage.getItem('oldUserName'); var oldPass = localStorage.getItem('oldPass'); if(oldUserName){ - $('#mobile').val(oldUserName); + $('#username').val(oldUserName); } if(oldPass){ - $('#password').val(oldPass); + $('#password').val(oldPass); } - }) + }) - // 楠岃瘉鐮佸紑鍏� - 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"); - } - } - }); + window.onload = function(){document.getElementById("username").focus();} - // 鍒濆鍖栭獙璇佺爜 - 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); - } - - function login() { - var username = $("#username").val(); + $(document).on('click','.login-btn', function () { + let username = $("#username").val(); if (username === "") { - layer.msg("璇疯緭鍏ヨ处鍙�", {offset: '150px'}); - return; + layer.tips('璇疯緭鍏ョ櫥褰曡处鍙�', '#username', {tips: [4, '#ff0000']}); + return; } - var password = $("#password").val(); + let password = $("#password").val(); if (password === "") { - layer.msg("璇疯緭鍏ュ瘑鐮�", {offset: '150px'}); - return; + layer.tips('璇疯緭鍏ュ瘑鐮�', '#password', {tips: [4, '#ff0000']}); + return; } - var user = { + $.ajax({ + url: baseUrl+"/login.action", + data: { username: username, password: hex_md5(password) - }; + }, + method: 'POST', + success: function (res) { + if (res.code === 200){ + localStorage.setItem("token", res.data.token); + localStorage.setItem("username", res.data.username); + window.location.href = "index.html"; + } else if (res.code === 10001) { + layer.tips(res.msg, '#username', {tips: [4, '#ff0000']}); + } else if (res.code === 10002) { + layer.tips(res.msg, '#username', {tips: [4, '#ff0000']}); + } else if (res.code === 10003) { + layer.tips(res.msg, '#password', {tips: [4, '#ff0000']}); + } else if (res.code == 20001) { + layer.tips(res.msg, '.login-btn', {tips: [3, '#ff0000']}); + $("#updateLicense").show() + } else { + layer.tips(res.msg, '.login-btn', {tips: [3, '#ff0000']}); + } + } + }); + }); + + $('body').keydown(function () { + if (event.keyCode === 13) { + $(".login-btn").click(); + } + }); + + //鏇存柊璁稿彲璇� + $("#submitLicense").on("click",() => { + $("#license").click() + }) + + //涓婁紶骞舵洿鏂拌鍙瘉 + $("#license").on("change",(evt) => { + var files = evt.target.files; + let formData = new FormData(); + formData.append("file", files[0]) $.ajax({ - url: baseUrl+"/login.action", - data: user, - method: 'POST', - success: function (res) { - if (res.code === 200){ - // 璁颁綇瀵嗙爜 - if($('#rememberPwd').is(':checked')){ - localStorage.setItem('oldUserName',user.username); - localStorage.setItem('oldPass',password); - } else { - localStorage.removeItem('oldUserName'); - localStorage.removeItem('oldPass'); - } - localStorage.setItem("token", res.data.token); - localStorage.setItem("username", res.data.nickname); - window.location.href = "index.html"; - } else { - layer.msg(res.msg, {offset: '150px'}); - } + url: baseUrl+"/license/updateLicense", + data: formData, + method: 'POST', + cache: false, + processData: false, + contentType: false, + success: function (res) { + if (res.code == 200) { + layer.msg('鏇存柊鎴愬姛', {time: 1000}, () => { + parent.location.reload() + }); + }else{ + layer.msg(res.msg,{time:2000},() => { + parent.location.reload() + }) } - }); - } - - layui.use(['form','layer'],function () { - var form = layui.form, - layer = layui.layer, - $ = layui.jquery; - - form.on('submit(login)', function (data) { - - return false; - }); - - $('body').keydown(function () { - if (event.keyCode === 13) { - $("#login-button").click(); - } - }); - - }); -</script> -<script> - var current = null; - document.querySelector('#username').addEventListener('focus', function(e) { - if (current) current.pause(); - current = anime({ - targets: 'path', - strokeDashoffset: { - value: 0, - duration: 700, - easing: 'easeOutQuart' - }, - strokeDasharray: { - value: '240 1386', - duration: 700, - easing: 'easeOutQuart' - } - }); - }); - document.querySelector('#password').addEventListener('focus', function(e) { - if (current) current.pause(); - current = anime({ - targets: 'path', - strokeDashoffset: { - value: -336, - duration: 700, - easing: 'easeOutQuart' - }, - strokeDasharray: { - value: '240 1386', - duration: 700, - easing: 'easeOutQuart' - } - }); - }); - document.querySelector('#submit').addEventListener('focus', function(e) { - if (current) current.pause(); - current = anime({ - targets: 'path', - strokeDashoffset: { - value: -730, - duration: 700, - easing: 'easeOutQuart' - }, - strokeDasharray: { - value: '530 1386', - duration: 700, - easing: 'easeOutQuart' - } - }); - }); - -</script> -</body> - + } + }) + }) + </script> + </body> </html> -- Gitblit v1.9.1