user_view.js 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /****************************************** 自定义函数 ********************************************************************************/
  2. var winHandle;
  3. var value;
  4. var te;
  5. var ff=false;
  6. function callBackFunc(json) {
  7. if (json != null && json.success != null) {
  8. if(json.success=="0"){
  9. winHandle = openSecondMessageWindow("修改成功!重新登录后生效!",prjContextPath,"");
  10. ff=true;
  11. }else{
  12. winHandle = openSecondMessageWindow("旧密码不正确!",prjContextPath,"");
  13. }
  14. } else {
  15. winHandle = openSecondMessageWindow("修改失败!",prjContextPath,"");
  16. }
  17. }
  18. //系统提示消息窗口关闭方法
  19. function closeSysMes(){
  20. if(winHandle!=null){
  21. winHandle.reset();
  22. }
  23. if(ff){
  24. ff=false;
  25. parent.close_handle();
  26. }
  27. }
  28. //确定
  29. function save() {
  30. var loginname=document.getElementById("loginname").value;
  31. var loginpwd=document.getElementById("loginpwd").value;
  32. var newloginpwd=document.getElementById("newloginpwd").value;
  33. var qrloginpwd=document.getElementById("qrloginpwd").value;
  34. if(trim(loginpwd) == ''){
  35. winHandle = openSecondMessageWindow("请填写密码",prjContextPath,"");
  36. return;
  37. }
  38. if((fucCheckLength(loginpwd)!= 6)){
  39. winHandle = openSecondMessageWindow("请输入6位字符的密码",prjContextPath,"");
  40. return false;
  41. }
  42. if(trim(newloginpwd) == ''){
  43. winHandle = openSecondMessageWindow("请填写新密码!",prjContextPath,"");
  44. return;
  45. }
  46. if((fucCheckLength(newloginpwd)!= 6)){
  47. winHandle = openSecondMessageWindow("请输入6位字符的新密码",prjContextPath,"");
  48. return false;
  49. }
  50. if(trim(qrloginpwd) == ''){
  51. winHandle = openSecondMessageWindow("请填写确认密码!",prjContextPath,"");
  52. return;
  53. }
  54. if((fucCheckLength(qrloginpwd)!= 6)){
  55. winHandle = openSecondMessageWindow("请输入6位字符的确认密码",prjContextPath,"");
  56. return false;
  57. }
  58. if(newloginpwd!=qrloginpwd){
  59. winHandle = openSecondMessageWindow("新密码与确认密码不一致!",prjContextPath,"");
  60. return false;
  61. }
  62. $.post(prjContextPath+"/permissionsAction!updatepwd.action", {loginname:loginname,
  63. loginpwd:loginpwd,
  64. newloginpwd:newloginpwd
  65. }, callBackFunc);
  66. }
  67. function closeWindow(){
  68. parent.passwordSetwindowClose();
  69. }