portal html css js resource

emaiFindPwdOk.js 2.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. $(function() {
  2. loginStatus(); //判断个人是否登录
  3. $("#gophone").on("click",function(){
  4. location.href = "pwdFindNew.html?slef=1";
  5. })
  6. })
  7. var passwordPass = false;
  8. var passwordPass2 = false;
  9. /*校验密码找回按钮显示状态*/
  10. function checkLoginButtn(_this) {
  11. var newPassword = $(_this).parents(".cmpCoverUl").find("#newPassword").val();
  12. var newPasswordok = $(_this).parents(".cmpCoverUl").find("#newPasswordok").val();
  13. if(newPassword == "" || newPasswordok == "") {
  14. $(_this).parents(".cmpCoverUl").find("#paswSubmit").attr("disabled", true);
  15. } else {
  16. $(_this).parents(".cmpCoverUl").find("#paswSubmit").attr("disabled", false);
  17. }
  18. }
  19. /*获取焦点*/
  20. function getFocus(_this) {
  21. $(_this).next().find("span").text("");
  22. $(_this).removeClass("frmmsg-warning");
  23. }
  24. //校验登录密码
  25. function passwordVal(_this) {
  26. var passwd = $(_this).val();
  27. var passwd2 = $("#newPassword").val();
  28. if(passwd.length == "") {
  29. $(_this).next().find("span").text("请设置您的登录密码");
  30. $(_this).addClass("frmmsg-warning");
  31. } else if(passwd.length < 6) {
  32. $(_this).next().find("span").text("密码由6-24个字符组成,区分大小写");
  33. $(_this).addClass("frmmsg-warning");
  34. } else if(passwd != passwd2) {
  35. $(_this).next().find("span").text("两次输入不一致,请重新输入");
  36. $(_this).addClass("frmmsg-warning");
  37. } else {
  38. $(_this).next().find("span").text("");
  39. $(_this).removeClass("frmmsg-warning");
  40. passwordPass = true;
  41. }
  42. }
  43. function resetPassword(_this) {
  44. console.log(passwordPass)
  45. if(passwordPass ==false) {
  46. return;
  47. }
  48. var mailCode = GetQueryString('sc');
  49. var oldPassword = $("#newPasswordok").val();
  50. if(passwordPass) {
  51. $.ajax("/ajax/resetPasswordWith", {
  52. type: "post",
  53. success: function(data) {
  54. console.log(data);
  55. if(data.success) {
  56. if(data.data == true) {
  57. location.href = "pwdResult.html?num=1";
  58. } else {
  59. $(_this).next().find("span").text("重置密码失败");
  60. }
  61. } else {
  62. location.href = "pwdResult.html?num=0";
  63. }
  64. },
  65. error: function() {
  66. $.MsgBox.Alert('消息', '服务器链接失败');
  67. },
  68. data: {
  69. "state": mailCode,
  70. "pw": oldPassword
  71. },
  72. dataType: 'json'
  73. });
  74. }
  75. }