Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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,
  35. .mui-input-row label~select,
  36. .mui-input-row label~textarea {
  37. margin-top: 1px;
  38. }
  39. </style>
  40. </head>
  41. <body>
  42. <header class="mui-bar mui-bar-nav">
  43. <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
  44. <h1 class="mui-title">修改密码</h1>
  45. </header>
  46. <div class="mui-content">
  47. <form class="mui-input-group">
  48. <div class="mui-input-row">
  49. <label>原密码</label>
  50. <input id='tboldpwd' type="password" class="mui-input-password mui-input" placeholder="请输入原密码">
  51. </div>
  52. <div class="mui-input-row">
  53. <label>新密码</label>
  54. <input id='tbnwepwd' type="password" class="mui-input-password mui-input" placeholder="请输入新密码">
  55. </div>
  56. <div class="mui-input-row">
  57. <label>新密码</label>
  58. <input id='tbnwepwd2' type="password" class="mui-input-password mui-input" placeholder="请输入新密码">
  59. </div>
  60. </form>
  61. <div class="mui-content-padded">
  62. <button id='btchange' class="mui-btn mui-btn-block mui-btn-primary">立即修改</button>
  63. </div>
  64. </div>
  65. <script src="js/mui.min.js"></script>
  66. <script src="js/serverurl.js"></script>
  67. <script src="js/userinfos.js"></script>
  68. <script>
  69. (function($, doc) {
  70. $.init();
  71. $.plusReady(function() {
  72. CheckLogin();
  73. document.getElementById("btchange").addEventListener("tap", function() {
  74. if(document.getElementById("tboldpwd").value == "") {
  75. plus.nativeUI.toast('修改失败!请输入原密码。');
  76. return;
  77. }
  78. if(document.getElementById("tbnwepwd").value == "" || document.getElementById("tbnwepwd").value.length < 6) {
  79. plus.nativeUI.toast('修改失败!请输入至少6位的新密码。');
  80. return;
  81. }
  82. if(document.getElementById("tbnwepwd").value!=document.getElementById("tbnwepwd2").value) {
  83. plus.nativeUI.toast('修改失败!两次输入的新密码不相同。');
  84. return;
  85. }
  86. //更新服务端
  87. plus.nativeUI.showWaiting("加载中...");
  88. var param={
  89. userid:users.ID,
  90. oldpwd:document.getElementById("tboldpwd").value,
  91. newpwd:document.getElementById("tbnwepwd").value
  92. }
  93. mui.post(api+'/user/updatePwdStu',{data:JSON.stringify(param)},function(res){
  94. plus.nativeUI.closeWaiting();
  95. if(res.code=="200"){
  96. plus.webview.currentWebview().close();
  97. plus.nativeUI.toast('修改成功。');
  98. }else{
  99. plus.nativeUI.toast("您输入的原密码不正确。");
  100. }
  101. },'json')
  102. });
  103. });
  104. }(mui, document));
  105. </script>
  106. </body>
  107. </html>