소스 검색

Merge branch 'master' of http://git.cc-lotus.info/service-platform/web-test into master

wxy 4 년 전
부모
커밋
ab2bae526d
2개의 변경된 파일44개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      src/store/index.js
  2. 42 0
      src/store/live/channelVideo.js

+ 2 - 0
src/store/index.js

@@ -25,6 +25,7 @@ import dock from './live/dock';
 import apply from './live/apply';
 import market from './market/market';
 import channel from './live/channel';
+import channelvideo from './live/channelVideo';
 // 专家
 import expertsuser from './market/exportuser';
 // 产品
@@ -76,6 +77,7 @@ export default new Vuex.Store({
     apply,
     market,
     channel,
+    channelvideo,
     // 专家
     expertsuser,
     // 产品

+ 42 - 0
src/store/live/channelVideo.js

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