Authored by 于良

首页版块信息帖子取标题 review by 阿瑟

... ... @@ -73,11 +73,13 @@ export default class Home extends React.Component {
hot: ImmutablePropTypes.contains({
postId: React.PropTypes.number,
avatar: React.PropTypes.string,
title: React.PropTypes.string,
content: React.PropTypes.string.isRequired,
}),
new: ImmutablePropTypes.contains({
postId: React.PropTypes.number,
avatar: React.PropTypes.string,
title: React.PropTypes.string,
content: React.PropTypes.string.isRequired,
}),
num: ImmutablePropTypes.contains({
... ...
... ... @@ -43,10 +43,12 @@ SectionView.propTypes = {
}),
hot: React.PropTypes.shape({
avatar: React.PropTypes.string,
title: React.PropTypes.string,
content: React.PropTypes.string.isRequired,
}),
new: React.PropTypes.shape({
avatar: React.PropTypes.string,
title: React.PropTypes.string,
content: React.PropTypes.string.isRequired,
}),
num: React.PropTypes.shape({
... ...
... ... @@ -247,14 +247,14 @@ function parseBNS(json) {
content: hotPost && hotPost.contentData ? hotPost.contentData : '',
hasImg: hotPost && hotPost.hasImgFlg ? hotPost.hasImgFlg : '',
postId: hotPost && hotPost.postId ? hotPost.postId : 0,
postTitle: hotPost && hotPost.postsTitle ? hotPost.postsTitle : '',
title: hotPost && hotPost.postsTitle ? hotPost.postsTitle : '',
},
new: {
avatar: newAvatar,
content: newPost && newPost.contentData ? newPost.contentData : '',
hasImg: newPost && newPost.hasImgFlg ? newPost.hasImgFlg : '',
postId: newPost && newPost.postId ? newPost.postId : 0,
postTitle: newPost && newPost.postsTitle ? newPost.postsTitle : '',
title: newPost && newPost.postsTitle ? newPost.postsTitle : '',
},
num: {
onedayAddNum: item.oneDayAddNum,
... ...