|
@@ -26,24 +26,19 @@ class Collection extends Component {
|
|
|
})
|
|
|
.then(data=>{
|
|
|
let theData=data.data.data,
|
|
|
- theArr = [],
|
|
|
- times = new Date().getTime(),
|
|
|
- days = parseInt(times / (1000 * 60 * 60 * 24));
|
|
|
+ theArr = [];
|
|
|
if (!data.data || !data.data.data.list) {
|
|
|
if (data.data.error && data.data.error.length) {
|
|
|
message.warning(data.data.error[0].message);
|
|
|
};
|
|
|
} else {
|
|
|
- console.log(theData)
|
|
|
for (let i = 0; i < theData.list.length; i++) {
|
|
|
- let thisdata = theData.list[i],
|
|
|
- create = parseInt(thisdata.createTime / (1000 * 60 * 60 * 24));
|
|
|
- let newState = (days-create)<7?true:false;
|
|
|
+ let thisdata = theData.list[i];
|
|
|
theArr.push({
|
|
|
key: i,
|
|
|
id: thisdata.uid,
|
|
|
name:thisdata.username,
|
|
|
- introduce:thisdata.introduction&&thisdata.introduction.length>40?thisdata.introduction.substr(0,40)+'...':'',
|
|
|
+ introduce:thisdata.introduction&&thisdata.introduction.length>40?thisdata.introduction.substr(0,40)+'...':thisdata.introduction,
|
|
|
img: thisdata.headPortraitUrl, //编号
|
|
|
});
|
|
|
};
|
|
@@ -84,6 +79,7 @@ class Collection extends Component {
|
|
|
}
|
|
|
render() {
|
|
|
const dataList =this.state.dataList || [];
|
|
|
+ console.log(dataList)
|
|
|
return <div className="user-content">
|
|
|
<div className="title" >
|
|
|
我的关注
|
|
@@ -100,10 +96,10 @@ class Collection extends Component {
|
|
|
return<Col span={6} key={index} onClick={(e)=>{this.jump(item)}}>
|
|
|
<div className="img">
|
|
|
<div className="imgHeader">
|
|
|
- <div className="imgBj">
|
|
|
+ <div className="popImgBj">
|
|
|
{item.img?<img src={globalConfig.avatarHost+'/upload'+item.img} alt=""/>:''}
|
|
|
</div>
|
|
|
- <div className="divP"><p>{item.introduce?item.introduce:'暂无'}</p></div>
|
|
|
+ <div className="divP"><p>{item.introduce}</p></div>
|
|
|
</div>
|
|
|
<p className="txt">{item.name?item.name:'佚名'}</p>
|
|
|
</div>
|