From 13ec05cf0187ff67dc7cb8f03eae8c4b478f762a Mon Sep 17 00:00:00 2001 From: fs-danaus <danaus314@qq.com> Date: 星期三, 18 九月 2024 09:43:58 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev --- WebRoot/js/loginValidate.js | 136 +++++++++++++++++++++++---------------------- 1 files changed, 70 insertions(+), 66 deletions(-) diff --git a/WebRoot/js/loginValidate.js b/WebRoot/js/loginValidate.js index e52bf0f..49b0fa2 100644 --- a/WebRoot/js/loginValidate.js +++ b/WebRoot/js/loginValidate.js @@ -8,30 +8,30 @@ pubkey:"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAkRupiYcKVGGUtDBDoR1t/1zm3ZtZgnte39iTJW6hlqjdY0UagKjpNiIv7J6XjtgfX7SgsR4AWnivqQHAICIvdPKfGZZzIs62OQ19MqrDTMoB/LvK5teNWhClv23WMUfRbP+EHgprT6hTw8U5apw1IB6i/y57NkLav792wiYBYRU4X45NoTaT+aiTSLFEflbfm94EXnhSS3vFkBmrZGy5BRNI8gmzafroslGx2Hk90CqlNdeKYxgZQ6xtvj+u33yrszWvPT6F9fsJT8aMjtvH050iYKRVct+x6Q7VRJgCI4MgvAexnTKdxW54YzvXCuO5bDiy5la7CgerWkTAq9dzXwIDAQAB" }; let telCoeKey; -(function($) { - $.Read=function(){ +(function($) { + $.Read=function(){ var _this=this; var select; var browserName = myexplorer(); $(".get_phoneCode").addClass('is-disabled'); $('.get_phoneCode').attr('disabled', true); if (browserName && browserName != "" && browserName != "璋锋瓕") { - $(".tips").show(); + $(".tips").show(); alert("鎮ㄦ鍦ㄤ娇鐢� " + browserName +" 娴忚鍣紝寮虹儓鎺ㄨ崘鎮ㄤ娇鐢ㄣ�愯胺姝屻�戞祻瑙堝櫒鐧诲綍绯荤粺!"); }else { - $(".tips").hide(); + $(".tips").hide(); } - + if(window.parent.length>0){ window.parent.location=hostUrl+'/login.jsp'; } - + if($("#snDiv").is(":visible")){ - $("#cltsn").focus(); + $("#cltsn").focus(); } else{ - $("#name").focus(); + $("#name").focus(); } - + //绯荤粺涓嬫媺閫夋嫨 this.setDate=function(event){ if(event.selectedIndex!=-1){ @@ -48,14 +48,14 @@ }); //璁剧疆鏈塋OGO鍔犺浇 $('.login_logo img').attr('src','/getLogoIcon.do?dbid='+event.value); - } - select=event; + } + select=event; } - - this.reloadCode=function(i,event) { + + this.reloadCode=function(i,event) { if(null!=event){ - event.src="/imageCode?rand="+i; - } + event.src="/imageCode?rand="+i; + } } this.reloadTelCode=function (){ $.get('/ws/captcha/get.do',function(r){ @@ -77,7 +77,7 @@ return; } } - + this.disableButton=function(){ $("#sub").attr("disabled",true); $("#sub").css("background-color","#bec4c8"); @@ -93,7 +93,7 @@ $("#cltsn").addClass("errorinput"); } flg=true; - } + } if($("#name").val()=="" && isAccount){ $(".name").find("span").html("璇疯緭鍏ヨ处鍙� / 鎵嬫満鍙�"); $("#name").addClass("errorinput"); @@ -120,13 +120,13 @@ $("#phoneCode").addClass("errorinput"); flg=true; } - + if(flg){ removeDisableButton(); return false; } - if(!flg && ""==select.value && isonescore==""){ + if(!flg && ""==select.value && isonescore==""){ $(".login_select").find("span").html("璇烽�夋嫨涓�涓郴缁�"); if(!$(".select").hasClass('l_select')){ $(".select").addClass('l_select'); @@ -149,16 +149,16 @@ }else if($("#telephone").val()!="" && $("#phoneCode").val()!=""){ //鐭俊鐧诲綍 loginRequest("","",select.value); - } + } }); - + $("#name").keydown(function(e){ var e=e||window.event; if(e.keyCode==13){//鍥炶溅閿� $("#pwd").focus(); - } + } }); - + $("#pwd").keydown(function(e){ var e=e||window.event; if(e.keyCode==13){//鍥炶溅閿� @@ -167,34 +167,34 @@ return; } $("#sub").click(); - } + } }); - + $("#code").keydown(function(e){ var e=e||window.event; if(e.keyCode==13){//鍥炶溅閿� $("#sub").click(); - } + } }); - + $("#reset").click(function(){ $("#name").val(""); $("#pwd").val(""); $("#code").val(""); $("#name").focus(); - - }); + + }); // $("#ppwd").keyup(function() { - // $("#pwd").val(hex_md5($("#ppwd").attr("value"))); - + // $("#pwd").val(hex_md5($("#ppwd").attr("value"))); + // }); - + // $(".sub_button").click(function(){ // _this.initValue(); // }); $("#randomming").click(function(){ - _this.reloadCode(Math.random(),this); + _this.reloadCode(Math.random(),this); }); $("#telimage").click(function(){ // 鑾峰彇楠岃瘉鐮� @@ -231,18 +231,18 @@ }); $(".pop-sns-qq-m").on("touchend",function () { $(".icon-qq-m").removeClass("qq-hover"); - }); - + }); + $("#dataName").change(function(){ _this.setDate(this); }); - + $("#dataName").click(function(){ _this.setDate(this); }); $("#dataName").triggerHandler('click'); $("#randomming").triggerHandler('click'); - + $(".pop-sns-weixin").click(function () { if(select.selectedIndex==-1){ alert("蹇呴』閫夋嫨涓�涓处濂�"); @@ -262,11 +262,11 @@ } }); }catch(e){ - - } + + } //location = oauth2HostName+"/oauth2/weixin.do?"+SessionKey+"="+select.value+"&orghost="+hostUrl; }); - + $(".pop-sns-qq").click(function () { if(select.selectedIndex==-1){ alert("蹇呴』閫夋嫨涓�涓处濂�"); @@ -290,14 +290,14 @@ // // } //location =oauth2HostName+"/oauth2/qq.do?"+SessionKey+"="+select.value+"&orghost="+hostUrl; - }); + }); //maintaince.dbid=select.value; // maintaince.isStop='false'; //setInterval(maintaince.checkSysIsExpired, 10000);//10绉掕皟鐢ㄤ竴娆� //checkSysIsExpired('<%=dbId%>','false'); //妫�鏌ョ郴缁熸槸鍚﹀仠姝娇鐢� Added by Johns Wang ,2017-05-26 - - + + // 鐧诲綍鏂瑰紡鍒囨崲 $(".nav_tab").on("click", function () { if(!$(this).hasClass('active')){ @@ -316,9 +316,9 @@ if(!$(this).hasClass("active")){ $(this).addClass("active"); $('.login-password').hide(); - $('.qrcode-logins').show(); + $('.qrcode-logins').show(); //鑾峰彇浜岀淮鐮� - _this.createqrCode(); + _this.createqrCode(); }else{ if(webSocket!=null){ $(this).removeClass("active"); @@ -326,8 +326,8 @@ $('.qrcode-logins').hide(); webSocketClose();//鍏抽棴閾炬帴 webSocket=null; - } - } + } + } }); // 鑾峰彇楠岃瘉鐮佹寜閽� var countTime = 60; //鍊掕鏃舵椂闂� @@ -339,10 +339,10 @@ return; } var phone=$("#telephone").val(); - if(!(/^1[3456789]\d{9}$/.test(phone))){ + if(!(/^1[3456789]\d{9}$/.test(phone))){ $(".telephone").find("span").html("璇疯緭鍏ユ纭殑鎵嬫満鍙风爜"); $("#telephone").addClass("errorinput"); - return; + return; } $(".get_phoneCode").addClass('is-disabled'); $('.get_phoneCode').attr('disabled', true); @@ -377,32 +377,36 @@ } }); }); - + //浜岀淮鐮佽繃鏈熷埛鏂� $('.qrcode-error a').on('click',function(){ //鑾峰彇浜岀淮鐮� - _this.createqrCode(); + _this.createqrCode(); }); - + //鐢熸垚浜岀淮鐮佸浘鐗� this.createqrCode=function(){ - $(".qrcode-error").hide(); + $(".qrcode-error").hide(); $.post("/ws/qrCode.do?appId="+select.value,function(res){ - if(res!=null && res.code==0){ - $(".qrcode-logins").find("img").attr("src",res.data.url); - initWebSocket(hostUrl+"/ws/qrLogin/"+select.value+"/"+res.data.qrcode+"/0",res.data.qrcode); - }else{ - alert(res.msg); - webSocket=-1; - } - },"json").error(function(e){ + if (res != null && res.code == 0) { + $(".qrcode-logins").find("img").attr("src", res.data.url); + initWebSocket(hostUrl + "/ws/qrLogin/" + select.value + "/" + res.data.qrcode + "/0", res.data.qrcode); + } else { + if (res.data != null && res.data != '') { + alert(res.data); + } else { + alert(res.msg); + } + webSocket = -1; + } + },"json").error(function(e){ webSocket=-1; alert(e.responseText); $(".qrcode-logins").find("img").attr("src",""); - }); + }); } - } -})(jQuery); + } +})(jQuery); //鐧诲綍璇锋眰 function loginRequest(encryptUser,encryptPwd,dataName){ $.ajax({ @@ -448,8 +452,8 @@ var url=$("#hostUrl").val()+"/home.jsp"; if(redirect!=""){ url+="?redirect="+redirect; - } - window.location.replace(url); + } + window.location.replace(url); } } }, -- Gitblit v1.8.0