diff --git a/src/utils/validate.js b/src/utils/validate.js
index 9b5804f..34ffa06 100644
--- a/src/utils/validate.js
+++ b/src/utils/validate.js
@@ -89,6 +89,6 @@ export function isArray(arg) {
// 密码规则:8-20位,必须包含字母、数字、特殊字符中的两种
export function validPassword(str) {
- const reg = /^((?=.*[A-Za-z])(?=.*\d)|(?=.*[A-Za-z])(?=.*[!@#$%^&*()_+\-\=])|(?=.*\d)(?=.*[!@#$%^&*()_+\-\=]))[A-Za-z\d!@#$%^&*()_+\-\=]{8,20}$/
+ const reg = /^(?!.*(?:111|888|123|234|345|456|567|678|789|1234|2345|3456|4567|5678|6789|12345|23456|34567|45678|56789|abc|abcd|abcde|abcdef|abcdefg|qwe|qwer|qwert|qwerty|asdf|asdfg|asdfgh|password|passw0rd|letmein|welcome|admin|user|test|pass|root|login))(?=.*[A-Z])(?=.*[a-z])(?=.*\d)(?=.*[!@#$%^&*()_+{}\[\]:;"'|\\,.<>\/?~-]).{8,16}$/
return reg.test(str)
}
\ No newline at end of file
diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue
index 3973303..2e226c1 100644
--- a/src/views/system/user/index.vue
+++ b/src/views/system/user/index.vue
@@ -836,8 +836,10 @@ export default {
confirmButtonText: '确定',
cancelButtonText: '取消',
closeOnClickModal: false,
- inputPattern: /^.{5,20}$/,
- inputErrorMessage: '用户密码长度必须介于 5 和 20 之间',
+ inputPattern:
+ /^(?!.*(?:111|888|123|234|345|456|567|678|789|1234|2345|3456|4567|5678|6789|12345|23456|34567|45678|56789|abc|abcd|abcde|abcdef|abcdefg|qwe|qwer|qwert|qwerty|asdf|asdfg|asdfgh|password|passw0rd|letmein|welcome|admin|user|test|pass|root|login))(?=.*[A-Z])(?=.*[a-z])(?=.*\d)(?=.*[!@#$%^&*()_+{}\[\]:;"'|\\,.<>\/?~-]).{8,16}$/,
+ inputErrorMessage:
+ '请设置8到16位,由字母、数字、特殊字符3种组合,且数字不可连续的密码',
})
.then(({ value }) => {
const password = encrypt(value)
diff --git a/src/views/system/user/profile/resetPwd.vue b/src/views/system/user/profile/resetPwd.vue
index 962e83a..796acca 100644
--- a/src/views/system/user/profile/resetPwd.vue
+++ b/src/views/system/user/profile/resetPwd.vue
@@ -1,83 +1,127 @@
-
-
-
-
-
-
-
-
-
-
-
- 保存
- 关闭
-
-
+
+
+
+
+
+
+
+
+
+
+
+ 保存
+ 关闭
+
+