perf: 优化查看账号密码控制台报错问题

This commit is contained in:
“huailei000”
2023-10-16 14:59:55 +08:00
committed by huailei
parent e274640d2e
commit 031016330a

View File

@@ -119,9 +119,11 @@ export default {
const url = `/api/v1/accounts/account-secrets/${this.account.id}/histories/?limit=1`
this.$axios.get(url, { disableFlashErrorMsg: true }).then(resp => {
this.versions = resp.count
this.showSecretDialog()
})
} else {
this.showSecretDialog()
}
this.showSecretDialog()
},
methods: {
accountConfirmHandle() {
@@ -138,8 +140,8 @@ export default {
this.$message.success(this.$tc('common.updateSuccessMsg'))
})
},
showSecretDialog(res) {
return this.$axios.get(this.url, { disableFlashErrorMsg: true }).then(() => {
showSecretDialog() {
return this.$axios.get(this.url, { disableFlashErrorMsg: true }).then((res) => {
this.secretInfo = res
this.sshKeyFingerprint = res?.spec_info?.ssh_key_fingerprint || '-'
this.showSecret = true