chending1994 преди 5 години
родител
ревизия
435b765146
променени са 3 файла, в които са добавени 13 реда и са изтрити 33 реда
  1. 1 1
      pages/cooperate/index.vue
  2. 1 0
      pages/index.vue
  3. 11 32
      pages/news/newsView/_id.vue

+ 1 - 1
pages/cooperate/index.vue

@@ -152,7 +152,7 @@
           <div class="line"></div>
           <div class="join-box">
             <div
-              class="join-box-item wow animate__animated animate__zoomInDown"
+              class="join-box-item"
               v-for="item in joinData"
               :key="item.id"
             >

+ 1 - 0
pages/index.vue

@@ -2062,6 +2062,7 @@ ul.cate-nav {
   // align-items: center;
   height: 526px;
   background: url("~assets/images/index/product_bg.png") no-repeat;
+  background-size: 100% 100%;
   .product-content-box {
     position: relative;
     // width: 1200px;

+ 11 - 32
pages/news/newsView/_id.vue

@@ -23,7 +23,7 @@
             <div class="info-item">{{ news.createTime }}</div>
             <div class="info-item">
               <span class="">观看人数:</span>
-              <span class="text">1000</span>
+              <span class="text">{{ news.readSize }}</span>
             </div>
             <div class="info-item">
               <span>作者:</span>
@@ -61,7 +61,7 @@
               </div>
               <div class="hot-info">
                 <span class="time">{{ item.createTime }}</span>
-                <span class="views">观看人数:111</span>
+                <span class="views">观看人数:{{ item.readSize }}</span>
               </div>
             </div>
           </template>
@@ -77,35 +77,6 @@ import axios from "axios";
 export default {
   data() {
     return {
-      // articleList: [
-      //   {
-      //     title: '中德智慧乔迁逻辑狗智慧乔迁智慧乔迁标题中德智 迁标题中德智迁标题中德智慧乔迁……..',
-      //     time: '2020-6-29',
-      //     content: '个人的何时去个人的何时去个人的何时去个人的何时去个人的何时去个人的何时去个人 的人的何时去个人的何时去…… ',
-      //     imgUrl: require('~/assets/images/news/img.png'),
-      //     id: '1',
-      //     cateId: '1',
-      //     views: 103,
-      //   },
-      //   {
-      //     title: '中德智慧乔迁逻辑狗智慧乔迁智慧乔迁标题中德智 迁标题中德智迁标题中德智慧乔迁……..',
-      //     time: '2020-6-29',
-      //     content: '个人的何时去个人的何时去个人的何时去个人的何时去个人的何时去个人的何时去个人 的人的何时去个人的何时去…… ',
-      //     imgUrl: require('~/assets/images/news/img.png'),
-      //     id: '2',
-      //     cateId: '2',
-      //     views: 141,
-      //   },
-      //   {
-      //     title: '中德智慧乔迁逻辑狗智慧乔迁智慧乔迁标题中德智 迁标题中德智迁标题中德智慧乔迁……..',
-      //     time: '2020-6-29',
-      //     content: '个人的何时去个人的何时去个人的何时去个人的何时去个人的何时去个人的何时去个人 的人的何时去个人的何时去…… ',
-      //     imgUrl: require('~/assets/images/news/img.png'),
-      //     id: '3',
-      //     cateId: '3',
-      //     views: 165,
-      //   }
-      // ]
     };
   },
   
@@ -127,6 +98,8 @@ export default {
      
     };
   },
+  created() {
+  },
   mounted() {
     this.$nextTick(function (){
       window._bd_share_config = {
@@ -145,8 +118,14 @@ export default {
       s.type = 'text/javascript';
       s.src = 'http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion=' + ~(-new Date() / 36e5);
       document.body.appendChild(s);
-    })
+    });
+    this.loadRead();
   },
+  methods: {
+    async loadRead() {
+      const { data } = await axios.post(`${this.$store.state.wordpressAPI}/official-api/article/read/${this.$route.params.id}`);
+    }
+  }
 };
 </script>