perf: 首页展示版本信息

This commit is contained in:
Junyan Qin
2024-10-14 21:18:36 +08:00
parent 231dca956d
commit 1fbc92bc6d
10 changed files with 90 additions and 11 deletions

View File

@@ -6,8 +6,18 @@ export default createStore({
state: {
apiBaseUrl: 'http://localhost:5300/api/v1',
autoRefreshLog: false,
version: '0.0.1'
version: 'v0.0.0',
debug: false
},
mutations: {
initializeFetch() {
axios.defaults.baseURL = this.state.apiBaseUrl
axios.get('/system/info').then(response => {
this.state.version = response.data.data.version
this.state.debug = response.data.data.debug
})
}
},
mutations: {},
actions: {},
})