seimin 1 rok temu
rodzic
commit
9d41b2898e
1 zmienionych plików z 4 dodań i 1 usunięć
  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 313
   strongRegFlag = false; //强
314 314
   blurNewPwd(){
315 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 317
     this.enoughRegFlag = enoughReg.test(this.upModalData.newPwd);
318 318
     this.strongRegFlag = strongReg.test(this.upModalData.newPwd);
319 319
     this.mediumRegFlag = !this.enoughRegFlag && !this.strongRegFlag;
@@ -493,6 +493,9 @@ export class MainComponent implements OnInit {
493 493
   pwdAfterOpen(){
494 494
     this.passwordVisible = false;
495 495
     this.pwdIsOkLoading = false;
496
+    this.enoughRegFlag = true; //弱
497
+    this.mediumRegFlag = false; //中
498
+    this.strongRegFlag = false; //强
496 499
     this.upModalData = {
497 500
       userid: "",
498 501
       pwdOld: "",