|
|
|
@ -155,7 +155,7 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
created() { |
|
|
|
this.form = { userId: this.user.id, lastname: this.user.lastname, sex: this.user.sex, mobile: this.user.mobile, email: this.user.email } |
|
|
|
this.form = { id: this.user.id, lastname: this.user.lastname, sex: this.user.sex, mobile: this.user.mobile, email: this.user.email } |
|
|
|
store.dispatch('GetInfo').then(() => {}) |
|
|
|
if (this.$route.query) { |
|
|
|
this.activeIndex = this.$route.query.activeIndex |
|
|
|
@ -180,9 +180,15 @@ export default { |
|
|
|
this.$refs['form'].validate((valid) => { |
|
|
|
if (valid) { |
|
|
|
this.saveLoading = true |
|
|
|
editUser(this.form).then(() => { |
|
|
|
this.editSuccessNotify() |
|
|
|
editUser(this.form).then((res) => { |
|
|
|
console.log('res', res) |
|
|
|
if (res.data !== null) { |
|
|
|
this.$message({ message: '修改成功,请重新登录', type: 'success', offset: 8 }) |
|
|
|
store.dispatch('GetInfo').then(() => {}) |
|
|
|
} else { |
|
|
|
this.$message({ message: res.message, type: 'error', offset: 8 }) |
|
|
|
} |
|
|
|
this.editSuccessNotify() |
|
|
|
this.saveLoading = false |
|
|
|
}).catch(() => { |
|
|
|
this.saveLoading = false |
|
|
|
|