From 401f690e48292e4cb476a0b8d9790da2e1c71d33 Mon Sep 17 00:00:00 2001 From: hdw <hdw@192.168.137.1> Date: 星期六, 19 一月 2019 09:10:49 +0800 Subject: [PATCH] 首页登陆添加拖动验证 --- gx_tieta/WebRoot/mobil/loginm.html | 62 ++++++++++++++++++++ gx_tieta/WebRoot/mobil/app/css/loginm.css | 61 ++++++++++++++++++++ gx_tieta/WebRoot/mobil/images/verify.png | 0 3 files changed, 121 insertions(+), 2 deletions(-) diff --git a/gx_tieta/WebRoot/mobil/app/css/loginm.css b/gx_tieta/WebRoot/mobil/app/css/loginm.css new file mode 100644 index 0000000..1c74177 --- /dev/null +++ b/gx_tieta/WebRoot/mobil/app/css/loginm.css @@ -0,0 +1,61 @@ +@charset "UTF-8"; +.hdw-dialog { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: none; + z-index: 9999; +} + +.hdw-dialog.hdw-dialog-hide { + display: none; +} + +.hdw-dialog .hdw-dialog-container { + position: relative; + width: 100%; + height: 100%; + background-color: none; +} + +.hdw-dialog-bg { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: #000000; + opacity: .1; + z-index: 0; +} +.hdw-dialog-content { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: #FFFFFF; + z-index: 1; +} +.hdw-dialog-content.hdw-dialog-width500-300 { + width: 500px; + height: 300px; + left: 50%; + margin-left: -250px; + top: 50%; + margin-top: -150px; +} +.hdw-dialog-content.hdw-dialog-width270-125 { + width: 270px; + height: 125px; + left: 50%; + margin-left: -135px; + top: 50%; + margin-top: -63px; +} + +.hdw-dialog-content-container { + position: relative; +} \ No newline at end of file diff --git a/gx_tieta/WebRoot/mobil/images/verify.png b/gx_tieta/WebRoot/mobil/images/verify.png new file mode 100644 index 0000000..a2b51c3 --- /dev/null +++ b/gx_tieta/WebRoot/mobil/images/verify.png Binary files differ diff --git a/gx_tieta/WebRoot/mobil/loginm.html b/gx_tieta/WebRoot/mobil/loginm.html index 4ae26f5..6186a49 100644 --- a/gx_tieta/WebRoot/mobil/loginm.html +++ b/gx_tieta/WebRoot/mobil/loginm.html @@ -5,6 +5,8 @@ <title>钃勭數姹犳櫤鑳借繙绋嬭繍缁寸郴缁�</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="mobilCss/jquery.mobile-1.4.5.min.css" /> +<link rel="stylesheet" type="text/css" href="../js/verify/css/verify.css"> +<link rel="stylesheet" type="text/css" href="app/css/loginm.css"> <script type="text/javascript" src="mobilJs/jquery-1.8.2.js"></script> <script type="text/javascript" src="mobilJs/jquery.mobile-1.4.5.min.js"></script> <style type="text/css"> @@ -60,12 +62,24 @@ </div> <input id="sub" type="button" data-role="button" value="鐧诲綍" /> </form> + <!-- 楠岃瘉鐮佺櫥闄嗛潰鏉� --> + <div class="hdw-dialog hdw-dialog-hide" id="lVerify-dialog"> + <div class="hdw-dialog-container"> + <div class="hdw-dialog-bg"></div> + <div class="hdw-dialog-content hdw-dialog-width270-125"> + <div class="hdw-dialog-content-container"> + <div id="lVerify" ></div> + </div> + </div> + </div> + </div> </div> </div> </div> </body> <script type="text/javascript" src="../js/base64.js"></script> <script type="text/javascript" src="../js/MD5.js"></script> +<script type="text/javascript" src="../js/verify/js/verify.min.js"></script> <script type="text/javascript"> //鎸夐挳瑙﹀彂浜嬩欢 document.getElementById("sub").onclick = function() { @@ -77,11 +91,20 @@ } else if (password=null||password == "" || password.length < 1) { document.getElementById("msg").innerHTML = "璇疯緭鍏ュ瘑鐮�"; } else { - checkuser(); + $('#lVerify-dialog').removeClass('hdw-dialog-hide'); // 鏄剧ず鎷栧姩楠岃瘉鏁版嵁 + initVerify(); + //checkuser(); } }; - + + // 鐐瑰嚮绌虹櫧鍖哄煙鍏抽棴楠岃瘉 + $('#lVerify-dialog .hdw-dialog-bg').click(function() { + $('#sub').children('.faa-spin').css('visibility', 'hidden'); + $('#sub').removeClass('page-loading'); + $('#lVerify-dialog').addClass('hdw-dialog-hide'); + }); + //鏍¢獙鐢ㄦ埛鍚嶅瘑鐮佹槸鍚︽纭� function checkuser() { var user = document.getElementById("user").value; @@ -156,6 +179,41 @@ + ";expires=Thu, 01-Jan-70 00:00:01 GMT"; //console.info("鍒犻櫎鎴愬姛"); } + // 鍒濆鍖杤erify鎷栧姩楠岃瘉 + + function initVerify() { + // 娓呯┖鍐呭 + $('#lVerify').text(''); + // 閰嶇疆鎷栧姩楠岃瘉鍥惧儚 + $('#lVerify').slideVerify({ + type : 2, //绫诲瀷 + vOffset : 5, //璇樊閲忥紝鏍规嵁闇�姹傝嚜琛岃皟鏁� + vSpace : 5, //闂撮殧 + imgName : ['verify.png'], + imgSize : { + width: '270px', + height: '125px', + }, + blockSize : { + width: '40px', + height: '40px', + }, + barSize : { + width : '270px', + height : '40px', + }, + ready : function() { + + }, + success : function() { + $('#lVerify-dialog').addClass('hdw-dialog-hide'); // 闅愯棌楠岃瘉 + checkuser(); // 楠岃瘉鐢ㄦ埛 + }, + error : function() { + // alert('楠岃瘉澶辫触锛�'); + } + }); + } //鎷︽埅瀹夊崜鍥為��鎸夐挳 history.pushState(null, null, location.href); -- Gitblit v1.9.1