feat: 仪表盘基本数据

This commit is contained in:
Junyan Qin
2024-11-10 00:05:47 +08:00
parent 15482e398b
commit 7cc55eab3e
5 changed files with 79 additions and 9 deletions

View File

@@ -8,7 +8,8 @@ export default createStore({
autoRefreshLog: false,
settingsPageTab: '',
version: 'v0.0.0',
debug: false
debug: false,
enabledPlatformCount: 0,
},
mutations: {
initializeFetch() {
@@ -17,6 +18,14 @@ export default createStore({
axios.get('/system/info').then(response => {
this.state.version = response.data.data.version
this.state.debug = response.data.data.debug
this.state.enabledPlatformCount = response.data.data.enabled_platform_count
})
},
fetchSystemInfo() {
axios.get('/system/info').then(response => {
this.state.version = response.data.data.version
this.state.debug = response.data.data.debug
this.state.enabledPlatformCount = response.data.data.enabled_platform_count
})
}
},