changePass.html 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  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.css" rel="stylesheet" />
  8. <script src="assets/js/jquery-3.1.0.js"></script>
  9. <script src="assets/js/jquery.base64.js"></script>
  10. <script src="CommonJS/Config_JS/Config_Load.js"></script>
  11. <script src="CommonJS/DBUtil_JS/WsCommonClassJava.js"></script>
  12. <script src="CommonJS/Data_ProcessJS/CommonData.js"></script>
  13. <script src="CommonJS/HTML_ElementCommonJS/Select_Common.js"></script>
  14. <script src="http://pv.sohu.com/cityjson?ie=utf-8"></script>
  15. <script src="js/recordAction.js"></script>
  16. <script src="js/mui.min.js"></script>
  17. <style>
  18. * {
  19. margin: 0;
  20. padding: 0;
  21. }
  22. html,
  23. body {
  24. width: 100%;
  25. height: 100%;
  26. overflow: hidden;
  27. }
  28. .logon_bg{
  29. position: absolute;
  30. width:100%;
  31. bottom: 0;
  32. }
  33. .mainDiv{
  34. top: 0;
  35. position: absolute;
  36. width: 100%;
  37. height: 100%;
  38. }
  39. .bak{
  40. width: 100%;
  41. height: 100%;
  42. }
  43. .loginmain{
  44. margin-top: 6.25rem;
  45. margin-left: 0.3125rem;
  46. margin-right: 0.3125rem;
  47. }
  48. .loginbtn{
  49. margin-top: 3.125rem;
  50. width: 95%;
  51. height: 2.5rem;
  52. margin-left: 0.3125rem;
  53. margin-right: 0.3125rem;
  54. }
  55. </style>
  56. <script>
  57. function changPassword(){
  58. var username = localStorage.getItem("username");
  59. if(username == undefined){
  60. mui.alert('用户尚未登录!', '系统提示', function() {});
  61. return;
  62. }
  63. var newpass = $("#newpass").val();
  64. var passconfirm = $("#passconfirm").val();
  65. if(newpass == ""||passconfirm == ""){
  66. mui.alert('请完整输入两次密码!', '系统提示', function() {});
  67. }else if(newpass != passconfirm){
  68. mui.alert('两次密码输入不一致!', '系统提示', function() {});
  69. }else{
  70. var btnArray = ['否', '是'];
  71. mui.confirm('是否确认更改密码?\n更改后下次登录必须使用新密码!', '系统提示', btnArray, function(e) {
  72. if (e.index == 1) {
  73. debugger
  74. var strSql = "update 系统用户信息表新 t set t.password='"+newpass+"' where t.mobile='"+username+"'";
  75. new WsCommonClass("QueryDataBaseJson",["sql"],[strSql],querySuccess,"queryUser");
  76. } else {
  77. }
  78. })
  79. }
  80. }
  81. function querySuccess(evt,keyvalue){
  82. // var result = evt.substr(76,evtlength);
  83. // var evtlength = evt.length-85;
  84. // result = result.substr(0,evtlength);
  85. // // var jsonData = JSON.parse(result);
  86. // var jsonObj = JSON.parse(result)
  87. // var jsonData = jsonObj[0].data;
  88. // if(jsonData != null){
  89. mui.toast("密码修改成功!");
  90. window.location="main.html";
  91. // }
  92. insertActionRecord('用户修改密码');
  93. }
  94. </script>
  95. </head>
  96. <body background="assets/image/login.png" style=" background-repeat:no-repeat ;background-size:100% 100%;background-attachment: fixed;">
  97. <script type="text/javascript">
  98. mui.init()
  99. </script>
  100. <!-- <div class="logon_bg">
  101. <img src="assets/image/login.png" class="bak"/>
  102. </div> -->
  103. <div class="mainDiv">
  104. <header class="mui-bar mui-bar-nav">
  105. <a id="back" class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
  106. <h1 class="mui-title">密码修改</h1>
  107. </header>
  108. <div class="mui-input-group loginmain" >
  109. <div class="mui-input-row">
  110. <label>新密码:</label>
  111. <input id="newpass" type="text" class="mui-input-clear" value="" placeholder="请输入新密码">
  112. </div>
  113. <div class="mui-input-row">
  114. <label>密码确认:</label>
  115. <input id="passconfirm" type="text" class="mui-input-clear" value="" placeholder="密码确认">
  116. </div>
  117. </div>
  118. <button type="button" class="mui-btn mui-btn-primary loginbtn" onclick="changPassword()" >提交 </button>
  119. </div>
  120. </body>
  121. </html>