|
|
@@ -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>
|
|
|
|