mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-25 22:44:13 +00:00
perf: 账户更新加密
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
<script>
|
||||
import Dialog from '@/components/Dialog'
|
||||
import { UpdateToken, UploadKey } from '@/components/FormFields'
|
||||
import { encryptPassword } from '@/utils/crypto'
|
||||
export default {
|
||||
name: 'UpdateSecretInfo',
|
||||
components: {
|
||||
@@ -61,10 +62,10 @@ export default {
|
||||
handleConfirm() {
|
||||
const data = {}
|
||||
if (this.authInfo.password !== '') {
|
||||
data.password = this.authInfo.password
|
||||
data.password = encryptPassword(this.authInfo.password)
|
||||
}
|
||||
if (this.authInfo.private_key !== '') {
|
||||
data.private_key = this.authInfo.private_key
|
||||
data.private_key = encryptPassword(this.authInfo.private_key)
|
||||
if (this.authInfo.passphrase) data.passphrase = this.authInfo.passphrase
|
||||
}
|
||||
this.$axios.patch(
|
||||
|
||||
@@ -146,9 +146,7 @@ export default {
|
||||
vm.showUpdateSecretDialog = false
|
||||
setTimeout(() => {
|
||||
vm.showUpdateSecretDialog = true
|
||||
console.log('Show update1: ', vm.showUpdateSecretDialog)
|
||||
})
|
||||
console.log('Show update2: ', vm.showUpdateSecretDialog)
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user