|
@@ -3,14 +3,14 @@ import Vuex from 'vuex';
|
|
|
import _ from 'lodash';
|
|
|
Vue.use(Vuex);
|
|
|
const api = {
|
|
|
- test: `/api/serviceStudy/test`,
|
|
|
+ info: `/api/hc/user`,
|
|
|
};
|
|
|
const state = () => ({});
|
|
|
const mutations = {};
|
|
|
|
|
|
const actions = {
|
|
|
async query({ commit }, { skip = 0, limit, ...info } = {}) {
|
|
|
- const res = await this.$axios.$get(`${api.test}`, {
|
|
|
+ const res = await this.$axios.$get(`${api.info}`, {
|
|
|
skip,
|
|
|
limit,
|
|
|
...info,
|
|
@@ -18,20 +18,20 @@ const actions = {
|
|
|
return res;
|
|
|
},
|
|
|
async create({ commit }, payload) {
|
|
|
- const res = await this.$axios.$post(`${api.test}`, payload);
|
|
|
+ const res = await this.$axios.$post(`${api.info}`, payload);
|
|
|
return res;
|
|
|
},
|
|
|
async fetch({ commit }, payload) {
|
|
|
- const res = await this.$axios.$get(`${api.test}/${payload}`);
|
|
|
+ const res = await this.$axios.$get(`${api.info}/${payload}`);
|
|
|
return res;
|
|
|
},
|
|
|
async update({ commit }, { id, ...data }) {
|
|
|
- const res = await this.$axios.$post(`${api.test}/update/${id}`, data);
|
|
|
+ const res = await this.$axios.$post(`${api.info}/update/${id}`, data);
|
|
|
return res;
|
|
|
},
|
|
|
|
|
|
async delete({ commit }, payload) {
|
|
|
- const res = await this.$axios.$delete(`${api.test}/${payload}`);
|
|
|
+ const res = await this.$axios.$delete(`${api.info}/${payload}`);
|
|
|
return res;
|
|
|
},
|
|
|
};
|