123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260 |
- <!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 content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0;" name="viewport" />
- <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"/>
- <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>
- html{
- width:100%;
- height:100%;
- margin:0px;
- overflow: hidden;
- }
- body{
- margin:0px;
- width:100%;
- height:100%;
- background-color: #e5e9ec;
- }
- .login_contant{
- top: 10%;
- right: 0;
- width:100%;
- position: absolute;
- }
- .login_main{
- z-index:-1;
- width:100%;
- }
- /*
- .login_logo{
- position: absolute;
- top: 12%;
- right: 45%;
- width: 40%;
- }
- .login_text{
- position: absolute;
- top: 27%;
- right: 19.5%;
- width: 18.5%;
- font-size: 1.2em;
- font-family: "微软雅黑";
- text-align:center;
- color: white;
- } */
- .login_form {
- position: absolute;
- top: 23%;
- right: 19.5%;
- width: 18.5%;
- height: 58%;
- }
- .login_img{
- z-index:-1;
- width: 100%;
- height: 100%
- }
- div.login_position{
- border: 0px;
- padding: 0px 0px 0px 3%;
- width: 97%;
- white-space: nowrap;
- word-break: keep-all;
- word-wrap: normal;
- line-height: 100%;
- position: relative;
- margin-bottom: 6.8%;
- cursor: text;
- }
- div.login_user{
- height: 48%;
- }
- div.login_pass{
- height: 18%;
- }
- input{
- position:absolute;
- bottom:1px;
- left: 17%;
- border-style: none;
- width: 82%;
- font-size: 24px;
- background-color: transparent;
- border: 0px;
- outline: none;
- /* z-index: 10; */
- }
- input#username{
- height: 33%;
- line-height:45px;
- }
- input#password{
- height: 90%;
- line-height:45px;
- }
- .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-left:3%;
- margin-top: 10%;
- font-size: 12px;
- }
- </style>
- </head>
- <body >
- <div class="login_contant">
- <img class="login_main" src="/nwyj/images/index/loginPage_bg.png"/>
- <!-- <img class="login_logo" src="/nwyj/images/index/login_logo.png"/>
- <div class="login_text"> 应急指挥管理系统</div> -->
- <div class="login_form">
- <div class="login_user login_position"><img class="login_img" src="/nwyj/images/index/login_user.png"/><input type="text" id="username" onkeyup="clearpassword()" watermark=" 用 户 名 " value=""></div>
- <div class="login_pass login_position"><img class="login_img" src="/nwyj/images/index/login_pass.png"/><input type="password" id="password" watermark=" 密 码 " value=""></div>
-
- <div class="login_button">
- <img src="/nwyj/images/index/login_login.png" class="login_button_login login_button_position" onclick="login()" ></img>
- </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();
- }
- })
-
- $(".login_position").live("click",function(){
- $(this).find("input").focus();
-
- });
-
- })
-
-
- /* function setCaretPosition(ctrl,pos){
- ctrl.focus();
- if(ctrl.setSelectionRange){
- ctrl.setSelectionRange(pos,pos);
- }else if(ctrl.createTextRange){
- var range = ctrl.createTextRange();
- range.collapse(true);
- range.moveEnd('character',pos);
- range.moveStart('character',pos);
- range.select();
- }
- } */
- //登录
- function login() {
- var errorMsg = "";
- var loginName =document.getElementById("username");
-
- var password = document.getElementById("password");
- var pasFormat=true;
- if(!loginName.value){
- //errorMsg += " 用户名不能为空!";
- 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/LoginPw",
- data: {"username":loginName.value,"password":md5password},
- success: function(data){
-
- if(!!data && data.LoginInfo.st == 0){
- $(".login_info").html("登录成功,正在转到主页...");
- //console.log(JSON.stringify(data));
- 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("用户名或密码错误,请重新登录!");
- //loginName.value="";
- //password.value="";
- //loginName.focus();
- }
-
- /* 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 if(!!data && data.LoginInfo.st == 3){
- $(".login_info").html(" 用户名或密码错误!");
- } */
- },
- error:function(data){
- $(".login_info").html("登陆失败!");
- }
- });
- }
- }
- </script>
- </body>
- </html>
|