From 19d44be7553554c7532ee1f4ef9ddd7fac331498 Mon Sep 17 00:00:00 2001 From: liangping <18786721@qq.com> Date: Thu, 25 Aug 2022 12:36:20 +0800 Subject: [PATCH] add app version --- src/libs/fetch.js | 2 +- src/views/Parameters.vue | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/libs/fetch.js b/src/libs/fetch.js index 0e0c59c6..e4e0135d 100644 --- a/src/libs/fetch.js +++ b/src/libs/fetch.js @@ -56,7 +56,7 @@ export default class ChainFetch { } async getNodeInfo() { - return this.get('/node_info') + return this.get('/cosmos/base/tendermint/v1beta1/node_info') } async getLatestBlock(config = null) { diff --git a/src/views/Parameters.vue b/src/views/Parameters.vue index 67e00162..8de24752 100644 --- a/src/views/Parameters.vue +++ b/src/views/Parameters.vue @@ -38,6 +38,12 @@ + + + + + + @@ -50,6 +56,7 @@ import { } from '@/libs/utils' import ParametersModuleComponent from './components/parameters/ParametersModuleComponent.vue' +import ObjectFieldComponent from './components/ObjectFieldComponent.vue' export default { components: { @@ -58,6 +65,7 @@ export default { BAlert, BCard, ParametersModuleComponent, + ObjectFieldComponent, }, data() { return { @@ -94,6 +102,8 @@ export default { title: 'Governance Parameters', items: [], }, + appVersion: null, + nodeVersion: null, } }, created() { @@ -161,6 +171,10 @@ export default { this.$set(this.gov, 'items', items) }) } + this.$http.getNodeInfo().then(res => { + this.appVersion = res.application_version + this.nodeVersion = res.default_node_info + }) }, methods: { normalize(data, title) {