Browse Source

修改密码向下取整

chenjun 3 years ago
parent
commit
5eaff08f94
1 changed files with 1 additions and 3 deletions
  1. 1 3
      src/utils/validate.js

+ 1 - 3
src/utils/validate.js

@@ -120,11 +120,9 @@ export function pwdProduce(minLen, maxLen, struc) {
   const pwdLen = randomNum(minLen, maxLen)
   const datas = []
 
-
-
   if (pwdStruc.length) {
     let typeLong = Number(pwdStruc[0]) + Number(pwdStruc[1]) + Number(pwdStruc[2]) + Number(pwdStruc[3]);
-    let passLong = Math.ceil(pwdLen / typeLong);
+    let passLong = Math.floor(pwdLen / typeLong);
     let dis = "";
     if (pwdStruc[0] == 1) {
       let arr = alphabet.toLocaleUpperCase().split('');