|
@@ -79,6 +79,11 @@ $(document).ready(() => {
|
|
|
if (!/^[0-9a-zA-Z*~!@&%$^\\(\\)#_\[\]\-\+={}|?'":,<>.`]+$/.test(resetPassword)) {
|
|
|
throw '密码只支持英文数字及符号';
|
|
|
}
|
|
|
+ // 判断新密码的强度
|
|
|
+ const reg = /^(?![0-9]+$)(?![a-zA-Z]+$).{6,16}$/;
|
|
|
+ if (!reg.test(resetPassword)) {
|
|
|
+ throw '请设置至少包含数字和字母的密码';
|
|
|
+ }
|
|
|
const btn = $(this);
|
|
|
$.ajax({
|
|
|
url: '/setting/user/reset/password',
|