modify-pwd.php 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <?php $this->beginPage() ?>
  2. <!DOCTYPE html>
  3. <html lang="<?= Yii::$app->language; ?>">
  4. <head>
  5. <meta charset="<?= Yii::$app->charset ?>">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="IE=edge">
  7. <?= \yii\helpers\Html::csrfMetaTags() ?>
  8. <title>找回密码</title>
  9. <?php $this->head() ?>
  10. <link href="<?= STATIC_URL ?>/ui/css/bootstrap.min.css" rel="stylesheet">
  11. <link href="<?= STATIC_URL ?>/ui/font-awesome/css/font-awesome.css" rel="stylesheet">
  12. <link href="<?= STATIC_URL ?>/ui/css/animate.css" rel="stylesheet">
  13. <link href="<?= STATIC_URL ?>/ui/css/style.css" rel="stylesheet">
  14. <link href="<?= STATIC_URL ?>/ui/css/plugins/toastr/toastr.min.css" rel="stylesheet">
  15. </head>
  16. <body class="gray-bg">
  17. <?php $this->beginBody() ?>
  18. <div class="loginColumns animated fadeInDown">
  19. <div class="row">
  20. <div class="col-md-3"></div>
  21. <div class="col-md-6">
  22. <h1 class="text-center">找回密码</h1>
  23. <hr/>
  24. </div>
  25. <div class="col-md-3"></div>
  26. </div>
  27. <div class="row">
  28. <div class="col-md-3"></div>
  29. <div class="col-md-6">
  30. <div class="ibox-title">
  31. 请填写表单
  32. </div>
  33. <div class="ibox-content">
  34. <form id="form" class="m-t" role="form">
  35. <input type="hidden" name="type" value="<?= $type ?>">
  36. <div class="input-group" style="margin-bottom:15px;">
  37. <span class="input-group-btn">
  38. <button type="button" class="btn btn-default">电子邮箱</button>
  39. </span>
  40. <input type="text" id="username" name="username" class="form-control" placeholder="请输入您的电子邮箱" value="<?= $username ?>" readonly>
  41. </div>
  42. <div class="input-group" style="margin-bottom:15px;">
  43. <span class="input-group-btn">
  44. <button type="button" class="btn btn-default">&nbsp;&nbsp;&nbsp;验证码</button>
  45. </span>
  46. <input type="text" id="code" name="code" class="form-control" placeholder="邮箱验证码" required="">
  47. </div>
  48. <div class="input-group" style="margin-bottom:15px;">
  49. <span class="input-group-btn">
  50. <button type="button" class="btn btn-default">&nbsp;&nbsp;&nbsp;新密码</button>
  51. </span>
  52. <input type="password" id="password" name="password" class="form-control" placeholder="密码" required="">
  53. </div>
  54. <div class="input-group" style="margin-bottom:15px;">
  55. <span class="input-group-btn">
  56. <button type="button" class="btn btn-default">重复密码</button>
  57. </span>
  58. <input type="password" id="rePassword" name="rePassword" class="form-control" placeholder="密码" required="">
  59. </div>
  60. <button id="login" type="button" class="btn btn-primary block full-width m-b">提交</button>
  61. </form>
  62. </div>
  63. <hr/>
  64. </div>
  65. <div class="col-md-3"></div>
  66. </div>
  67. <div class="row">
  68. <div class="col-md-3"></div>
  69. <div class="col-md-6 text-right">
  70. <small>©2012-2017 爱客金融</small>
  71. </div>
  72. <div class="col-md-3"></div>
  73. </div>
  74. </div>
  75. <?php $this->endBody() ?>
  76. <script src="<?= STATIC_URL ?>/ui/js/jquery.1.9.1.min.js"></script>
  77. <script src="<?= STATIC_URL ?>/ui/js/bootstrap.min.js"></script>
  78. <script src="<?= STATIC_URL ?>/ui/js/plugins/toastr/toastr.min.js"></script>
  79. <script type="text/javascript">
  80. $("#login").on("click",function(){
  81. $.ajax({
  82. type: "POST",
  83. url: "<?= \yii\helpers\Url::to(['modify-pwd1'])?>",
  84. data: $('#form').serialize(),
  85. dataType: "json",
  86. beforeSend: function() {},
  87. success: function(data) {
  88. if(data.isSuccess){
  89. var url="<?= \yii\helpers\Url::to(['/account/login']) ?>";
  90. window.location.href=url;
  91. }else{
  92. toastr.error(data.msg, "提示");
  93. }
  94. },
  95. complete: function(XMLHttpRequest, textStatus) {},
  96. error: function() {}
  97. });
  98. });
  99. </script>
  100. </body>
  101. </html>