From a304eadc65bad61610b7c48f9250c009c271d46e Mon Sep 17 00:00:00 2001 From: Romesum Date: Wed, 13 May 2020 15:24:31 +0800 Subject: [PATCH] =?UTF-8?q?[style][V]=EF=BC=9A=E7=AE=80=E5=8C=96=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/supManager/userEditForm.vue | 22 ++++--------------- 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/element-vue/src/components/supManager/userEditForm.vue b/element-vue/src/components/supManager/userEditForm.vue index 1f59fa7..dcbf905 100644 --- a/element-vue/src/components/supManager/userEditForm.vue +++ b/element-vue/src/components/supManager/userEditForm.vue @@ -69,30 +69,16 @@ await showDialog("确定要" + (this.edit ? '编辑' : '新增') + '吗?', this) //编辑提交 if (this.edit) { - await post('lb/user/updateUser', { - nickname: this.userForm.nickname, - tel: this.userForm.tel, - email: this.userForm.email, - username: this.userForm.username, - office: this.userForm.office, - position: parseInt(this.userForm.position), - uId: this.userForm.uid - }).catch(async e => { + // 与后端字段保持一致 + this.userForm.uId = this.userForm.uid + await post('lb/user/updateUser', this.userForm).catch(async e => { await showFail(e.msg, this) await stop() }) showSuccess('编辑完成', this) } else { // 新增提交 - await post('lb/user/addUser', { - nickname: this.userForm.nickname, - tel: this.userForm.tel, - email: this.userForm.email, - username: this.userForm.username, - office: this.userForm.office, - position: parseInt(this.userForm.position), - password: this.userForm.password - }).catch(async e => { + await post('lb/user/addUser', this.userForm).catch(async e => { await showFail(e.msg, this) await stop() })