zhmm1.html 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>四平市政府</title>
  6. <link rel="stylesheet" href="css/basic.css" />
  7. <script type="text/javascript" src="js/jquery-1.8.3.min.js" ></script>
  8. <script type="text/javascript" src="js/basic.js" ></script>
  9. <script type="text/javascript" src="js/plusShare.js"></script>
  10. <script type="text/javascript" src="js/unslider-min.js" ></script>
  11. <script type="text/javascript" src="js/idealDic/idealDicInclude.js"></script>
  12. <script src="js/mui.min.js"></script>
  13. <script>
  14. /**2017/11/29
  15. * 全局电话号变量
  16. * lining
  17. */
  18. var mobilePhone='';
  19. (function($){
  20. $.getUrlParam = function(name)
  21. {
  22. var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
  23. var r = window.location.search.substr(1).match(reg);
  24. if (r!=null) return unescape(r[2]); return null;
  25. }
  26. })(jQuery);
  27. function close_page(){
  28. mui.fire(plus.webview.getWebviewById("zhmm.html"),"loginReload");
  29. mui.currentWebview.close();
  30. }
  31. /**
  32. * 2017/11/29
  33. * 找回密码第一页传过来的电话号的值
  34. * lining
  35. */
  36. $(function(){
  37. mobilePhone=$.getUrlParam("mobilePhone");
  38. sjhm=mobilePhone.replace(mobilePhone.substring(3,7),'****');
  39. $("#sjhm span").text(""+sjhm+"");
  40. })
  41. /**
  42. * 2017/11/29
  43. * 吉大正元服务根据手机号获取验证码
  44. * lining
  45. */
  46. function yzmbtn(){
  47. plus.nativeUI.showWaiting();
  48. var param="{'loginName':"+mobilePhone+"}";
  49. mui.post(
  50. DengluUrl+'login_appAction!duijieMethod.action',{
  51. name:'sendSMS',
  52. param:param
  53. },
  54. function(data){
  55. if(data.success==true){
  56. if(data.result==1){
  57. plus.nativeUI.closeWaiting();
  58. timeout();
  59. }
  60. }else if(data.success==false){
  61. if(data.result==2){
  62. mui.alert(data.message);
  63. }
  64. }
  65. },'json'
  66. );
  67. }
  68. /**2017/11/29
  69. * 验证码时间函数
  70. * lining
  71. */
  72. var time=60;
  73. function timeout(){
  74. if(time>=0){
  75. $("#yzmbtn").attr('disabled',true);
  76. $("#yzmbtn").attr('readonly','readonly');
  77. document.getElementById("yzmbtn").style.backgroundColor = "#dddddd";
  78. $("#yzmbtn").val(time);
  79. time--;
  80. setTimeout("timeout();",1000);
  81. }else{
  82. $("#yzmbtn").removeAttr("style");
  83. $("#yzmbtn").val('重发验证码');
  84. $("#yzmbtn").attr('disabled',false);
  85. $("#yzmbtn").attr("readonly","readonly");
  86. time=60;
  87. }
  88. }
  89. /**
  90. * 2017/11/30
  91. * lining
  92. * 判断密码是否为最低6位的正则表达式
  93. */
  94. function xmm(){
  95. var reg=/^(?!(?:\d+|[a-zA-Z]+)$)[\da-zA-Z]{5,}$/;
  96. var newpassword=$("#newpassword").val();
  97. var newspassword=$("#newspassword").val();
  98. if(!(reg.test(newpassword))){
  99. $("#mima1").text('不符合密码规范,至少六位');
  100. $("#xyb").removeAttr("onclick");
  101. }else {
  102. $("#mima1").empty();
  103. $("#mima2").text('不符合密码规范,至少六位')
  104. }
  105. if(reg.test(newpassword)&&reg.test(newspassword)){
  106. $("#xyb").attr('onclick','xyb()');
  107. }
  108. }
  109. function xmm1(){
  110. var reg=/^(?!(?:\d+|[a-zA-Z]+)$)[\da-zA-Z]{5,}$/;
  111. var newpassword=$("#newpassword").val();
  112. var newspassword=$("#newspassword").val();
  113. if(!(reg.test(newspassword))){
  114. $("#mima2").text('不符合密码规范,至少六位');
  115. $("#xyb").removeAttr("onclick");
  116. }else {
  117. $("#xyb").attr("onclick","xyb()");
  118. $("#mima2").empty();
  119. }
  120. if(reg.test(newpassword)&&reg.test(newspassword)){
  121. $("#xyb").attr('onclick','xyb()');
  122. }
  123. }
  124. /***
  125. * 2017/11/30
  126. * 提交后台修改密码
  127. * lining
  128. */
  129. function xyb(){
  130. var newpassword=$("#newpassword").val();
  131. var newspassword=$("#newspassword").val();
  132. var yanzhengma=$("#yzmtext").val();
  133. if(newpassword==newspassword){
  134. if(yanzhengma==null||yanzhengma==''){
  135. mui.alert('请输入验证码');
  136. }else if((newpassword==null||newpassword=='')||(newspassword==null||newspassword=='')){
  137. mui.alert('密码不能为空');
  138. }else{
  139. plus.nativeUI.showWaiting();
  140. var param='{"loginName":'+mobilePhone+',"newPassword":"'+newspassword+'","vericode":'+yanzhengma+'}'
  141. mui.post(
  142. DengluUrl+'login_appAction!duijieMethod.action',{
  143. name:'findPsd',
  144. param:param
  145. },
  146. function(data){
  147. if(data.success==true){
  148. if(data.result==1){
  149. plus.nativeUI.closeWaiting();
  150. mui.openWindow({
  151. url:'zhmm3.html',
  152. id:'zhmm3.html',
  153. styles:{top:'0px', bottom:'0px'},
  154. createNew:true
  155. });
  156. }
  157. }else if(data.success==false){
  158. if(data.result==4){
  159. plus.nativeUI.closeWaiting();
  160. mui.alert(data.message);
  161. }
  162. }
  163. },'json');
  164. }
  165. }else if(newpassword!=newspassword){
  166. mui.alert('两次输入的密码不一致,请重新输入');
  167. $("#newpassword").val('');
  168. $("#newspassword").val('');
  169. }
  170. }
  171. </script>
  172. </head>
  173. <body style="background:url(images/sp_dlbg.gif) 0 0 repeat;">
  174. <div class="jfhead" align='center'>
  175. <a href="#" onclick='close_page();'><img src="images/fh.png"></a><b>找回密码</b>
  176. </div>
  177. <div class="clear"></div>
  178. <div class="sjbdcont" align='center'>
  179. <ul>
  180. <li class="li1 fl">1<p align='center'>设置新密码</p></li>
  181. <li class="li2act fl">2</li>
  182. <li class="li3 fr">3</li>
  183. </ul>
  184. <p>手机号码 <i id='sjhm'><span></span></span></i></p>
  185. <!--
  186. <p><input type="text" placeholder="请输入您的手机号"></p>
  187. -->
  188. <p class="yzm"><input type="text" placeholder="请输入手机验证码" id="yzmtext"><input type="button" value="获取验证码" id="yzmbtn" onclick='yzmbtn();'></p>
  189. <p class="bluefont">注:短信验证码有效期为60秒!</p>
  190. <p>新密码 <i>*</i></p>
  191. <p><input type="password" placeholder="由数字、字母或符号两种以上组成" id='newpassword' onkeydown="xmm();" style="font-size: 2.8rem;width: 100%;border-radius: 10px;border: solid 1px #999;padding: 20px;" placeholder="........."></p>
  192. <span id='mima1' class="bluefont"></span>
  193. <p><input type="password" placeholder="请输入确认密码" id='newspassword' onkeydown="xmm1();" style="font-size: 2.8rem;width: 100%;border-radius: 10px;border: solid 1px #999;padding: 20px;" placeholder="........."></p>
  194. <span id='mima2' class="bluefont"></span>
  195. <!--
  196. <p class="typ"><input type="checkbox" class="checkbox">我已阅读并同意<u class="bluefont">《四平市政务服务网注册协议》</u></p>-->
  197. <h3><input type="button" class="btn" value="下一步" onclick="xyb();" id='xyb'></h3>
  198. </div>
  199. </body>
  200. </html>