|
@@ -391,7 +391,7 @@ const data = reactive({
|
|
rules: {
|
|
rules: {
|
|
userName: [{ required: true, message: "用户名称不能为空", trigger: "blur" }, { min: 2, max: 20, message: "用户名称长度必须介于 2 和 20 之间", trigger: "blur" }],
|
|
userName: [{ required: true, message: "用户名称不能为空", trigger: "blur" }, { min: 2, max: 20, message: "用户名称长度必须介于 2 和 20 之间", trigger: "blur" }],
|
|
nickName: [{ required: true, message: "用户昵称不能为空", trigger: "blur" }],
|
|
nickName: [{ required: true, message: "用户昵称不能为空", trigger: "blur" }],
|
|
- password: [{ required: true, message: "用户密码不能为空", trigger: "blur" }, { min: 5, max: 20, message: "用户密码长度必须介于 5 和 20 之间", trigger: "blur" }],
|
|
|
|
|
|
+ password: [{ required: true, message: "用户密码不能为空", trigger: "blur" }, { min: 5, max: 20, message: "用户密码长度必须介于 5 和 20 之间", trigger: "blur" }, { pattern: /^[^<>"'|\\]+$/, message: "不能包含非法字符:< > \" ' \\\ |", trigger: "blur" }],
|
|
email: [{ type: "email", message: "请输入正确的邮箱地址", trigger: ["blur", "change"] }],
|
|
email: [{ type: "email", message: "请输入正确的邮箱地址", trigger: ["blur", "change"] }],
|
|
phonenumber: [{ pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, message: "请输入正确的手机号码", trigger: "blur" }]
|
|
phonenumber: [{ pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, message: "请输入正确的手机号码", trigger: "blur" }]
|
|
}
|
|
}
|
|
@@ -494,6 +494,11 @@ function handleResetPwd(row) {
|
|
closeOnClickModal: false,
|
|
closeOnClickModal: false,
|
|
inputPattern: /^.{5,20}$/,
|
|
inputPattern: /^.{5,20}$/,
|
|
inputErrorMessage: "用户密码长度必须介于 5 和 20 之间",
|
|
inputErrorMessage: "用户密码长度必须介于 5 和 20 之间",
|
|
|
|
+ inputValidator: (value) => {
|
|
|
|
+ if (/<|>|"|'|\||\\/.test(value)) {
|
|
|
|
+ return "不能包含非法字符:< > \" ' \\\ |"
|
|
|
|
+ }
|
|
|
|
+ },
|
|
}).then(({ value }) => {
|
|
}).then(({ value }) => {
|
|
resetUserPwd(row.userId, value).then(response => {
|
|
resetUserPwd(row.userId, value).then(response => {
|
|
proxy.$modal.msgSuccess("修改成功,新密码是:" + value);
|
|
proxy.$modal.msgSuccess("修改成功,新密码是:" + value);
|