forget-2vertify.html 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
  6. <title></title>
  7. <script src="../../../js/mui.min.js"></script>
  8. <link href="../../../css/mui.min.css" rel="stylesheet" />
  9. <link rel="stylesheet" type="text/css" href="../css/forget.css" />
  10. <script type="text/javascript" charset="UTF-8">
  11. mui.init();
  12. </script>
  13. </head>
  14. <body>
  15. <header class="mui-bar mui-bar-nav">
  16. <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
  17. <h1 class="mui-title">手机验证</h1>
  18. </header>
  19. <div class="mui-bar mui-bar-footer">
  20. <button type="button" class="mui-btn mui-btn-blue mui-btn-block" id="forget_next">确 定</button>
  21. </div>
  22. <div class="mui-content">
  23. <div class="mui-content-padded">
  24. 系统已经发送验证码到您的手机<span id="number"></span>,请查收
  25. </div>
  26. <form class="mui-input-group mui-card">
  27. <div class="mui-input-row">
  28. <label><span class="mui-icon mui-icon-reload"></span>验证码</label>
  29. <input type="text" class="mui-input-clear" placeholder="请输入验证码">
  30. </div>
  31. </form>
  32. <div class="mui-content-padded">
  33. <button type="button" class="mui-btn" id="time" disabled="">60 秒</button>
  34. </div>
  35. </div>
  36. </body>
  37. <!--================================================================-->
  38. <script src="../../../js/app.js" type="text/javascript" charset="utf-8"></script>
  39. <script src="../../../js/common_http.js" type="text/javascript" charset="utf-8"></script>
  40. <script type="text/javascript" charset="UTF-8">
  41. mui.init();
  42. var time = 60;
  43. var postUrl = "common/check_captcha";
  44. countTime(); //计时方法
  45. mui.plusReady(function() {
  46. var self = plus.webview.currentWebview();
  47. self.opener().close("none");
  48. var phone = self.mobile;
  49. document.getElementById("number").innerText = phone;
  50. /*
  51. * 提交验证码验证,跳转
  52. */
  53. document.getElementById("forget_next").addEventListener('tap', function() {
  54. var verify = document.querySelector("input").value.trim();
  55. if (verify.length == 0) {
  56. mui.toast("请输入验证码");
  57. return
  58. }
  59. sendPost(postUrl, {
  60. mobile: phone,
  61. type: 3,
  62. captcha: verify
  63. }, null, function(res) {
  64. if (res.status == 200) {
  65. mui.openWindow('forget-3newpwd.html', 'forget-3newpwd', {
  66. extras: {
  67. mobile: phone,
  68. verifyCode: verify
  69. }
  70. });
  71. }
  72. });
  73. });
  74. /*
  75. * 重新获取验证码
  76. */
  77. document.getElementById("time").addEventListener("tap", function() {
  78. var captchaUrl = "common/captcha";
  79. sendPost(captchaUrl, {
  80. mobile: phone,
  81. type: 3
  82. }, null, function(res) {
  83. if (res.status == 200) {
  84. time = 60;
  85. document.querySelector("input").value = "";
  86. }
  87. mui.toast(res.msg);
  88. });
  89. });
  90. });
  91. </script>
  92. </html>