| <!DOCTYPE html> | 
| <html> | 
| <head> | 
|     <meta charset="utf-8"> | 
|     <meta name="viewport" content="width=device-width, initial-scale=1.0"> | 
|   | 
|     <title>evmoto - Login</title> | 
|   | 
|     <link rel="shortcut icon" href="${ctxPath}/log.ico"> | 
|     <link href="${ctxPath}/css/bootstrap.min.css?v=3.3.6" rel="stylesheet"> | 
|     <link href="${ctxPath}/css/font-awesome.css?v=4.4.0" rel="stylesheet"> | 
|     <link href="${ctxPath}/css/style.css?v=4.1.0" rel="stylesheet"> | 
|     <script>if (window.top !== window.self) { | 
|         window.top.location = window.location; | 
|     }</script> | 
|     <script src="${ctxPath}/js/jquery.min.js?v=2.1.4"></script> | 
|     <script src="${ctxPath}/js/bootstrap.min.js?v=3.3.6"></script> | 
|     <style> | 
|         .item{ | 
|             display: flex; | 
|             align-items: center; | 
|             /*border: 1px solid red !important;*/ | 
|             margin: 24px 0; | 
|             position: relative; | 
|         } | 
|         .item>img{ | 
|             position: absolute; | 
|             left: 8px; | 
|             /*bottom: 50%;*/ | 
|         } | 
|         .itemInput{ | 
|             background:none; | 
|             outline:none; | 
|             border:0px; | 
|             border-bottom:1px solid grey ; | 
|             padding-left: 30px; | 
|             height: 34px; | 
|             width: 100%; | 
|         } | 
|         .itemInput[type="text"]{ | 
|   | 
|             background: #fff; | 
|             outline: none; | 
|         } | 
|   | 
|         .itemInput:-webkit-autofill { | 
|             -webkit-box-shadow: 0 0 0 1000px white inset; // 背景设为白色 | 
|             -webkit-text-fill-color: #fff; // 字体颜色 | 
|         } | 
|     </style> | 
| </head> | 
|   | 
| <body class="gray-bg" style="background:url(${ctxPath}/img/index1.png) no-repeat; background-size:cover;"> | 
|   | 
| <div style="display: flex;align-items: center;justify-content: center;height: 100%"> | 
|   | 
|   | 
| <img src="${ctxPath}/img/index4.png" style="width: 300px;height: 400px;z-index: 1000;border-radius: 10px"> | 
| <div  style="position: relative;left: -20px; max-width: 300px;min-height: 300px;background: white;border-radius: 8px;box-sizing: border-box;padding: 0 30px 0 50px;display: flex;align-items: center;justify-content: center;"> | 
|     <div style="max-height: 100%"> | 
|         <h3 style="color: black;"><img src="${ctxPath}/img/logo.png" width="30px" height="30px"/> evmoto Admin site</h3> | 
|         <br/> | 
|         <h4 style="color: red;">${tips!}</h4> | 
|         <form class="m-t" role="form" action="${ctxPath}/login" method="post"> | 
|             <div class="item"> | 
|                 <img src="${ctxPath}/img/account.png" /> | 
|                 <input class="itemInput" type="text" name="username" id="username"  placeholder="Please enter account" required="" value=""> | 
|             </div> | 
|             <div  class="item"> | 
|                 <img src="${ctxPath}/img/password.png" /> | 
|                 <input class="itemInput" type="password" name="password" id="password"  placeholder="Please enter password" required="" value=""> | 
|             </div> | 
|             <div  class="item"> | 
|                 <label>language</label>       | 
|                 <select name="language" id="language" class="itemInput"> | 
|                     <option value="1">中文</option> | 
|                     <option value="2">english</option> | 
|                     <option value="3">IndonesiaName</option> | 
|                 </select> | 
|             </div> | 
|             <button onclick="login()" class="btn full-width m-b" style="background-color: #0573EA;color: white;">Login</button> | 
|             <button type="submit" id="submit" style="display: none;"></button> | 
|             </p> | 
|         </form> | 
|     </div> | 
| </div></div> | 
| </body> | 
| <script src="${ctxPath}/js/jquery.min.js?v=2.1.4"></script> | 
| <script src="${ctxPath}/js/common/ajax-object.js"></script> | 
| <script src="${ctxPath}/js/common/Feng.js"></script> | 
| <script src="${ctxPath}/crypto-js/crypto-js.js"></script> | 
| <script> | 
|     $(function () { | 
|         $("#kaptcha").on('click', function () { | 
|             $("#kaptcha").attr('src', '${ctxPath}/kaptcha?' + Math.floor(Math.random() * 100)).fadeIn(); | 
|         }); | 
|     }); | 
|     var key = CryptoJS.enc.Utf8.parse("c53fd327353a09a1"); | 
|     var iv = CryptoJS.enc.Utf8.parse("3a0565e3b1d8ae3d"); | 
|   | 
|     //aes加密 | 
|     function encrypt(context) { | 
|         var encrypted = ''; | 
|         if (typeof(context) == 'string') { | 
|   | 
|         }else if(typeof(context) == 'object'){ | 
|             context = JSON.stringify(context); | 
|         } | 
|         var srcs = CryptoJS.enc.Utf8.parse(context); | 
|         encrypted = CryptoJS.AES.encrypt(srcs, key, { | 
|             iv: iv, | 
|             mode: CryptoJS.mode.CBC, | 
|             padding: CryptoJS.pad.Pkcs7 | 
|         }); | 
|         return encrypted.toString(); | 
|     } | 
|     // aes解密 | 
|     function decrypt(context) { | 
|         var decrypt = CryptoJS.AES.decrypt(context, key, { | 
|             iv: iv, | 
|             mode: CryptoJS.mode.CBC, | 
|             padding: CryptoJS.pad.Pkcs7 | 
|         }); | 
|         var decryptedStr = decrypt.toString(CryptoJS.enc.Utf8); | 
|         return decryptedStr.toString(); | 
|     } | 
|     function login(){ | 
|         let password = $('#password').val(); | 
|         password = encrypt(password); | 
|         $('#password').val(password); | 
|         $('#submit').submit(); | 
|     } | 
|   | 
|   | 
|     window.addEventListener( | 
|         "mousewheel", | 
|         function(event) { | 
|             if (event.ctrlKey === true || event.metaKey) { | 
|                 event.preventDefault(); | 
|             } | 
|         }, | 
|         { passive: false } | 
|     ); | 
|   | 
|     //firefox | 
|     window.addEventListener( | 
|         "DOMMouseScroll", | 
|         function(event) { | 
|             if (event.ctrlKey === true || event.metaKey) { | 
|                 event.preventDefault(); | 
|             } | 
|         }, | 
|         { passive: false } | 
|     ); | 
|   | 
|   | 
|     function fontSize(designWidth, maxWidth, minWidth) { | 
|         var doc = document, | 
|             win = window, | 
|             docEl = doc.documentElement, | 
|             remStyle = document.createElement("style"), | 
|             tid; | 
|   | 
|         function refreshRem() { | 
|             var width = docEl.getBoundingClientRect().width; | 
|             maxWidth = maxWidth || 540; | 
|             width > maxWidth && (width = maxWidth); | 
|             var rem = (width * 100) / designWidth; | 
|             remStyle.innerHTML = "html{font-size:" + rem + "px;}"; | 
|         } | 
|   | 
|         if (docEl.firstElementChild) { | 
|             docEl.firstElementChild.appendChild(remStyle); | 
|         } else { | 
|             var wrap = doc.createElement("div"); | 
|             wrap.appendChild(remStyle); | 
|             doc.write(wrap.innerHTML); | 
|             wrap = null; | 
|         } | 
|         // 要等 wiewport 设置好后才能执行 refreshRem,不然 refreshRem 会执行2次; | 
|         refreshRem(); | 
|   | 
|         win.addEventListener( | 
|             "resize", | 
|             function(res) { | 
|                 // console.log(res); | 
|                 if (minWidth < res.currentTarget.innerWidth) { | 
|                     clearTimeout(tid); //防止执行两次 | 
|                     return; | 
|                 } | 
|   | 
|                 tid = setTimeout(refreshRem, 10); | 
|             }, | 
|             false | 
|         ); | 
|   | 
|         win.addEventListener( | 
|             "pageshow", | 
|             function(e) { | 
|                 if (e.persisted) { | 
|                     // 浏览器后退的时候重新计算 | 
|                     clearTimeout(tid); | 
|                     tid = setTimeout(refreshRem, 300); | 
|                 } | 
|             }, | 
|             false | 
|         ); | 
|   | 
|         if (doc.readyState === "complete") { | 
|             doc.body.style.fontSize = "16px"; | 
|         } else { | 
|             doc.addEventListener( | 
|                 "DOMContentLoaded", | 
|                 function(e) { | 
|                     doc.body.style.fontSize = "16px"; | 
|                 }, | 
|                 false | 
|             ); | 
|         } | 
|     } | 
|     fontSize(768, 1920); | 
| </script> | 
| </body> | 
|   | 
| </html> |