123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=8">
- <title>南方电网应急指挥系统--登录</title>
- <link rel="Shortcut Icon" href="images/favicon.png"/><!--
- <link href="skin_flat/style.css" rel="stylesheet" type="text/css" id="skin"/> -->
- <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/jquery.js"></script>
- <script type="text/javascript" src="/nwyj/scripts/freamwork/com/sinosoft/system/md5/md5.js"></script>
- <style>
- body{
- margin:0;
- padding:0;
- width:100%;
- height:100%;
- background-color: #e5e9ec;
- }
- .login_main{
- background-image: url("/nwyj/images/index/loginPage_bg1.jpg");
- background-position: 0px;
- height: 545px;
- width:1366px;
- margin:0;
- padding:0;
- position: relative;
- background-repeat: no-repeat;
- }
- .login_form {
- position: absolute;
- top: 185px;
- left: 839px;
- width: 270px;
- }
- div.login_user,div.login_pass{
- margin-bottom: 20px;
- }
- div.login_user{
- margin-left: 10px;
- border: 0;
- background-image: url("/nwyj/images/index/login_user1.png");
- background-position: 0px;
- background-repeat: no-repeat;
- background-position: 0 50%;
- _background-position: 0 40%;
- padding: 0 5px 0 26px;
- white-space:nowrap;
- word-break: keep-all;
- word-wrap: normal;
- }
- div.login_pass{
- margin-left: 10px;
- border: 0;
- background-image: url("/nwyj/images/index/login_pass.png");
- background-position: 0px;
- background-repeat: no-repeat;
- background-position: 0 50%;
- _background-position: 0 40%;
- padding: 0 5px 0 26px;
- white-space:nowrap;
- word-break: keep-all;
- word-wrap: normal;
- }
- input#username,input#password{
- height:35px;
- border-style: none;
- width: 210px;
- margin-left: 15px;
- font-size: 18px;
- line-height: 35px;
- background-color: transparent;
- border: 0;
- outline: none;
- }
- .login_button{
- margin-top: 30px;
- }
- .login_button_login{
- cursor:pointer;
- border: 0;
- background-image: url("/nwyj/images/index/login_login.png");
- background-position: 0px;
- background-repeat: no-repeat;
- background-position: 3px 50%;
- _background-position: 0 40%;
- padding: 0px;
- white-space:nowrap;
- word-break: keep-all;
- word-wrap: normal;
- height: 30px;
- display: inline-block;
- margin-left: 30px;
- }
- .login_button{
- text-align: center;
- width:100%;
- padding: 5% 0px 0px 3%;
- width: 97%;
- }
- .login_button_position{
- margin: 0px auto;
- cursor:pointer;
- border: 0px;
- display: inline-block;
- width:100%;
- }
- .login_info{
- margin-top: 30px;
- font-size: 12px;
- }
- </style>
- </head>
- <body >
- <div class="login_main">
- <div class="login_form">
- <div class="login_user"><input type="text" id="username" onkeyup="clearpassword()" watermark=" 用 户 名 " value=""></div>
- <div class="login_pass"><input type="password" id="password" watermark=" 密 码 " value=""></div>
- <div class="login_button">
- <div class="login_button_login login_button_position" onclick="login()" ></div>
- </div>
- <div class="login_info" style="display:none;"></div>
- </div>
- </div>
- <script type="text/javascript" >
- //帐号输入框变动时,清空密码框(2015.10.13 梁俊鹏)
- function clearpassword(){
- var _username = $("#username").val();
- $("#password").val("");
- }
- $(function(){
- //防止iframe内出现登录页
- if (window != top)
- top.location.href = location.href;
- //居中
- document.getElementById("username").focus();
- $("#username").keydown(function(event){
- if(event.keyCode==13){
- login();
- }
- })
- $("#password").keydown(function(event){
- if(event.keyCode==13){
- login();
- }
- })
-
- })
- //登录
- function login() {
- var errorMsg = "";
- var loginName =document.getElementById("username");
-
- var password = document.getElementById("password");
- var pasFormat=true;
- if(!loginName.value){
- errorMsg += " 用户名不能为空!";
- }
- if(!password.value){
- errorMsg += " 密码不能为空!";
- }
- var patt= /(?!^(\d+|[a-zA-Z]+|[~!@#$%^&*?]+)$)^[\w~!@#$%\^&*?]{8,20}$/g;
- var pwd =$("#password").val();
- if(!patt.test(pwd)){
- pasFormat=false;
- }
- if(errorMsg != "" ){
- $(".login_info").html(errorMsg);
- $(".login_info").show();
- }
- else{
- $(".login_info").show();
- $(".login_info").html(" 正在登录中...");
- //前台做md5加密传输
- var md5password=md5(password.value);
- //登录处理
- $.ajax({
- type: "POST",
- url:"/nwyj/ws/sys/LoginService/Login",
- data: {"username":loginName.value,"password":md5password},
- success: function(data){
-
- if(!!data && data.LoginInfo.st == 0){
- $(".login_info").html(" 登录成功,正在转到主页...");
- window.name = JSON.stringify(data);
- //alert( window.name);
- window.location="/nwyj/page/frameWork.html";
- /* }else if(!!data && data.LoginInfo.st == 1){
- $(".login_info").html(" 密码错误次数达到5次,请"+data.LoginInfo.mod_date+"分钟后再登录!");
- } else if(!!data && data.LoginInfo.st == 2){
- $(".login_info").html(" 用户名或密码错误,请重新登录!");
- }
-
- else if(!!data && data.LoginInfo.st == 2){
- if(data.LoginInfo.mod_date==0){
- $(".login_info").html(" 密码错误次数达到5次,请30分钟后再登录!");
- }else{
- if(pasFormat){
- $(".login_info").html(" 密码错误!还剩下"+data.LoginInfo.mod_date+"次机会!");
- }else{
- $(".login_info").html(" 密码格式错误!还剩下"+data.LoginInfo.mod_date+"次机会!");
- }
- $(".login_info").html(" 用户名或密码错误!");
- }
-
- */
- }else {
- $(".login_info").html(" 用户名或密码错误!");
- }
- },
- error:function(data){
- $(".login_info").html(" 登陆失败!");
- }
- });
- }
- }
- </script>
- </body>
- </html>
|