guhongwei 3 jaren geleden
bovenliggende
commit
a2480aea5d
2 gewijzigde bestanden met toevoegingen van 1 en 44 verwijderingen
  1. 0 42
      src/store/chat.js
  2. 1 2
      src/store/index.js

+ 0 - 42
src/store/chat.js

@@ -1,42 +0,0 @@
-import Vue from 'vue';
-import Vuex from 'vuex';
-import _ from 'lodash';
-Vue.use(Vuex);
-const api = {
-  chat: `/capi/chat`,
-};
-const state = () => ({});
-const mutations = {};
-
-const actions = {
-  async query({ commit }, { skip = 0, limit, ...info } = {}) {
-    const res = await this.$axios.$get(`${api.chat}`, {
-      skip,
-      limit,
-      ...info,
-    });
-    return res;
-  },
-  async create({ commit }, payload) {
-    const res = await this.$axios.$post(`${api.chat}`, payload);
-    return res;
-  },
-  async fetch({ commit }, payload) {
-    const res = await this.$axios.$get(`${api.chat}/${payload}`);
-    return res;
-  },
-  async update({ commit }, { id, ...data }) {
-    const res = await this.$axios.$post(`${api.chat}/update/${id}`, data);
-    return res;
-  },
-  async delete({ commit }, payload) {
-    const res = await this.$axios.$delete(`${api.chat}/${payload}`);
-    return res;
-  },
-};
-export default {
-  namespaced: true,
-  state,
-  mutations,
-  actions,
-};

+ 1 - 2
src/store/index.js

@@ -1,7 +1,6 @@
 import Vue from 'vue';
 import Vuex from 'vuex';
 import customer from './customer';
-import chat from './chat';
 import * as ustate from './user/state';
 import * as umutations from './user/mutations';
 Vue.use(Vuex);
@@ -10,5 +9,5 @@ export default new Vuex.Store({
   state: { ...ustate, _tenant: 'platform' },
   mutations: { ...umutations },
   actions: {},
-  modules: { customer, chat },
+  modules: { customer },
 });