guhongwei vor 4 Jahren
Ursprung
Commit
08f43ca8c7
3 geänderte Dateien mit 105 neuen und 4 gelöschten Zeilen
  1. 5 0
      src/store/index.js
  2. 41 0
      src/store/live/newsroadshow.js
  3. 59 4
      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 product from './market/product';
 import exportuser from './market/exportuser';
@@ -20,6 +22,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';
@@ -36,6 +39,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,
+};

+ 59 - 4
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">
@@ -56,7 +60,19 @@
               </el-col>
             </van-tab>
             <van-tab title="嘉宾访谈">嘉宾访谈</van-tab>
-            <van-tab title="项目路演">项目路演</van-tab>
+            <van-tab title="项目路演">
+              <el-col :span="24" class="xmly">
+                <el-col :span="24" class="xmlylist" v-for="(item, index) in xmlyList" :key="index">
+                  <el-col :span="17" class="name textOver">
+                    {{ item.title }}
+                  </el-col>
+                  <el-col :span="7" class="date">{{ item.publish_time }} </el-col>
+                  <el-col :span="24" class="jianjie">
+                    {{ item.titlejj }}
+                  </el-col>
+                </el-col>
+              </el-col>
+            </van-tab>
           </van-tabs>
         </el-col>
       </el-col>
@@ -71,6 +87,8 @@ 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');
+
 import moment from 'moment';
 export default {
   name: 'videoDetail',
@@ -81,7 +99,9 @@ export default {
   },
   data: function() {
     return {
-      infoactive: 0,
+      infoactive: 4,
+      // 项目路演
+      xmlyList: [],
       //科技需求
       twoList: [],
       //技术成果
@@ -107,6 +127,7 @@ export default {
     ...dock({ dockQuery: 'query', dockFetch: 'fetch' }),
     ...exportuser({ expertQuery: 'query' }),
     ...marketuser({ operaFetch: 'operaFetch' }),
+    ...newsroadshow({ newsroadshowquery: 'query' }),
     async seachInfo({ skip = 0, limit = 5, ...info } = {}) {
       let res = await this.dockFetch(this.id);
       if (this.$checkRes(res)) {
@@ -120,8 +141,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);
       }
     },
     // 文字/视频倒计时
@@ -242,6 +266,8 @@ export default {
   .tab {
     background-color: #fff;
     .two {
+      height: 510px;
+      overflow-y: auto;
       .twoList {
         padding: 5px 0px;
         // font-size: 14px;
@@ -269,6 +295,35 @@ export default {
         padding: 6px 0px 1px 20px;
       }
     }
+    // 项目路演
+    .xmly {
+      height: 510px;
+      overflow-y: auto;
+      padding: 5px 10px;
+      .xmlylist {
+        border-bottom: 1px dashed #ccc;
+        padding: 0px 0 8px 0;
+        margin: 0 0 5px 0;
+        .name {
+          font-size: 18px;
+          font-weight: bold;
+        }
+        .date {
+          font-size: 16px;
+          text-align: right;
+        }
+        .jianjie {
+          height: 45px;
+          font-size: 16px;
+          overflow: hidden;
+          text-overflow: ellipsis;
+          -webkit-line-clamp: 2;
+          word-break: break-all;
+          display: -webkit-box;
+          -webkit-box-orient: vertical;
+        }
+      }
+    }
   }
 }
 /deep/.video-js {