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.
 
 
 
 
 
 

109 lines
3.3 KiB

  1. <!DOCTYPE html>
  2. <html class="ui-page-login">
  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. <link href="css/mui.min.css" rel="stylesheet" />
  8. <link href="css/style.css" rel="stylesheet" />
  9. <style>
  10. .area {
  11. margin: 20px auto 0px auto;
  12. }
  13. .mui-input-group:first-child {
  14. margin-top: 20px;
  15. }
  16. .mui-input-group label {
  17. width:30%;
  18. }
  19. .mui-input-row label~input,
  20. .mui-input-row label~select,
  21. .mui-input-row label~textarea {
  22. width: 70%;
  23. }
  24. .mui-checkbox input[type=checkbox],
  25. .mui-radio input[type=radio] {
  26. top: 6px;
  27. }
  28. .mui-content-padded {
  29. margin-top: 25px;
  30. }
  31. .mui-btn {
  32. padding: 10px;
  33. }
  34. .mui-input-row label~input, .mui-input-row label~select, .mui-input-row label~textarea{
  35. margin-top: 1px;
  36. }
  37. </style>
  38. </head>
  39. <body>
  40. <header class="mui-bar mui-bar-nav">
  41. <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
  42. <h1 class="mui-title">找回密码</h1>
  43. </header>
  44. <div class="mui-content">
  45. <form class="mui-input-group">
  46. <div class="mui-input-row">
  47. <label>手机号</label>
  48. <input id='mobile' type="number" class="mui-input-clear mui-input-numbox" placeholder="请输入手机号">
  49. </div>
  50. <div class="mui-input-row">
  51. <label>身份证号</label>
  52. <input id='idnumber' type="number" class="mui-input-clear mui-input-numbox" >
  53. </div>
  54. </form>
  55. <div class="mui-content-padded">
  56. <button id='sendMail' class="mui-btn mui-btn-block mui-btn-primary">提交</button>
  57. </div>
  58. </div>
  59. <script src="js/mui.min.js"></script>
  60. <script type="text/javascript" src="js/serverurl.js" ></script>
  61. <script>
  62. (function($, doc) {
  63. $.plusReady(function() {
  64. var sendButton = doc.getElementById('sendMail');
  65. sendButton.addEventListener('tap', function() {
  66. if(document.getElementById("mobile").value==""||document.getElementById("idnumber").value=="")
  67. {
  68. plus.nativeUI.toast('请输入手机号和身份证号。');
  69. return;
  70. }
  71. var xhr = new plus.net.XMLHttpRequest();
  72. xhr.responseType = "json";
  73. xhr.onreadystatechange = function() {
  74. switch(xhr.readyState) {
  75. case 4:
  76. if(xhr.status == 200) {
  77. console.log(JSON.stringify(xhr.response));
  78. if(xhr.response.result == "ok") {
  79. plus.nativeUI.closeWaiting();
  80. console.log(JSON.stringify(xhr.response));
  81. alert("您的密码是:"+xhr.response.pwd);
  82. } else {
  83. plus.nativeUI.closeWaiting();
  84. plus.nativeUI.toast('操作失败!您输入的手机号或身份证号不正确。');
  85. }
  86. } else {
  87. plus.nativeUI.closeWaiting();
  88. plus.nativeUI.toast('您的网络不给力');
  89. }
  90. break;
  91. default:
  92. break;
  93. }
  94. }
  95. xhr.open("GET", encodeURI(serverdomain + "/WebService/UserService.ashx?Action=forgetPwd&content={'logname':'" + document.getElementById("mobile").value + "','ids':'" + document.getElementById("idnumber").value + "'}"));
  96. xhr.send();
  97. plus.nativeUI.showWaiting("请稍候...");
  98. },false);
  99. });
  100. }(mui, document));
  101. </script>
  102. </body>
  103. </html>