guhongwei 4 年之前
父節點
當前提交
d8733b27fa
共有 3 個文件被更改,包括 49 次插入1 次删除
  1. 4 0
      src/store/index.js
  2. 41 0
      src/store/live/newsguidance.js
  3. 4 1
      src/views/live/parts/videoDetail.vue

+ 4 - 0
src/store/index.js

@@ -6,6 +6,8 @@ import chat from './live/chat';
 import apply from './live/apply';
 // 项目路演
 import newsroadshow from './live/newsroadshow';
+import newsguidance from './live/newsguidance';
+
 // 科技超市
 import product from './market/product';
 import exportuser from './market/exportuser';
@@ -58,5 +60,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 - 1
src/views/live/parts/videoDetail.vue

@@ -88,7 +88,7 @@ const { mapActions: dock } = createNamespacedHelpers('dock');
 const { mapActions: exportuser } = createNamespacedHelpers('exportuser');
 const { mapActions: marketuser } = createNamespacedHelpers('marketuser');
 const { mapActions: newsroadshow } = createNamespacedHelpers('newsroadshow');
-
+const { mapActions: newsguidance } = createNamespacedHelpers('newsguidance');
 import moment from 'moment';
 export default {
   name: 'videoDetail',
@@ -128,6 +128,7 @@ export default {
     ...exportuser({ expertQuery: 'query' }),
     ...marketuser({ operaFetch: 'operaFetch' }),
     ...newsroadshow({ newsroadshowquery: 'query' }),
+    ...newsguidance({ danceQuery: 'query' }),
     async seachInfo({ skip = 0, limit = 5, ...info } = {}) {
       let res = await this.dockFetch(this.id);
       if (this.$checkRes(res)) {
@@ -146,6 +147,8 @@ export default {
         // 项目路演
         let xmly = await this.newsroadshowquery({ dock_id: res.data.id });
         if (this.$checkRes(xmly)) this.$set(this, `xmlyList`, xmly.data);
+        //嘉宾访谈dock id
+        let jbftData = await this.danceQuery();
       }
     },
     // 文字/视频倒计时