wxy преди 4 години
родител
ревизия
f92ee6b2cb
променени са 3 файла, в които са добавени 62 реда и са изтрити 63 реда
  1. 5 0
      src/store/index.js
  2. 41 0
      src/store/live/newsroadshow.js
  3. 16 63
      src/views/live/parts/videoDetail.vue

+ 5 - 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 newsroadshow from './live/newsroadshow';
 import newsguidance from './live/newsguidance';
 
 // 科技超市
@@ -22,6 +24,7 @@ import transaction from './market/transaction';
 import productpact from './market/productpact';
 // 登录用户表
 import authUser from './user/auth-user';
+
 // 公共
 import * as ustate from '@/store/common/state';
 import * as umutations from '@/store/common/mutations';
@@ -38,6 +41,8 @@ export default new Vuex.Store({
     dock,
     place,
     chat,
+    // 项目路演
+    newsroadshow,
     // 科技超市
     product,
     exportuser,

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

@@ -0,0 +1,41 @@
+import Vue from 'vue';
+import Vuex from 'vuex';
+import _ from 'lodash';
+Vue.use(Vuex);
+const api = {
+  newsInfo: `/api/live/newsroadshow`,
+};
+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,
+};

+ 16 - 63
src/views/live/parts/videoDetail.vue

@@ -42,7 +42,11 @@
               <el-col :span="24" class="two">
                 <el-col :span="24" class="twoList" v-for="(item, index) in expertList" :key="index">
                   <el-col :span="5" class="image">
-                    <el-image :src="item.expertimage" style="width:70px;height: 70px;border: 1px solid #f1f1f1;" v-if="item.expertimage != ''"></el-image>
+                    <el-image
+                      :src="item.expertimage"
+                      style="width:70px;height: 70px;border: 1px solid #f1f1f1;"
+                      v-if="item.expertimage != null || undefined"
+                    ></el-image>
                     <el-image :src="expertimage" style="width:70px;height: 70px;border: 1px solid #f1f1f1;" v-else></el-image>
                   </el-col>
                   <el-col :span="19" class="info1">
@@ -57,16 +61,6 @@
             </van-tab>
             <van-tab title="嘉宾访谈">
               <div class="jiabinlist">
-                <!-- <ul>
-                  <li v-for="(ref, index) in zxzdlist" :key="index">
-                    <img :src="ref.picture" />
-                    <p>
-                      <span class="textOver" @click="$router.push({ path: '/hall/zxzdxmly/zxzdDetail', query: { id: ref.id } })">{{ ref.title }}</span>
-                      <span>{{ ref.publish_time }}</span>
-                      <span class="text">{{ ref.titlejj }} </span>
-                    </p>
-                  </li>
-                </ul> -->
                 <el-col :span="24" class="jiabin" v-for="(item, index) in zxzdlist" :key="index">
                   <el-col :span="4" class="img4">
                     <img :src="item.picture" style="width: 100%; height: 100%" />
@@ -98,6 +92,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: newsroadshow } = createNamespacedHelpers('newsroadshow');
 const { mapActions: newsguidance } = createNamespacedHelpers('newsguidance');
 import moment from 'moment';
 export default {
@@ -109,7 +104,9 @@ export default {
   },
   data: function() {
     return {
-      infoactive: 0,
+      infoactive: 4,
+      // 项目路演
+      xmlyList: [],
       //科技需求
       twoList: [],
       //技术成果
@@ -137,6 +134,7 @@ export default {
     ...dock({ dockQuery: 'query', dockFetch: 'fetch' }),
     ...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);
@@ -151,8 +149,11 @@ export default {
         var chanpinData = czxmNew.filter(item => item.type === '1');
         if (chanpinData) this.$set(this, `demandList`, chanpinData);
         // 专家智库
-        let exportdata = await this.expertQuery({ role: 6, limit: 6 });
+        let exportdata = await this.expertQuery({ role: 6 });
         if (this.$checkRes(exportdata)) this.$set(this, `expertList`, exportdata.data);
+        // 项目路演
+        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({ dock_id: this.dock_id, role: 6, limit: 6 });
         if (this.$checkRes(jbftData)) this.$set(this, `zxzdlist`, jbftData.data);
@@ -277,6 +278,8 @@ export default {
   .tab {
     background-color: #fff;
     .two {
+      height: 510px;
+      overflow-y: auto;
       .twoList {
         padding: 5px 0px;
         // font-size: 14px;
@@ -336,56 +339,6 @@ export default {
         }
       }
     }
-    // .jiabinlist .jiabin {
-    //   float: left;
-    //   width: 100%;
-    //   height: 475px;
-    //   overflow: auto;
-    //   li {
-    //     float: left;
-    //     width: 100%;
-    //     border-bottom: 1px dashed #ff8500;
-    //     padding: 16px 0;
-    //     img {
-    //       float: left;
-    //       width: 20%;
-    //       height: 80px;
-    //     }
-    //     p {
-    //       float: left;
-    //       width: 71%;
-    //       padding: 0 0 0 10px;
-    //       span:first-child {
-    //         float: left;
-    //         width: 70%;
-    //         font-size: 18px;
-    //       }
-    //       span:first-child:hover {
-    //         cursor: pointer;
-    //       }
-    //       span:last-child {
-    //         float: left;
-    //         width: 100%;
-    //         font-size: 14px;
-    //         color: #888;
-    //         overflow: hidden;
-    //         text-overflow: ellipsis;
-    //         -webkit-line-clamp: 3;
-    //         word-break: break-all;
-    //         display: -webkit-box;
-    //         -webkit-box-orient: vertical;
-    //       }
-    //     }
-    //   }
-    //   li:last-child {
-    //     border-bottom: none;
-    //     float: left;
-    //     width: 100%;
-    //   }
-    //   li:hover p span:first-child {
-    //     color: #0e90d2;
-    //   }
-    // }
   }
 }
 /deep/.video-js {