Commit 06be93b0 by 高浩杰

博客页热门博主

parent 62ba94f6
......@@ -43,7 +43,7 @@ export default {
otherFans: '/api/user/', //获取ta的粉丝(列表) +{userId}/fans
otherFollowing: '/api/user/', //获取ta的关注(列表) +{userId}/follower
blacklist: '/api/my/blacklist/', //获取黑名单 +{userId}
hotBloggers:'/api/user/hotBloggers',//热门博主
},
Authentication:{
......
......@@ -24,14 +24,13 @@
<div class="blog-container__right">
<div class="right__write-blog" @click="toRelease">写文章</div>
<card-container
v-if="false"
title="热门博主"
label="换一换"
more="更多"
width="302px"
style="margin-top: 16px;max-height: 446px;"
>
<user-card></user-card>
<user-card v-for="(item, index) in hotBloggerList" :key="item.userId" :info="item"></user-card>
</card-container>
<card-container
title="热门标签"
......@@ -73,6 +72,7 @@ export default {
pages:1,
hotBlogList: [],
hotTagsList: [],
hotBloggerList: [],
labelTitle:'',
showPagination:true,
showPaginationTimer:null,
......@@ -95,6 +95,7 @@ export default {
this.dataGetBlogCategory();
this.getLabelTitle();
this.dataGetHotTagsList();
this.dataGetHotBloggersList();
},
watch: {
$route: function () {
......@@ -152,6 +153,17 @@ export default {
})
},
dataGetHotBloggersList() {
let params={
page: 1,
size: 6
};
this.$axios.$get(config.api.get.User.hotBloggers,{params:params})
.then((response)=>{
console.log(response);
this.hotBloggerList = response.data.dataList;
});
},
toRelease(){
this.$router.push('/blog/release')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment