瀏覽代碼

修改密码向下取整

chenjun 3 年之前
父節點
當前提交
5eaff08f94
共有 1 個文件被更改,包括 1 次插入3 次删除
  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('');