perf: 账户更新加密

This commit is contained in:
ibuler
2022-05-16 19:10:07 +08:00
committed by Jiangjie.Bai
parent 91d0f6f92b
commit c604957e66
2 changed files with 3 additions and 4 deletions

View File

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

View File

@@ -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)
}
}
]