forget.html 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
  6. <title>{$title}-找回密码</title>
  7. <meta name="renderer" content="webkit">
  8. <meta http-equiv="Cache-Control" content="no-siteapp"/>
  9. <link rel="Shortcut Icon" href="/favicon.ico" type="image/x-icon" />
  10. <link href="/static/hplus/css/bootstrap.min.css?v=3.3.7" rel="stylesheet" />
  11. <link href="/static/hplus/css/font-awesome.min.css?v=4.4.0" rel="stylesheet" />
  12. <link href="/static/hplus/css/animate.css" rel="stylesheet" />
  13. <link href="/static/admin/css/style.css?v=4.1.0" rel="stylesheet" />
  14. <link href="/static/admin/css/login.css" rel="stylesheet">
  15. <!--[if lt IE 9]>
  16. <meta http-equiv="refresh" content="0;ie.html" />
  17. <![endif]-->
  18. <script>
  19. if(window.top!==window.self){window.top.location=window.location};
  20. </script>
  21. <style>
  22. .verifyimg{
  23. width:46%;
  24. height: 40px;
  25. margin-bottom: 3px;
  26. border: 1px solid #ccc;
  27. cursor: pointer;
  28. }
  29. .login-title{
  30. font-size: 18px;
  31. color: #222;
  32. }
  33. .form-control{
  34. }
  35. .btn-block{
  36. margin-top: 10px;
  37. }
  38. .login-input-box{
  39. height: 55px !important;
  40. }
  41. </style>
  42. </head>
  43. <body>
  44. <div class="login-logo-top">
  45. <div class="login-logo-top-div">
  46. <img class="login-logo-top-img" src="/static/admin/img/logo.png" alt="">
  47. </div>
  48. </div>
  49. <div class="login-box">
  50. <!-- <div class="login-box-left">-->
  51. <!-- <div class="login-box-banner">-->
  52. <!-- <img src="/static/admin/img/tu.png" alt="">-->
  53. <!-- </div>-->
  54. <!-- <div class="l-title">-->
  55. <!-- <div class="l-title-a">欢迎使用</div>-->
  56. <!-- <div class="l-title-a">{$title}</div>-->
  57. <!-- </div>-->
  58. <!-- </div>-->
  59. <div class="login-box-right">
  60. <div class="from-data">
  61. <div class="form-right">
  62. <div class="logo-title">
  63. 找回密码
  64. </div>
  65. <form method="post" style="margin: 0 49px;" action="{:url('forget')}">
  66. <div class="login-input-box" style="display:flex !important;">
  67. <div class="login_input-box" style="width: 160px !important;">
  68. <input type="text" name="account" id="phone" class="form-control uname" placeholder="手机号" />
  69. </div>
  70. <div class="login_input-box" style="width: 140px !important;">
  71. <input type="text" readonly id="yzm" value="获取验证码" style="cursor: pointer" onclick="sendsms(this)" class="form-control uname" />
  72. </div>
  73. </div>
  74. <div class="login-input-box">
  75. <div class="login_input-box">
  76. <input type="text" name="code" class="form-control uname" placeholder="验证码" />
  77. </div>
  78. </div>
  79. <div class="login-input-box">
  80. <div class="login_input-box">
  81. <input type="password" name="password" class="form-control pword m-b" placeholder="新密码" />
  82. </div>
  83. </div>
  84. <a class="forget f-login" href="{:url('login')}">去登陆</a>
  85. <!-- <h5 class="forget"><a href="{:url('login')}">去登陆</a></h5>-->
  86. <button class="btn btn-info btn-block" >提 交</button>
  87. </form>
  88. </div>
  89. </div>
  90. <div class="zi">
  91. <img src="/static/admin/img/zi.png" alt="">
  92. </div>
  93. </div>
  94. </div>
  95. <div class="copyright-text">
  96. Copyright © 2023 明德智慧医院后勤一站式服务平台 版权所有
  97. </div>
  98. <script src="/static/hplus/js/jquery.min.js?v=2.1.4"></script>
  99. <script src="/static/hplus/js/bootstrap.min.js?v=3.3.7"></script>
  100. <script src="/static/layer/layer.js"></script>
  101. <script>
  102. $(function(){
  103. //表单提交
  104. $(document)
  105. .ajaxStart(function(){
  106. $("button:submit").html('登 录 中...').attr("disabled", true);
  107. })
  108. .ajaxStop(function(){
  109. $("button:submit").html('登 录').attr("disabled", false);
  110. });
  111. $("form").submit(function(){
  112. var self = $(this);
  113. self.find(".check-tips").text('');
  114. $.post(self.attr("action"), self.serialize(), success, "json");
  115. return false;
  116. function success(data){
  117. if(data.code){
  118. window.location.href = data.url;
  119. } else {
  120. layer.msg(data.msg)
  121. //刷新验证码
  122. $(".reloadverify").click();
  123. }
  124. }
  125. });
  126. //刷新验证码
  127. var verifyimg = $(".verifyimg").attr("src");
  128. $(".reloadverify").click(function(){
  129. if( verifyimg.indexOf('?')>0){
  130. $(".verifyimg").attr("src", verifyimg+'&random='+Math.random());
  131. }else{
  132. $(".verifyimg").attr("src", verifyimg.replace(/\?.*$/,'')+'?'+Math.random());
  133. }
  134. });
  135. });
  136. function sendsms(_self) {
  137. var flag = $(_self).attr('data-flag');
  138. if (flag == 1) {
  139. return false;
  140. }
  141. var mobile = $('#phone').val();
  142. if (mobile == '') {
  143. layer.msg('未填写手机号');
  144. return false;
  145. }
  146. $(_self).attr('data-flag', 1);
  147. $.ajax({
  148. url: '{:url("sms")}',
  149. type: "POST",
  150. data: {'mobile': mobile},
  151. success: function (res) {
  152. if (res.code == 1) {
  153. var time = 60;
  154. $('#yzm').val("(" + time + "s)重新获取");
  155. var timer = setInterval(function () {
  156. time--;
  157. if (time == 0) {
  158. $('#yzm').val("获取验证码");
  159. $(_self).attr('data-flag', 0);
  160. clearInterval(timer);
  161. } else {
  162. $('#yzm').val("(" + time + "s)重新获取");
  163. }
  164. }, 1000);
  165. } else {
  166. layer.msg(res.msg);
  167. $(_self).attr('data-flag', 0);
  168. $('#yzm').val("获取验证码");
  169. }
  170. },
  171. error: function (result) {
  172. layer.msg('请求失败');
  173. $(_self).attr('data-flag', 0);
  174. $('#yzm').val("获取验证码");
  175. }
  176. });
  177. }
  178. </script>
  179. </body>
  180. </html>