forcePwdEdit.ss.jsp 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <html>
  2. <head>
  3. <skin.ss file='/ss/main'/>
  4. <js.ss file="/ss/jquery/jquery.js"/>
  5. <js.ss file="/ss/base.js"/>
  6. <js.ss file="/ss/masklayer.js"/>
  7. <js.ss file="/ss/wdDialogInit.js"/>
  8. <js.ss file="/ss/common.js"/>
  9. <js.ss file="/ss/display.js"/>
  10. <style>
  11. #checkMsg{text-align: center;}
  12. </style>
  13. <script type="text/javascript">
  14. onload = function(){
  15. var f = document.getElementById('myForm');
  16. f.onsubmit=function(){
  17. var p1 = document.getElementById('newPassword').value;
  18. var p2 = document.getElementById('againNewPassword').value;
  19. var yhm = '${yhm}';
  20. try{
  21. if(p1!=p2){
  22. $("#checkMsg").html('新密码与密码确认不一致!');
  23. return false;
  24. }else if(false&&p1.length<6){
  25. //alert('密码长度必需大于等于6位!');
  26. $("#checkMsg").html('密码长度必需大于等于6位!');
  27. return false;
  28. }else if(false&&!(p1.match(/[a-zA-Z]+/)&&p1.match(/\d+/))){
  29. //alert('密码必需包含数字和字母!');
  30. $("#checkMsg").html('密码必需包含数字和字母!');
  31. return false;
  32. }else if(false&&p1.match('${yhm}')){
  33. //alert('密码不能包含账号!');
  34. $("#checkMsg").html('密码不能包含账号!');
  35. return false;
  36. }
  37. var res;
  38. $.ajax({
  39. url:"/service?ssServ=chkPwd", // =checkPasswordStrengthAjax。Lin
  40. data:{"mm":p1,'yhid':'${yhid}'},
  41. async:false,
  42. type:"POST",
  43. dataType:"json",
  44. success:function(result){
  45. res=result
  46. }
  47. })
  48. if("1"!=res.result){
  49. $("#checkMsg").html(res.msg);
  50. return false;
  51. }
  52. }catch(e){
  53. //alert(e.message);
  54. $("#checkMsg").html(e.message);
  55. return false;
  56. }
  57. }
  58. }
  59. </script>
  60. </head>
  61. <body class="dialogBody" style="width:100%;height:100%;">
  62. <div class='mobileContent-div' ssFith="true">
  63. <%-- 改,.do 改为服务。Lin
  64. <form action="/updatePwd.do" method="post" id="myForm"> --%>
  65. <form action="<serv.ss name='updPwd' dest='info'/>" method="post" id="myForm">
  66. <input type="hidden" name="yhid" value="${yhid}">
  67. <div style="width:100%;display: flex;justify-content: center;margin: 4.45rem 0 1.45rem 0;">
  68. <%-- 去掉 /$@{sessionScope['XMMC']},不支持多个应用了。Lin
  69. <img src="/$@{sessionScope['XMMC']}/image/logo/largeLogo.png" style="width: 7.325rem;height:7.325rem;"> --%>
  70. <img src="/image/logo/largeLogo.png" style="width: 7.325rem;height:7.325rem;">
  71. </div>
  72. <div class="div" id="mmeditpanel" style="width:23rem;position: relative;margin:0rem auto;height:6rem;">
  73. <div style="display: flex;justify-content: center;position: relative">
  74. <p style="color:#ff0000; font-size:16px; text-align:center;padding:0px;">请修改密码</p>
  75. </div>
  76. <div style="display: flex;justify-content: center;position: relative;margin-top: 1rem">
  77. <p style="color:#6d7a87; font-size:14px; text-align:center;padding:0px;margin:5px;width:74%;">${pwdStrengthMsg}</p>
  78. </div>
  79. </div>
  80. <div class="div" id="mmeditpanel" style="width:23rem;position: relative;margin:0rem auto;height: 15.5rem;">
  81. <div style="display: flex;justify-content: center;position: relative">
  82. <input placeholder="新密码" type="password" name="newPassword" id="newPassword" class="mobileBox-dim" style="padding-left:0px;width: 16.65rem;height:2.9rem;text-indent:2.3rem;font-size: 0.85rem;">
  83. </div>
  84. <div style="display: flex;justify-content: center;position: relative;margin-top: 1rem">
  85. <input placeholder="新密码确认" type="password" name="againNewPassword" id="againNewPassword" class="mobileBox-dim" style="padding-left:0px;width: 16.65rem;height:2.9rem;text-indent:2.3rem;font-size: 0.85rem;"/>
  86. </div>
  87. <div style="display: flex;justify-content: center;position: relative;margin-top: 1rem">
  88. <p class="content-warning" id="checkMsg" style="text-align: center;"></p>
  89. </div>
  90. <div style="width: 100%;margin-top: 1rem;display: flex;justify-content:center;">
  91. <button class="mobileLogin-button" style="width:8rem;height:3rem;" id="button" type="submit">保存</button>&nbsp;
  92. <button class="mobileLogin-button" style="width:8rem;height:3rem;" type="button" onClick="fh()" >返回</button>
  93. </div>
  94. </div> <%-- 增加,少了。Lin --%>
  95. </form>
  96. </div>
  97. </body>
  98. <script type="text/javascript">
  99. window.onload = function () {
  100. var htmlFontSize = (parseInt(window.screen.width) / 375) * 20;
  101. document.getElementById('html').style.fontSize = htmlFontSize + "px";
  102. }
  103. function updateAppInfo(value) {
  104. document.getElementById('AppInfo').innerHTML = value;
  105. }
  106. function updateAppVersion(value) {
  107. document.getElementById('AppVersion').innerHTML = value;
  108. }
  109. function fh(){
  110. window.history.back(-1);
  111. }
  112. </script>
  113. </html>