123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
- <title>单仓管理系统</title>
- <script type="text/javascript" src="/js/jquery.js"></script>
- <script type="text/javascript" src="/js/cloud.js"></script>
- <script type="text/javascript" src="/src/lib/jquery.cookie.js"></script>
- <script type="text/javascript" src="/src/sub/firstVerify.js"></script>
- <script type="text/javascript" src="/src/base.js"></script>
- <script type="text/javascript" src="/src/config.js"></script>
- <!--<script type="text/javascript">
- firstVerifyData.init();
- </script>-->
- <script language="javascript">
- var ip = '';
- var url =
- {
- check: ip + '/sys/checkstate',
- login: ip + '/sys/login',
- mainPage: '/index2.html'
- };
- // $.ajaxSetup({
- // xhrFields: {withCredentials: true }
- // });
- // $.getJSON(url.check,function(data)
- // {
- // if(data.code == 0)
- // {
- // //go to main page
- // location.href=url.mainPage;
- // }
- // });
- $(function () {
- if ($.cookie("rmbUser") == "true") {
- $("#ck_rmbUser").attr("checked", true);
- $("#txt_username").val($.cookie("username"));
- $("#txt_password").val($.cookie("password"));
- }
- $.ajaxSetup({xhrFields: {withCredentials: true}});
- $('.loginbox').css({'position': 'absolute', 'left': ($(window).width() - 692) / 2});
- $(window).resize(function () {
- $('.loginbox').css({'position': 'absolute', 'left': ($(window).width() - 692) / 2});
- });
- $(document).on('keydown', function (e) {
- if (event.keyCode == 13) {
- $('.loginbtn').trigger('click');
- }
- })
- $(document).on('click', '.loginbtn', function (e) {
- e.preventDefault();
- if ($("#ck_rmbUser").attr("checked")) {
- var str_username = $("#txt_username").val();
- var str_password = $("#txt_password").val();
- $.cookie("rmbUser", "true", {expires: 7}); //存储一个带7天期限的cookie
- $.cookie("username", str_username, {expires: 7});
- $.cookie("password", str_password, {expires: 7});
- } else {
- $.cookie("rmbUser", "false", {expire: -1});
- $.cookie("username", "", {expires: -1});
- $.cookie("password", "", {expires: -1});
- }
- var username = $('.loginuser').val();
- var password = $('.loginpwd').val();
- if (username && password) {
- var data = {
- name: username,
- password: password
- };
- $.post(url.login, data, function (data) {
- if (data.code == 0) {
- // console.log(data.defaultHome);
- // function getCookie(c_name) {
- // if (document.cookie.length > 0) {
- // c_start = document.cookie.indexOf(c_name + "=")
- // if (c_start != -1) {
- // c_start = c_start + c_name.length + 1
- // c_end = document.cookie.indexOf(";", c_start)
- // if (c_end == -1) c_end = document.cookie.length
- // return unescape(document.cookie.substring(c_start, c_end))
- // } else {
- // return false;
- // }
- // }
- // return false;
- // }
- function setCookie(name, value) {
- var Days = 30;
- var exp = new Date();
- exp.setTime(exp.getTime() + Days * 24 * 60 * 60 * 1000);
- document.cookie = name + "=" + escape(value) + ";expires=" + exp.toGMTString() + ";path=/";
- }
- setCookie('status', 'yes');
- location.href = data.defaultHome;
- } else {
- alert(data.msg);
- }
- }, 'json');
- } else {
- alert('请填写用户名和密码');
- }
- });
- });
- </script>
- <style>
- * {
- font-size: 9pt;
- border: 0;
- margin: 0;
- padding: 0;
- }
- body {
- font-family: '微软雅黑';
- margin: 0 auto;
- min-width: 980px;
- background-color: #1c77ac;
- background-image: url(/img/light.png);
- background-repeat: no-repeat;
- background-position: center top;
- overflow: hidden;
- }
- ul {
- display: block;
- margin: 0;
- padding: 0;
- list-style: none;
- }
- li {
- display: block;
- margin: 0;
- padding: 0;
- list-style: none;
- }
- img {
- border: 0;
- }
- dl, dt, dd, span {
- margin: 0;
- padding: 0;
- display: block;
- }
- a, a:focus {
- text-decoration: none;
- color: #000;
- outline: none;
- blr: expression(this.onFocus=this.blur());
- }
- a:hover {
- color: #00a4ac;
- text-decoration: none;
- }
- table {
- border-collapse: collapse;
- border-spacing: 0;
- }
- cite {
- font-style: normal;
- }
- h2 {
- font-weight: normal;
- }
- /*cloud*/
- #mainBody {
- width: 100%;
- height: 100%;
- position: absolute;
- z-index: -1;
- }
- .cloud {
- position: absolute;
- top: 0px;
- left: 0px;
- width: 100%;
- height: 100%;
- background: url(/img/cloud.png) no-repeat;
- z-index: 1;
- opacity: 0.5;
- }
- #cloud2 {
- z-index: 2;
- }
- /*login*/
- .logintop {
- height: 47px;
- position: absolute;
- top: 0;
- background: url(/img/loginbg1.png) repeat-x;
- z-index: 100;
- width: 100%;
- }
- .logintop span {
- color: #fff;
- line-height: 47px;
- background: url(/img/loginsj.png) no-repeat 21px 18px;
- text-indent: 44px;
- color: #afc5d2;
- float: left;
- }
- .logintop ul {
- float: right;
- padding-right: 30px;
- }
- .logintop ul li {
- float: left;
- margin-left: 20px;
- line-height: 47px;
- }
- .logintop ul li a {
- color: #afc5d2;
- }
- .logintop ul li a:hover {
- color: #fff;
- }
- .loginbody {
- background: url(/img/loginbg3.png) no-repeat center center;
- width: 100%;
- height: 585px;
- overflow: hidden;
- position: absolute;
- top: 47px;
- }
- .systemlogo {
- background: url(/img/loginlogo.png) no-repeat center;
- width: 100%;
- height: 86px;
- margin-top: 60px;
- }
- .loginbox {
- width: 692px;
- margin-left: -6%;
- height: 336px;
- background: url(/img/logininfo.png) no-repeat;
- margin-top: 30px;
- }
- .loginbox ul {
- margin-top: 88px;
- margin-left: 451px;
- }
- .loginbox ul li {
- margin-bottom: 25px;
- }
- .loginbox ul li label {
- color: #687f92;
- padding-left: 25px;
- }
- .loginbox ul li label a {
- color: #687f92;
- }
- .loginbox ul li label a:hover {
- color: #3d96c9;
- }
- .loginbox ul li label input {
- margin-right: 5px;
- }
- .loginuser {
- width: 299px;
- height: 48px;
- background: url(/img/loginuser.png) no-repeat;
- border: none;
- line-height: 48px;
- padding-left: 44px;
- font-size: 14px;
- font-weight: bold;
- }
- .loginpwd {
- width: 299px;
- height: 48px;
- background: url(/img/loginpassword.png) no-repeat;
- border: none;
- line-height: 48px;
- padding-left: 44px;
- font-size: 14px;
- color: #90a2bc;
- }
- .loginbtn {
- width: 111px;
- height: 35px;
- background: url(/img/buttonbg.png) repeat-x;
- font-size: 14px;
- font-weight: bold;
- color: #fff;
- cursor: pointer;
- line-height: 35px;
- }
- .loginbm {
- height: 50px;
- line-height: 50px;
- text-align: center;
- background: url(/img/loginbg2.png) repeat-x;
- position: absolute;
- bottom: 0;
- width: 100%;
- color: #0b3a58;
- }
- .loginbm a {
- font-weight: bold;
- color: #0b3a58;
- }
- .loginbm a:hover {
- color: #fff;
- }
- </style>
- </head>
- <body>
- <div id="mainBody">
- <div id="cloud1" class="cloud"></div>
- <div id="cloud2" class="cloud"></div>
- </div>
- <div class="logintop">
- <span>欢迎登录后台管理界面平台</span>
- <ul>
- <li><a href="#">回首页</a></li>
- <li><a href="#">帮助</a></li>
- <li><a href="#">关于</a></li>
- </ul>
- </div>
- <div class="loginbody">
- <span class="systemlogo"></span>
- <div class="loginbox" style="width:1000px;left:20%;">
- <ul>
- <form action="/admin/sys/login" method="post">
- <li><input name="loginName" id="txt_username" type="text" class="loginuser" value=""/></li>
- <li><input name="loginPwd" id="txt_password" type="password" class="loginpwd"/></li>
- <li><input name="sub" type="button" class="loginbtn" value="登录"/>
- <label><input id="ck_rmbUser" type="checkbox" value="" checked="checked"/>记住密码</label>
- </li>
- </form>
- </ul>
- </div>
- </div>
- <div class="loginbm">版权所有 <span id="footbottom" style="display:inline-block"></span> <a
- href="javascript:void(0)">单仓管理系统</a></div>
- </body>
- <script>
- $.ajax({
- type: "get",
- dataType: 'json',
- contentType: 'application/json;charset=utf-8',
- url: config.baseUrl + '/sys/sync/serverTime',
- success: function (e) {
- $('#footbottom').text(e.data)
- },
- error: function (e) {
- console.log(e);
- }
- });
- </script>
- </html>
|