// store/index.js import { createStore } from '../../libraries/vuex.js'; import axios from '../../libraries/axios.js'; const store = createStore({ state() { return { data: null, error: null, param1: 'value1', param2: 'value2' }; }, mutations: { setData(state, payload) { state.data = payload; }, setError(state, error) { state.error = error; }, setParam1(state, value) { state.param1 = value; }, setParam2(state, value) { state.param2 = value; } }, actions: { async sendData({ state, commit }) { const params = { param1: state.param1, param2: state.param2 }; try { const response = await axios.post('https://example.com/api/endpoint', params); commit('setData', response.data); } catch (error) { commit('setError', error); } } } }); export default store;