pwd-t-1.php 3.3 KB

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