seimin 1 year ago
parent
commit
9d41b2898e
1 changed files with 4 additions and 1 deletions
  1. 4 1
      src/app/views/main/main.component.ts

+ 4 - 1
src/app/views/main/main.component.ts

@@ -313,7 +313,7 @@ export class MainComponent implements OnInit {
313
   strongRegFlag = false; //强
313
   strongRegFlag = false; //强
314
   blurNewPwd(){
314
   blurNewPwd(){
315
     let enoughReg = /^.{0,6}$/;//密码强度-弱
315
     let enoughReg = /^.{0,6}$/;//密码强度-弱
316
-    let strongReg = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[\!\@\#\$\%\^\&\*])[a-zA-Z\d\!\@\#\$\%\^\&\*]{9,}$/;//密码强度-强
316
+    let strongReg = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[\!\@\#\$\%\^\&\*]).{9,}$/;//密码强度-强
317
     this.enoughRegFlag = enoughReg.test(this.upModalData.newPwd);
317
     this.enoughRegFlag = enoughReg.test(this.upModalData.newPwd);
318
     this.strongRegFlag = strongReg.test(this.upModalData.newPwd);
318
     this.strongRegFlag = strongReg.test(this.upModalData.newPwd);
319
     this.mediumRegFlag = !this.enoughRegFlag && !this.strongRegFlag;
319
     this.mediumRegFlag = !this.enoughRegFlag && !this.strongRegFlag;
@@ -493,6 +493,9 @@ export class MainComponent implements OnInit {
493
   pwdAfterOpen(){
493
   pwdAfterOpen(){
494
     this.passwordVisible = false;
494
     this.passwordVisible = false;
495
     this.pwdIsOkLoading = false;
495
     this.pwdIsOkLoading = false;
496
+    this.enoughRegFlag = true; //弱
497
+    this.mediumRegFlag = false; //中
498
+    this.strongRegFlag = false; //强
496
     this.upModalData = {
499
     this.upModalData = {
497
       userid: "",
500
       userid: "",
498
       pwdOld: "",
501
       pwdOld: "",