个人主页接口对接

This commit is contained in:
zhaofang
2022-09-20 19:53:09 +08:00
parent 44253f06f0
commit b99f54189d
19 changed files with 533 additions and 886 deletions

View File

@@ -1,24 +1,24 @@
<template>
<div class="article-list">
<ul v-if="articleList.length > 0">
<li class="article-list-index">
<h6 class="article-title-info follow-home-title">房产税落地其实不会对房价有大影响
<ul v-if="list.length > 0">
<li class="article-list-index" v-for="item in list" :key="item.id">
<h6 class="article-title-info follow-home-title">{{item.info.title || item.contentInfo}}
<span class="follow-hide" style="float:right">
<svg-icon style="margin-right: 10px;font-size:22px;padding-top: 4px;" icon-class="eyes"></svg-icon>隐藏
</span>
</h6>
<div style="height:58px;padding-top:14px ">
<!-- <author :avatar="item.authorInfo.avatar" :name="item.authorInfo.name" :info="item.authorInfo.orgInfo" :sex="item.authorInfo.sex"></author> -->
</div>
<author :avatar="item.authorInfo.avatar" :name="item.authorInfo.name" :info="item.authorInfo.orgInfo" :sex="item.authorInfo.sex" :aid="item.authorInfo.aid"></author>
</div>
<p class="article-text">
假如你床头有 10 本书你要在其中找到一本书你会怎么找你可能会说扫一眼就找到了啊假如你现在身处世界上最大的图书馆美国国会图书馆藏书超 2.1 亿本现在你想在里边找某一本某某书请问你如何找一本一本翻吗累死你2.1 亿这个数字我给你换算了一下 2.1 亿本书铺起来可绕地球近两圈不仅仅找书图书馆每天还要在其中处理要在其中处要
<span style="color:#0B4D9D;cursor:pointer;" >
<!-- @click.stop="changeIsAll(item)" -->
{{false?'收起':'全文展开'}}
{{displayAll(item)}}
<!-- <span v-html="displayAll(item)"></span> -->
<span style="color:#0B4D9D;cursor:pointer;" v-if="item.info.summary && item.info.summary.length>250" @click.stop="changeIsAll(item)">
{{item.isAll?'收起':'全文展开'}}
</span>
</p>
<div>
<interactBar :type="0" :shares="false" :views="false" :readonly="true"></interactBar>
<interactBar :type="2" :data="item.info" :shares="false" :views="false" :readonly="true"></interactBar>
</div>
</li>
</ul>
@@ -38,13 +38,25 @@
interactBar,
// timeShow,
author
},
props:{
list:{
type:Array,
default:()=>[]
}
},
data(){
return{
articleList:[{name:1},{name:2}]
articleList:[]
}
},
methods:{
displayAll(item) {
if (!item.isAll && item.info.summary && item.info.summary.length > 250) {
return item.info.summary.slice(0, 180) + "...";
}
return item.info.summary;
},
//展示全部
changeIsAll(item) {
item.isAll = !item.isAll;