|
@@ -74,6 +74,7 @@ import {stringIsBlank} from "@/utils/blank-utils";
|
|
|
import {BizException, ExceptionEnum} from "@/utils/BizException";
|
|
|
import {checkVerificationCodeV2, sendAVerificationCode} from "@/api/login";
|
|
|
import {useCompRef} from "@/utils/useCompRef";
|
|
|
+import {checkPasswordStrength} from "@/components/system/password-layer";
|
|
|
|
|
|
const props = defineProps<{
|
|
|
codeRs: string
|
|
@@ -102,6 +103,15 @@ const rules = {
|
|
|
code: [{required: true, message: '请输入验证码', trigger: 'blur'}],
|
|
|
newPwd: [
|
|
|
{required: true, message: '请输入新密码', trigger: 'blur'},
|
|
|
+ {
|
|
|
+ validator: function (rule, value, callback) {
|
|
|
+ if (!checkPasswordStrength(form.newPwd)) {
|
|
|
+ callback(new Error("密码强度太弱"));
|
|
|
+ } else {
|
|
|
+ callback();
|
|
|
+ }
|
|
|
+ }, trigger: 'change'
|
|
|
+ },
|
|
|
{
|
|
|
validator: function (rule, value, callback) {
|
|
|
if (/[\u4E00-\u9FA5]/g.test(value)) {
|