guhongwei 4 lat temu
rodzic
commit
f580c6338d
2 zmienionych plików z 68 dodań i 11 usunięć
  1. 1 1
      src/views/index.vue
  2. 67 10
      src/views/meetingBrief/index.vue

+ 1 - 1
src/views/index.vue

@@ -39,7 +39,7 @@
               <i class="iconfont iconzhibo icon" style="color:#645FB9;"></i>
               <p style="color:#645FB9;">直播入口</p>
             </van-col>
-            <van-col span="8" class="btn" @click.native="$router.push({ path: '/meetingBrief/index', query: { type: '7' } })">
+            <van-col span="8" class="btn" @click.native="$router.push({ path: '/meetingBrief/detail', query: { type: '7' } })">
               <i class="iconfont iconzhibo icon" style="color:#00A8C4;"></i>
               <p style="color:#00A8C4;">联系客服</p>
             </van-col>

+ 67 - 10
src/views/meetingBrief/index.vue

@@ -6,16 +6,40 @@
           <NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
         </el-col>
         <el-col :span="24" class="main">
-          <span v-if="this.type == '7'">
-            <el-col :span="24">
-              联系客服
+          <el-col
+            :span="24"
+            class="newsList"
+            v-for="(item, index) in newsList"
+            :key="index"
+            @click.native="$router.push({ path: '/meetingBrief/detail', query: { type: item.type, id: item.id } })"
+          >
+            <el-col :span="8" class="image">
+              <el-image :src="item.filedir"></el-image>
             </el-col>
-          </span>
-          <span v-else>
-            <el-col :span="24" v-for="(item, index) in list" :key="index">
-              <p>{{ item.title }}</p>
+            <el-col :span="16" class="text">
+              <p class="title textOver">{{ item.title }}</p>
+              <p class="type">
+                {{
+                  item.type == '0'
+                    ? '会议简介'
+                    : item.type == '1'
+                    ? '会议日程'
+                    : item.type == '2'
+                    ? '主办方介绍'
+                    : item.type == '3'
+                    ? '协办方介绍'
+                    : item.type == '4'
+                    ? '专家介绍'
+                    : item.type == '5'
+                    ? '继续再教育申请表'
+                    : item.type == '6'
+                    ? '温馨提示'
+                    : '暂无'
+                }}
+              </p>
+              <p class="time">发布时间:{{ item.publish_time }}</p>
             </el-col>
-          </span>
+          </el-col>
         </el-col>
       </el-col>
     </el-row>
@@ -25,6 +49,7 @@
 <script>
 import { mapState, createNamespacedHelpers } from 'vuex';
 import NavBar from '@/layout/common/topInfo.vue';
+const { mapActions: news } = createNamespacedHelpers('news');
 export default {
   name: 'index',
   props: {},
@@ -39,14 +64,20 @@ export default {
       isleftarrow: '',
       // 返回
       navShow: true,
-      list: [],
+      newsList: [],
     };
   },
   created() {
     this.search();
   },
   methods: {
-    search() {},
+    ...news({ newsquery: 'query' }),
+    async search() {
+      let res = await this.newsquery({ type: this.type });
+      if (this.$checkRes(res)) {
+        this.$set(this, `newsList`, res.data);
+      }
+    },
   },
   computed: {
     ...mapState(['user']),
@@ -79,5 +110,31 @@ export default {
 }
 .main {
   min-height: 570px;
+  .newsList {
+    margin: 10px;
+    border-bottom: 1px dashed #ccc;
+    width: 95%;
+    .image {
+      .el-image {
+        border-radius: 10px;
+      }
+    }
+    .text {
+      padding: 0 10px;
+      .title {
+        padding: 10px 0;
+      }
+      .type {
+        font-size: 14px;
+        color: #ccc;
+        padding: 5px 0;
+      }
+      .time {
+        font-size: 14px;
+        color: #ccc;
+        padding: 5px 0;
+      }
+    }
+  }
 }
 </style>