Browse Source

密码加密传输

x-emr
bianyaqi 2 years ago
parent
commit
b80178b705
  1. 5
      src/page-subspecialty/views/modules/systemManagement/team/edit-password.vue
  2. 5
      src/page-subspecialty/views/modules/systemManagement/team/team-add-or-update.vue
  3. 2
      src/page-subspecialty/views/pages/login.vue

5
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)
}

5
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)
}

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

Loading…
Cancel
Save