systemmanage_user_resetPwd.html 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title></title>
  6. <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
  7. <link href="../css/mui.min.css" rel="stylesheet" />
  8. <link href="https://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.css" rel="stylesheet">
  9. <link rel="stylesheet" type="text/css" href="../css/common.css" />
  10. <style type="text/css">
  11. /*input*/
  12. .mui-table-view-cell input {
  13. line-height: 30px;
  14. width: 100%;
  15. height: inherit;
  16. margin-bottom: 0;
  17. padding: 0;
  18. -webkit-user-select: text;
  19. border: none;
  20. border-radius: none;
  21. outline: 0;
  22. background-color: #fff;
  23. -webkit-appearance: none;
  24. }
  25. input::-webkit-input-placeholder {
  26. color: #BEBEBE;
  27. }
  28. input::-moz-placeholder {
  29. /* Mozilla Firefox 19+ */
  30. color: #BEBEBE;
  31. }
  32. input:-moz-placeholder {
  33. /* Mozilla Firefox 4 to 18 */
  34. color: #BEBEBE;
  35. }
  36. input:-ms-input-placeholder {
  37. /* Internet Explorer 10-11 */
  38. color: #BEBEBE;
  39. }
  40. .addAddress {
  41. position: absolute;
  42. right: 12px;
  43. top: 29px;
  44. }
  45. </style>
  46. </head>
  47. <body>
  48. <header class="mui-bar mui-bar-nav">
  49. <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
  50. <h1 class="mui-title">重置密码</h1>
  51. <a id="submit" class="mui-icon fa fa-cloud-upload mui-pull-right"></a>
  52. </header>
  53. <div class="mui-content">
  54. <ul class="mui-table-view" id="user">
  55. <li class="mui-table-view-cell">
  56. <span class="equipTitle">用户名</span>
  57. <p id="username">121212</p>
  58. </li>
  59. <li class="mui-table-view-cell">
  60. <span class="equipTitle">密码</span>
  61. <p><input type="password" name="" placeholder="请输入密码" id="password" value="" /></p>
  62. </li>
  63. <li class="mui-table-view-cell">
  64. <span class="equipTitle">电话</span>
  65. <p><input type="password" name="" placeholder="请再次输入密码" id="password2" value="" /></p>
  66. </li>
  67. </ul>
  68. </div>
  69. <script src="../js/mui.min.js"></script>
  70. <script type="text/javascript">
  71. mui.init();
  72. mui.plusReady(function(){
  73. var self = plus.webview.currentWebview();
  74. console.log(self.name);
  75. var imei = self.imei;
  76. //提交信息
  77. document.getElementById('submit').addEventListener('tap',function(){
  78. var userpassWord = document.getElementById('password').value,
  79. userRePassWord = document.getElementById('password2').value;
  80. if(userpassWord != userRePassWord){
  81. mui.toast('两次密码输入不一致')
  82. }else if(userpassWord == '' || userRePassWord == ''){
  83. mui.toast('请将信息填写完整')
  84. }else{
  85. mui.ajax('http://192.168.1.11:8000/systemmanage_user_list',{
  86. data:{
  87. id: self.name,
  88. req: 'resetpwd',
  89. userName: document.getElementById('username').innerHTML,
  90. userpassWord: userpassWord,
  91. userRePassWord: userRePassWord,
  92. },
  93. dataType:'json',//服务器返回json格式数据
  94. type:'post',//HTTP请求类型
  95. timeout:10000,//超时时间设置为10秒;
  96. success:function(data){
  97. mui.alert("修改成功,点击确定关闭","重置密码","确定",function () {
  98. mui.back();
  99. });
  100. },
  101. error:function(xhr,type,errorThrown){
  102. console.log(type)
  103. }
  104. });
  105. }
  106. })
  107. })
  108. </script>
  109. </body>
  110. </html>