|
@@ -112,13 +112,19 @@ function bindModalEvent(){
|
|
|
})
|
|
|
$("#oldWord").off("input").on("input",function(){
|
|
|
const text = $(this).val();
|
|
|
- if($(".oldWaring.warning:visible").length){//有修改则隐藏报错
|
|
|
+ if($(".oldWaring.warning:visible").length){//有修改则隐藏原密码错误报错
|
|
|
$(".oldWaring.warning").hide();
|
|
|
if(!$(".waring:visible").length){ //无报错则激活保存按钮
|
|
|
$(".alertModal .sureChange").addClass("active");
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+ if(text.trim()===$("#newWord").val().trim()){
|
|
|
+ $(".newword b").text("原密码和新密码不能相同");
|
|
|
+ $(".newword").show();
|
|
|
+ return false
|
|
|
+ }else{
|
|
|
+ $(".newword.warning").hide();
|
|
|
+ }
|
|
|
if(text.trim()){
|
|
|
$("#newWord").attr("disabled",false);
|
|
|
}
|
|
@@ -207,8 +213,10 @@ function verifyPsdPart(){ //验证各密码关系规则
|
|
|
const confirmP = $("#sureWord").val()
|
|
|
if(oldP.trim()===newP.trim()){
|
|
|
$(".newword b").text("原密码和新密码不能相同");
|
|
|
- $(".newword").show();
|
|
|
+ $(".newword").show();
|
|
|
return false
|
|
|
+ }else{
|
|
|
+ $(".newword.warning").hide();
|
|
|
}
|
|
|
if(confirmP.trim()&&newP.trim()!==confirmP.trim()){
|
|
|
$(".sureword b").text("两次密码输入不一致");
|