mirror of
https://github.com/langbot-app/LangBot.git
synced 2025-11-25 19:37:36 +08:00
25 lines
567 B
JavaScript
25 lines
567 B
JavaScript
import { createStore } from 'vuex'
|
|
import router from '@/router'
|
|
import axios from 'axios'
|
|
|
|
export default createStore({
|
|
state: {
|
|
apiBaseUrl: 'http://localhost:5300/api/v1',
|
|
autoRefreshLog: false,
|
|
settingsPageTab: '',
|
|
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
|
|
})
|
|
}
|
|
},
|
|
actions: {},
|
|
})
|