|
@@ -2,9 +2,9 @@
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
<el-form-item label="用户昵称" prop="nickName">
|
|
|
<el-input v-model="form.nickName" maxlength="30" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="手机号码" prop="phonenumber">
|
|
|
- <el-input v-model="form.phonenumber" maxlength="11" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="手机号码" prop="mobile">
|
|
|
+ <el-input v-model="form.mobile" maxlength="11" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="邮箱" prop="email">
|
|
|
<el-input v-model="form.email" maxlength="50" />
|
|
@@ -47,7 +47,7 @@ export default {
|
|
|
trigger: ["blur", "change"]
|
|
|
}
|
|
|
],
|
|
|
- phonenumber: [
|
|
|
+ mobile: [
|
|
|
{ required: true, message: "手机号码不能为空", trigger: "blur" },
|
|
|
{
|
|
|
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
|
|
@@ -62,7 +62,7 @@ export default {
|
|
|
user: {
|
|
|
handler(user) {
|
|
|
if (user) {
|
|
|
- this.form = { nickName: user.nickName, phonenumber: user.phonenumber, email: user.email, sex: user.sex };
|
|
|
+ this.form = { id:user.id, nickName: user.nickName, mobile: user.mobile, email: user.email, sex: user.sex };
|
|
|
}
|
|
|
},
|
|
|
immediate: true
|
|
@@ -74,7 +74,7 @@ export default {
|
|
|
if (valid) {
|
|
|
updateUserProfile(this.form).then(response => {
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
- this.user.phonenumber = this.form.phonenumber;
|
|
|
+ this.user.mobile = this.form.mobile;
|
|
|
this.user.email = this.form.email;
|
|
|
});
|
|
|
}
|