From b80178b70574faec890c69b99affa81c78a3e6d9 Mon Sep 17 00:00:00 2001 From: bianyaqi Date: Thu, 24 Aug 2023 17:38:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=86=E7=A0=81=E5=8A=A0=E5=AF=86=E4=BC=A0?= =?UTF-8?q?=E8=BE=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/modules/systemManagement/team/edit-password.vue | 5 ++++- .../modules/systemManagement/team/team-add-or-update.vue | 5 +++-- src/page-subspecialty/views/pages/login.vue | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/page-subspecialty/views/modules/systemManagement/team/edit-password.vue b/src/page-subspecialty/views/modules/systemManagement/team/edit-password.vue index 1da1573..fed14fc 100644 --- a/src/page-subspecialty/views/modules/systemManagement/team/edit-password.vue +++ b/src/page-subspecialty/views/modules/systemManagement/team/edit-password.vue @@ -77,7 +77,10 @@ export default { if (!valid) { return false } - this.$http.put('/sys/user/updateOtherPassword', this.dataForm).then(({ data: res }) => { + const param = { ...this.dataForm } + param.newPassword = this.$md5(param.newPassword) + param.confirmPassword = this.$md5(param.confirmPassword) + this.$http.put('/sys/user/updateOtherPassword', param).then(({ data: res }) => { if (res.code !== 0) { return this.$message.error(res.msg) } diff --git a/src/page-subspecialty/views/modules/systemManagement/team/team-add-or-update.vue b/src/page-subspecialty/views/modules/systemManagement/team/team-add-or-update.vue index ccb4973..a0564ca 100644 --- a/src/page-subspecialty/views/modules/systemManagement/team/team-add-or-update.vue +++ b/src/page-subspecialty/views/modules/systemManagement/team/team-add-or-update.vue @@ -307,12 +307,13 @@ export default { }, // 表单提交 dataFormSubmitHandle: debounce(function() { - console.log(this.dataForm) this.$refs.dataForm.validate((valid) => { if (!valid) { return false } - this.$http[!this.dataForm.id ? 'post' : 'put']('/sys/user', this.dataForm).then(({ data: res }) => { + const param = { ...this.dataForm } + param.password = this.$md5(param.password) + this.$http[!this.dataForm.id ? 'post' : 'put']('/sys/user', param).then(({ data: res }) => { if (res.code !== 0) { return this.$message.error(res.msg) } diff --git a/src/page-subspecialty/views/pages/login.vue b/src/page-subspecialty/views/pages/login.vue index 18f855a..3de4c02 100644 --- a/src/page-subspecialty/views/pages/login.vue +++ b/src/page-subspecialty/views/pages/login.vue @@ -104,7 +104,7 @@ export default { const params = { ...this.dataForm } - params.password = this.$Base64.encode(this.dataForm.password) + params.password = this.$md5(this.dataForm.password) this.$http.post('/login', params).then(({ data: res }) => { if (res.code !== 0) { this.getCaptcha()