wxy 4 年之前
父节点
当前提交
7f7945538e
共有 3 个文件被更改,包括 49 次插入0 次删除
  1. 4 0
      src/store/index.js
  2. 41 0
      src/store/live/newsguidance.js
  3. 4 0
      src/views/live/parts/videoDetail.vue

+ 4 - 0
src/store/index.js

@@ -4,6 +4,8 @@ import Vuex from 'vuex';
 import dock from './live/dock';
 import chat from './live/chat';
 import apply from './live/apply';
+import newsguidance from './live/newsguidance';
+
 // 科技超市
 import product from './market/product';
 import exportuser from './market/exportuser';
@@ -53,5 +55,7 @@ export default new Vuex.Store({
     apply,
     // 登录用户表
     authUser,
+    //嘉宾访谈
+    newsguidance,
   },
 });

+ 41 - 0
src/store/live/newsguidance.js

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

+ 4 - 0
src/views/live/parts/videoDetail.vue

@@ -71,6 +71,7 @@ import textVideo from '@/components/parts/textVideo.vue';
 const { mapActions: dock } = createNamespacedHelpers('dock');
 const { mapActions: exportuser } = createNamespacedHelpers('exportuser');
 const { mapActions: marketuser } = createNamespacedHelpers('marketuser');
+const { mapActions: newsguidance } = createNamespacedHelpers('newsguidance');
 import moment from 'moment';
 export default {
   name: 'videoDetail',
@@ -107,6 +108,7 @@ export default {
     ...dock({ dockQuery: 'query', dockFetch: 'fetch' }),
     ...exportuser({ expertQuery: 'query' }),
     ...marketuser({ operaFetch: 'operaFetch' }),
+    ...newsguidance({ danceQuery: 'query' }),
     async seachInfo({ skip = 0, limit = 5, ...info } = {}) {
       let res = await this.dockFetch(this.id);
       if (this.$checkRes(res)) {
@@ -122,6 +124,8 @@ export default {
         // 专家智库
         let exportdata = await this.expertQuery({ role: 6, limit: 6 });
         if (this.$checkRes(exportdata)) this.$set(this, `expertList`, exportdata.data);
+        //嘉宾访谈dock id
+        let jbftData = await this.danceQuery();
       }
     },
     // 文字/视频倒计时