portal html css js resource

emaiFindPwdOk.js 2.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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. var mailCode = GetQueryString('sc');
  45. var oldPassword = $("#newPasswordok").val();
  46. if(passwordPass) {
  47. $.ajax("/ajax/resetPasswordWith", {
  48. type: "post",
  49. success: function(data) {
  50. console.log(data);
  51. if(data.success) {
  52. if(data.data == true) {
  53. location.href = "pwdResult.html?num=1";
  54. } else {
  55. $(_this).next().find("span").text("重置密码失败");
  56. }
  57. } else {
  58. location.href = "pwdResult.html?num=0";
  59. }
  60. },
  61. error: function() {
  62. $.MsgBox.Alert('消息', '服务器链接失败');
  63. },
  64. data: {
  65. "state": mailCode,
  66. "pw": oldPassword
  67. },
  68. dataType: 'json'
  69. });
  70. }
  71. }