English name

This commit is contained in:
2024-10-29 09:57:14 +08:00
parent a67e52d60d
commit 62a4f2769a
6 changed files with 57 additions and 15 deletions

View File

@@ -123,7 +123,7 @@
<el-form-item label="Confirm password :" prop="repassword">
<el-input v-model="addForm.repassword" type="password"></el-input>
</el-form-item>
<el-form-item label="Realname :" prop="realname">
<el-form-item label="English name :" prop="realname">
<el-input v-model="addForm.realname"></el-input>
</el-form-item>
<el-form-item label="Phone :" prop="phone">
@@ -315,6 +315,10 @@
// 检测邮箱弹出框
handleAdd() {
this.emailForm = {
mark_new: ''
}
this.email_num = 0
this.emailVisible = true
},
@@ -359,6 +363,7 @@
this.email_num = 1
this.emailForm.mark_new = 'Account already exist!'
} else {
this.addForm={}
this.addForm.email = this.emailForm.email
this.addForm.account = this.emailForm.account
this.email_num = 2
@@ -386,6 +391,16 @@
this.$refs.addTab.validate((valid) => {
if (valid) {
if (this.addForm.password == this.addForm.repassword) {
if (this.$validateString(this.addForm.realname)) {
console.log('Input string is valid.');
} else {
console.log('Input string is invalid.');
this.$message.error(this.$t('info.realname'))
return false
}
this.$api
.post('api/User/addUser', this.addForm)
.then(res => {