| | |
| | | width: 20%; |
| | | height: 95%; |
| | | /*特效*/ |
| | | background: rgba(255,255,255,0.6); |
| | | background: rgba(255, 255, 255, 0.5); |
| | | border-radius: 5px; |
| | | color: #ffffff; |
| | | z-index: 99; |
| | |
| | | <h2 class="p-sketch-outline__title">Customer Relationship Management</h2> |
| | | <p class="p-sketch-outline__date">posted: 2018.01.01 / update: 2022.03.18 |
| | | </p> |
| | | <p class="p-sketch-outline__description">wcs made with various simple objects.</p> |
| | | <p class="p-sketch-outline__description">crm made with various simple objects.</p> |
| | | </div> |
| | | <canvas class="p-canvas-webgl" id="canvas-webgl"></canvas> |
| | | |
| | |
| | | <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){ |
| | | $('#username').val(oldUserName); |
| | | } |
| | | if(oldPass){ |
| | | $('#password').val(oldPass); |
| | | } |
| | | }) |
| | | |
| | | window.onload = function(){document.getElementById("username").focus();} |
| | | |
| | | $(document).on('click','.login-btn', function () { |
| | | let username = $("#username").val(); |
| | | if (username === "") { |
| | | layer.tips('请输入登录账号', '#username', {tips: [4, '#ff0000']}); |
| | | return; |
| | | } |
| | | let password = $("#password").val(); |
| | | if (password === "") { |
| | | layer.tips('请输入密码', '#password', {tips: [4, '#ff0000']}); |
| | | return; |
| | | } |
| | | $.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.nickname); |
| | | 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 { |
| | | layer.tips(res.msg, '.login-btn', {tips: [3, '#ff0000']}); |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | $('body').keydown(function () { |
| | | if (event.keyCode === 13) { |
| | | $(".login-btn").click(); |
| | | } |
| | | }); |
| | | </script> |
| | | </body> |
| | | </html> |