Browse Source

fix: 对password进行加密传输

master
niushuai233 2 years ago
parent
commit
ccb078d66e
  1. 6
      src/views/modules/tunnel/modules/ServerInfoModal.vue

6
src/views/modules/tunnel/modules/ServerInfoModal.vue

@ -39,6 +39,7 @@
<script> <script>
import { httpAction } from '@/api/manage' import { httpAction } from '@/api/manage'
import EncryptUtil from '@/utils/encryption/encrypt'
export default { export default {
name: 'ServerInfoModal', name: 'ServerInfoModal',
@ -47,6 +48,7 @@ export default {
title: '操作', title: '操作',
visible: false, visible: false,
model: {}, model: {},
password: '',
labelCol: { labelCol: {
xs: { span: 24 }, xs: { span: 24 },
sm: { span: 5 } sm: { span: 5 }
@ -81,6 +83,7 @@ export default {
}, },
edit(record) { edit(record) {
this.model = Object.assign({}, record) this.model = Object.assign({}, record)
this.password = this.model.password;
if (this.model.status || this.model.status == 1) { if (this.model.status || this.model.status == 1) {
this.model.status = true this.model.status = true
} else { } else {
@ -114,6 +117,9 @@ export default {
} else { } else {
params.status = 0 params.status = 0
} }
if (this.password != params.password) {
params.password = EncryptUtil.encrypt(params.password);
}
let success = true; let success = true;
httpAction(httpurl, params, method) httpAction(httpurl, params, method)
.then(res => { .then(res => {

Loading…
Cancel
Save