feat: 修改密码时进行二次确认
This commit is contained in:
parent
ea8445a676
commit
26895e0c57
|
@ -66,6 +66,9 @@
|
|||
<el-form-item :label="$t('member.new_password')" prop="newpassword">
|
||||
<el-input v-model="ruleForm.newpassword" autocomplete="off" show-password/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('member.repeat_password')" prop="repeatPassword">
|
||||
<el-input v-model="ruleForm.repeatPassword" autocomplete="off" show-password/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<ms-dialog-footer
|
||||
|
@ -139,6 +142,15 @@
|
|||
message: this.$t('member.password_format_is_incorrect'),
|
||||
trigger: 'blur'
|
||||
},
|
||||
],
|
||||
repeatPassword: [
|
||||
{required: true, message: this.$t('user.input_password'), trigger: 'blur'},
|
||||
{
|
||||
required: true,
|
||||
pattern: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[^]{8,30}$/,
|
||||
message: this.$t('member.password_format_is_incorrect'),
|
||||
trigger: 'blur'
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -188,6 +200,10 @@
|
|||
updatePassword(editPasswordForm) {
|
||||
this.$refs[editPasswordForm].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.ruleForm.newpassword !== this.ruleForm.repeatPassword) {
|
||||
this.$warning(this.$t('member.inconsistent_passwords'));
|
||||
return;
|
||||
}
|
||||
this.result = this.$post(this.updatePasswordPath, this.ruleForm, response => {
|
||||
this.$success(this.$t('commons.modify_success'));
|
||||
this.editPasswordVisible = false;
|
||||
|
|
|
@ -219,6 +219,8 @@ export default {
|
|||
password_format_is_incorrect: 'Valid password: 8-30 digits, English upper and lower case letters + numbers + special characters (optional)',
|
||||
old_password: 'Old Password',
|
||||
new_password: 'New Password',
|
||||
repeat_password: 'Repeat',
|
||||
inconsistent_passwords: 'The two passwords entered are inconsistent',
|
||||
remove_member: 'Are you sure you want to remove this member',
|
||||
input_id_or_email: 'Please enter user ID, or user Email',
|
||||
no_such_user: 'Without this user information, please enter the correct user ID or user Email!',
|
||||
|
|
|
@ -219,6 +219,8 @@ export default {
|
|||
password_format_is_incorrect: '有效密码:8-30位,英文大小写字母+数字+特殊字符(可选)',
|
||||
old_password: '旧密码',
|
||||
new_password: '新密码',
|
||||
repeat_password: '确认密码',
|
||||
inconsistent_passwords: '两次输入的密码不一致',
|
||||
remove_member: '确定要移除该成员吗',
|
||||
input_id_or_email: '请输入用户 ID, 或者 用户邮箱',
|
||||
no_such_user: '无此用户信息, 请输入正确的用户 ID 或者 用户邮箱!',
|
||||
|
|
|
@ -217,6 +217,8 @@ export default {
|
|||
password_format_is_incorrect: '有效密碼:8-30 位,英文大小寫字母+數位+特殊字元(可選)',
|
||||
old_password: '舊密碼',
|
||||
new_password: '新密碼',
|
||||
repeat_password: '確認密碼',
|
||||
inconsistent_passwords: '兩次輸入的密碼不一致',
|
||||
remove_member: '確定要移除該成員嗎',
|
||||
input_id_or_email: '請輸入用戶 ID, 或者 用戶郵箱',
|
||||
no_such_user: '無此用戶信息, 請輸入正確的用戶 ID 或者 用戶郵箱!',
|
||||
|
|
Loading…
Reference in New Issue