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