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()