Browse Source

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

guhongwei 4 years ago
parent
commit
f5d793439a
1 changed files with 34 additions and 75 deletions
  1. 34 75
      src/views/technical/index.vue

+ 34 - 75
src/views/technical/index.vue

@@ -77,7 +77,7 @@
                 </el-col>
               </el-col>
               <el-col :span="24" class="leftDown">
-                <el-col :span="24" class="rInfoList" v-for="(item, index) in hangyeList" :key="index">
+                <el-col :span="24" class="rInfoList" v-for="(item, index) in jiabinList" :key="index">
                   <p>
                     <span class="r-text" @click="$router.push({ path: '/technical/list', query: { type: '3', column_name: '嘉宾访谈', id: item._id } })">{{
                       item.title
@@ -134,83 +134,14 @@ export default {
     return {
       gongqiuImage: require('@/assets/live/main3.png'),
       iconImage: require('@/assets/live/square_big.png'),
-      zhuanjiaList: [
-        // {
-        //   title: '我是标题1',
-        //   publish_time: '2020-10-6',
-        //   titlejj:
-        //     '借款方绝大部分绝对是部分机电设备借款方绝大部分绝对是部分机电设备借款方绝大部分绝对是部分机电设备借款方绝大部分绝对是部分机电设备借款方绝大部分绝对是部分机电设备借款方绝大部分绝对是部分机电设备',
-        // },
-        // {
-        //   title: '我是标题1',
-        //   publish_time: '2020-10-6',
-        //   titlejj: '借款方绝大部分绝对是部分机电设备借款方绝大部分绝对是部分机电设备',
-        // },
-        // {
-        //   title: '我是标题1',
-        //   publish_time: '2020-10-6',
-        //   titlejj: '借款方绝大部分绝对是部分机电设备借款方绝大部分绝对是部分机电设备',
-        // },
-        // {
-        //   title: '我是标题1',
-        //   publish_time: '2020-10-6',
-        //   titlejj: '借款方绝大部分绝对是部分机电设备借款方绝大部分绝对是部分机电设备',
-        // },
-      ],
-      hangyeList: [
-        {
-          title: '我是标题1',
-          publish_time: '2020-10-6',
-        },
-        {
-          title: '我是标题1',
-          publish_time: '2020-10-6',
-        },
-        {
-          title: '我是标题1',
-          publish_time: '2020-10-6',
-        },
-        {
-          title: '我是标题1',
-          publish_time: '2020-10-6',
-        },
-        {
-          title: '我是标题1',
-          publish_time: '2020-10-6',
-        },
-        {
-          title: '我是标题1',
-          publish_time: '2020-10-6',
-        },
-        {
-          title: '我是标题1',
-          publish_time: '2020-10-6',
-        },
-        {
-          title: '我是标题1',
-          publish_time: '2020-10-6',
-        },
-        {
-          title: '我是标题1',
-          publish_time: '2020-10-6',
-        },
-        {
-          title: '我是标题1',
-          publish_time: '2020-10-6',
-        },
-        {
-          title: '我是标题1',
-          publish_time: '2020-10-6',
-        },
-
-        {
-          title: '我是标题1',
-          publish_time: '2020-10-6',
-        },
-      ],
+      zhuanjiaList: [],
+      hangyeList: [],
       luyanlist: [],
+      zhidaolist: [],
       //栏目列表
       columnLists: [],
+      //嘉宾栏目列表
+      jiabinList: [],
     };
   },
   created() {
@@ -228,17 +159,45 @@ export default {
         this.$set(this, `columnLists`, res.data);
         this.searchList();
       }
+      const jiabin = await this.danceQuery({ ...info });
+      // console.log(jiabin);
+      if (this.$checkRes(jiabin)) {
+        this.$set(this, `jiabinList`, jiabin.data);
+        this.searchList();
+      }
+      const luyan = await this.adshowQuery({ ...info });
+      if (this.$checkRes(luyan)) {
+        this.$set(this, `luyanlist`, luyan.data);
+        this.searchList();
+      }
     },
+    //查询列表
     async searchList() {
       let column = this.columnLists;
+      let list1 = this.jiabinList;
+      let list2 = this.luyanlist;
       for (const i of column) {
         if (i.name == '专家问诊') {
           const res = await this.newsList({ skip: 0, limit: 5, column_id: i._id });
           if (this.$checkRes(res)) {
             this.$set(this, `zhuanjiaList`, res.data);
           }
+        } else if (i.name == '行业研究') {
+          const res = await this.newsList({ skip: 0, limit: 5, column_id: i._id });
+          if (this.$checkRes(res)) {
+            this.$set(this, `hangyeList`, res.data);
+          }
         }
       }
+      if (this.$checkRes(list1)) {
+        // console.log(list1);
+        this.$set(this, `jiabinList`, list1);
+        console.log(this.jiabinList);
+      }
+      if (this.$checkRes(list2)) {
+        this.$set(this, `luyanlist`, list2);
+        console.log(this.luyanlist);
+      }
     },
   },
   // 过滤时间