浏览代码

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

wuhongyu 5 年之前
父节点
当前提交
144f57c46b
共有 5 个文件被更改,包括 141 次插入85 次删除
  1. 二进制
      src/assets/video.mp4
  2. 7 0
      src/router/index.js
  3. 128 0
      src/views/detail/eduDetail.vue
  4. 2 2
      src/views/service/index.vue
  5. 4 83
      src/views/technical/index.vue

二进制
src/assets/video.mp4


+ 7 - 0
src/router/index.js

@@ -19,6 +19,13 @@ const live = [
         name: 'live_detail',
         component: () => import('../views/detail/detail.vue'),
       },
+      // 教育培训
+      {
+        path: '/live/eduDetail',
+        meta: { title: '信息详情', subSite: true },
+        name: 'live_eduDetail',
+        component: () => import('../views/detail/eduDetail.vue'),
+      },
       {
         path: '/market/index',
         name: 'market_index',

+ 128 - 0
src/views/detail/eduDetail.vue

@@ -0,0 +1,128 @@
+<template>
+  <div id="eduDetail" style="background-color: #F5F5F54f;">
+    <div class="w_0100">
+      <div class="w_1200">
+        <div class="detailmain">
+          <div class="detailtop">
+            <span>{{ detailinfo.title }}</span>
+          </div>
+          <div class="detailtopleft">
+            <span>时间:{{ detailinfo.publish_time }}&nbsp;&nbsp;&nbsp;&nbsp;来源:{{ detailinfo.orgin }}</span>
+          </div>
+          <div class="detailimage" v-if="detailinfo.picture">
+            <img :src="detailinfo.picture" class="detailimg" />
+          </div>
+          <div class="detailVideo">
+            <video :src="videoUrl" controls="controls">
+              您的浏览器不支持 video 标签。
+            </video>
+          </div>
+          <div class="detailcontext">
+            {{ detailinfo.content }}
+          </div>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: news } = createNamespacedHelpers('news');
+export default {
+  name: 'eduDetail',
+  props: {},
+  components: {},
+  data: () => {
+    return {
+      img: {
+        top_bg: require('@/assets/live/top_bg.png'),
+        logo: require('@/assets/live/logo.png'),
+        img1: require('@/assets/live/1.jpg'),
+      },
+      detailinfo: {},
+      videoUrl: require('@/assets/video.mp4'),
+    };
+  },
+  created() {
+    this.search();
+  },
+  methods: {
+    ...news(['fetch']),
+    async search() {
+      console.log(this.id);
+
+      const res = await this.fetch(this.id);
+      this.$set(this, `detailinfo`, res.data);
+    },
+  },
+  computed: {
+    id() {
+      return this.$route.query.id;
+    },
+    ...mapState(['user']),
+    pageTitle() {
+      return `${this.$route.meta.title}`;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+};
+</script>
+
+<style lang="less" scoped>
+@import '~@/style/style.css';
+.detailmain {
+  margin: 15px 0 15px 0;
+  box-shadow: 0 0 10px #2d64b3;
+  border-radius: 10px;
+  min-height: 800px;
+}
+
+.detailtop {
+  padding: 20px 0px;
+  font-size: 18px;
+  line-height: 40px;
+  font-weight: normal;
+  text-align: left;
+  margin: 0;
+  text-align: center;
+  color: #005293;
+}
+
+.detailtopleft {
+  text-align: center;
+  padding: 0 0 10px 0;
+  border-bottom: 1px solid #ccc;
+  font-size: 16px;
+  color: #666666;
+}
+
+.detailimage {
+  text-align: center;
+  padding: 20px 0 0 0;
+}
+.detailVideo {
+  float: left;
+  width: 100%;
+  text-align: center;
+  height: 400px;
+  overflow: hidden;
+  margin: 20px 0;
+}
+.detailVideo video {
+  height: 400px;
+  width: 50%;
+  border: 1px dashed #ccc;
+}
+
+.detailimg {
+  width: 500px;
+  height: 300px;
+}
+
+.detailcontext {
+  padding: 20px 40px 60px 40px;
+}
+</style>

+ 2 - 2
src/views/service/index.vue

@@ -10,7 +10,7 @@
                 <ul>
                   <li class="zhengwuList" v-for="(item, index) in zhengwuList" :key="index">
                     <a href="">
-                      <el-image :src="item.pic"></el-image>
+                      <el-image style="width:64px;height:64px;" :src="item.pic"></el-image>
                       <p>{{ item.title }}</p>
                     </a>
                   </li>
@@ -21,7 +21,7 @@
                 <ul>
                   <li class="serviceList" v-for="(item, index) in serviceList" :key="index">
                     <a href="">
-                      <el-image :src="item.pic"></el-image>
+                      <el-image style="width:64px;height:64px;" :src="item.pic"></el-image>
                       <p>{{ item.title }}</p>
                     </a>
                   </li>

+ 4 - 83
src/views/technical/index.vue

@@ -1,37 +1,6 @@
 <template>
   <div id="technical">
     <el-col :span="24" class="main">
-      <!-- <el-col :span="12" class="left">
-        <el-col :span="1" class="leftTitle">
-          <p>专<br />题<br />研<br />讨</p>
-          <p></p>
-        </el-col>
-        <el-col :span="23" class="infoLeft">
-          <el-col class="infoLeftList" :span="24" v-for="(item, index) in zhuantiList" :key="index">
-            <p>{{ item.publish_time }}</p>
-            <p>
-              <span @click="clickzhuanti(item.id)" class="textOver">{{ item.title }}</span>
-              <span>{{ item.content }}</span>
-            </p>
-          </el-col>
-        </el-col>
-        <el-col :span="24" class="leftListDown"><span></span><span @click="turnToList('专题研讨')">MORE</span></el-col>
-      </el-col>
-      <el-col :span="12" class="right">
-        <el-col :span="24" class="rightListTop"><span @click="turnToList('技术问答')">MORE</span><span></span></el-col>
-        <el-col :span="23" class="infoRight">
-          <el-col class="infoRightList" :span="24" v-for="(item, index) in jishuList" :key="index">
-            <p>
-              <span class="textOver" @click="clickjishu(item.id)">{{ item.title }}</span
-              ><span class="textOver">{{ item.publish_time }}</span>
-            </p>
-          </el-col>
-        </el-col>
-        <el-col :span="1" class="rightTitle">
-          <p></p>
-          <p>技<br />术<br />问<br />答</p>
-        </el-col>
-      </el-col> -->
       <el-col :span="12" class="left">
         <el-col :span="24" class="downLeftTop">
           <el-image :src="downLeftTopImage"></el-image>
@@ -48,7 +17,7 @@
           <el-col class="infoLeftList" :span="24" v-for="(item, index) in zhuantiList" :key="index">
             <p>{{ item.publish_time }}</p>
             <p>
-              <span @click="clickzhuanti(item.id)" class="textOver">{{ item.title }}</span>
+              <span @click="$router.push({ path: '/live/detail', query: { id: item.id } })" class="textOver">{{ item.title }}</span>
               <span>{{ item.content }}</span>
             </p>
           </el-col>
@@ -69,7 +38,7 @@
         <el-col :span="23" class="infoRight">
           <el-col class="infoRightList" :span="24" v-for="(item, index) in jishuList" :key="index">
             <p>
-              <span class="textOver" @click="clickjishu(item.id)">{{ item.title }}</span
+              <span class="textOver" @click="$router.push({ path: '/live/detail', query: { id: item.id } })">{{ item.title }}</span
               ><span class="textOver">{{ item.publish_time }}</span>
             </p>
           </el-col>
@@ -93,7 +62,7 @@
         <el-col :span="24" class="infoLeft">
           <el-col class="infoRightList" :span="24" v-for="(item, index) in hangyeList" :key="index">
             <p>
-              <span class="textOver" @click="clickhangye(item.id)">{{ item.title }}</span
+              <span class="textOver" @click="$router.push({ path: '/live/detail', query: { id: item.id } })">{{ item.title }}</span
               ><span class="textOver">{{ item.publish_time }}</span>
             </p>
           </el-col>
@@ -115,43 +84,12 @@
           <el-col class="infoLeftList" :span="24" v-for="(item, index) in jiaoyuList" :key="index">
             <p>{{ item.publish_time }}</p>
             <p>
-              <span class="textOver" @click="clickjiaoyu(item.id)">{{ item.title }}</span>
+              <span class="textOver" @click="$router.push({ path: '/live/eduDetail', query: { id: item.id } })">{{ item.title }}</span>
               <span>{{ item.content }}</span>
             </p>
           </el-col>
         </el-col>
       </el-col>
-      <!-- <el-col :span="12" class="left">
-        <el-col :span="1" class="leftTitle">
-          <p>行<br />业<br />研<br />究</p>
-          <p></p>
-        </el-col>
-        <el-col :span="23" class="infoRight">
-          <el-col class="infoRightList" :span="24" v-for="(item, index) in hangyeList" :key="index">
-            <p>
-              <span class="textOver" @click="clickhangye(item.id)">{{ item.title }}</span
-              ><span class="textOver">{{ item.publish_time }}</span>
-            </p>
-          </el-col>
-        </el-col>
-        <el-col :span="24" class="leftListDown"><span></span><span @click="turnToList('行业研究')">MORE</span></el-col>
-      </el-col>
-      <el-col :span="12" class="right">
-        <el-col :span="24" class="rightListTop"><span @click="turnToList('教育培训')">MORE</span><span></span></el-col>
-        <el-col :span="23" class="infoLeft">
-          <el-col class="infoLeftList" :span="24" v-for="(item, index) in jiaoyuList" :key="index">
-            <p>{{ item.publish_time }}</p>
-            <p>
-              <span class="textOver" @click="clickjiaoyu(item.id)">{{ item.title }}</span>
-              <span>{{ item.content }}</span>
-            </p>
-          </el-col>
-        </el-col>
-        <el-col :span="1" class="rightTitle">
-          <p></p>
-          <p>教<br />育<br />培<br />训</p>
-        </el-col>
-      </el-col> -->
     </el-col>
   </div>
 </template>
@@ -199,23 +137,6 @@ export default {
     turnToList(column_name) {
       this.$router.push({ path: '/technical/list', query: { column_name: column_name } });
     },
-    clickzhuanti(id) {
-      this.$router.push({ path: '/live/detail', query: { id: id } });
-      console.log(id);
-    },
-    clickjishu(id) {
-      this.$router.push({ path: '/live/detail', query: { id: id } });
-      console.log(id);
-    },
-    clickhangye(id) {
-      this.$router.push({ path: '/live/detail', query: { id: id } });
-      console.log(id);
-    },
-
-    clickjiaoyu(id) {
-      this.$router.push({ path: '/live/detail', query: { id: id } });
-      console.log(id);
-    },
   },
 };
 </script>