|
@@ -4,13 +4,18 @@ import _ from 'lodash';
|
|
Vue.use(Vuex);
|
|
Vue.use(Vuex);
|
|
const api = {
|
|
const api = {
|
|
onliveInfo: `/api/onlive/user`,
|
|
onliveInfo: `/api/onlive/user`,
|
|
|
|
+ registerInfo: `/api/onlive/register`,
|
|
};
|
|
};
|
|
const state = () => ({});
|
|
const state = () => ({});
|
|
const mutations = {};
|
|
const mutations = {};
|
|
|
|
|
|
const actions = {
|
|
const actions = {
|
|
async query({ commit }, { skip = 0, limit = 10, ...info } = {}) {
|
|
async query({ commit }, { skip = 0, limit = 10, ...info } = {}) {
|
|
- const res = await this.$axios.$get(api.onliveInfo, { skip, limit, ...info });
|
|
|
|
|
|
+ const res = await this.$axios.$get(api.onliveInfo, {
|
|
|
|
+ skip,
|
|
|
|
+ limit,
|
|
|
|
+ ...info,
|
|
|
|
+ });
|
|
return res;
|
|
return res;
|
|
},
|
|
},
|
|
async create({ commit }, payload) {
|
|
async create({ commit }, payload) {
|
|
@@ -29,6 +34,10 @@ const actions = {
|
|
const res = await this.$axios.$delete(`${api.onliveInfo}/${payload}`);
|
|
const res = await this.$axios.$delete(`${api.onliveInfo}/${payload}`);
|
|
return res;
|
|
return res;
|
|
},
|
|
},
|
|
|
|
+ async register({ commit }, payload) {
|
|
|
|
+ const res = await this.$axios.$post(`${api.registerInfo}`, payload);
|
|
|
|
+ return res;
|
|
|
|
+ },
|
|
};
|
|
};
|
|
|
|
|
|
export default {
|
|
export default {
|