No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

reset_password_mobile.htm 4.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <meta charset="utf-8" />
  5. <title>重置密码-{eyou:global name='web_name' /}</title>
  6. <meta name="renderer" content="webkit">
  7. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  8. <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
  9. <link href="{eyou:global name='web_cmspath' /}/favicon.ico" rel="shortcut icon" type="image/x-icon" />
  10. {eyou:static file="users/skin/css/basic.css" /}
  11. {eyou:static file="users/skin/css/eyoucms.css" /}
  12. {eyou:include file="users/skin/css/diy_css.htm" /}
  13. {eyou:static file="/public/static/common/js/jquery.min.js"/}
  14. {eyou:static file="/public/plugins/layer-v3.1.0/layer.js"/}
  15. {eyou:static file="users/skin/js/global.js" /}
  16. </head>
  17. <body class="reg">
  18. <div class="register_index ey-member">
  19. <div class="container">
  20. <form name='theForm' id="theForm" class="form-register panel-body fv-form">
  21. <div class="mip-reg-logo"><a href="{eyou:global name='web_cmsurl' /}" class="ey-logo"><img src="{eyou:global name='web_logo'/}" /></a></div>
  22. <div class="mip-reg-heading"><a class="nav-item " href="javascript:void(0)" style="cursor: unset;">重置密码</a></div>
  23. <div class="form-group group_z">
  24. <div class="input-group">
  25. <input type="text" class="form-control" value="{$username|default=''}" disabled="true"/>
  26. </div>
  27. </div>
  28. <div class="form-group group_z">
  29. <div class="input-group">
  30. <input type="password" name="password" id="password" class="form-control" placeholder="新密码"/>
  31. </div>
  32. </div>
  33. <div class="form-group group_z">
  34. <div class="input-group input-group-icon">
  35. <input type="password" name="password_" id="password_" class="form-control" placeholder="确认新密码"/>
  36. </div>
  37. </div>
  38. <button id="submitButton" class="btn btn-lg btn-primary btn-block group_z h60 disabled-button" disabled="disabled" style="width: 100%;" onclick="check_submit();" type="button">确认提交</button>
  39. <div class="login-link clearfix"><a class="fr tr" href="{eyou:url link='user/Users/login' /}">返回登录</a></div>
  40. </form>
  41. </div>
  42. </div>
  43. <script type="text/javascript">
  44. $(document).keydown(function(event){
  45. if(event.keyCode ==13) check_submit();
  46. });
  47. var input = document.getElementById('password');
  48. var input = document.getElementById('password_');
  49. var submitButton = document.getElementById('submitButton');
  50. input.addEventListener('input', function() {
  51. if (input.value.length > 0) {
  52. submitButton.disabled = false;
  53. submitButton.classList.remove('disabled-button');
  54. submitButton.classList.add('enabled-button');
  55. } else {
  56. submitButton.disabled = true;
  57. submitButton.classList.remove('enabled-button');
  58. submitButton.classList.add('disabled-button');
  59. }
  60. });
  61. function check_submit()
  62. {
  63. var password = $('#theForm input[name=password]').val();
  64. var password_ = $('#theForm input[name=password_]').val();
  65. if(password == ''){
  66. layer.msg('新密码不能为空!', {time: 1000});
  67. $('#theForm input[name=password]').focus();
  68. return false;
  69. }
  70. if(password_ == ''){
  71. layer.msg('确认密码不能为空!', {time: 1000});
  72. $('#theForm input[name=password_]').focus();
  73. return false;
  74. }
  75. {$pwdJsCode|default=''}
  76. if(password != password_){
  77. layer.msg('两次密码不一致!', {time: 1000});
  78. $('#theForm input[name=password]').focus();
  79. return false;
  80. }
  81. layer_loading('正在处理');
  82. $.ajax({
  83. url: "{eyou:url link='user/Users/reset_password_mobile' /}",
  84. data: $('#theForm').serialize(),
  85. type:'post',
  86. dataType:'json',
  87. success:function(res){
  88. layer.closeAll();
  89. if (res.code == 1) {
  90. layer.msg(res.msg, {time: 1500}, function(){
  91. window.location.href = res.url;
  92. });
  93. } else {
  94. layer.msg(res.msg, {time: 2000, icon: 5});
  95. }
  96. },
  97. error : function(e) {
  98. layer.closeAll();
  99. showErrorAlert(e.responseText);
  100. }
  101. });
  102. };
  103. </script>
  104. </body>
  105. </html>