Showing
3 changed files
with
30 additions
and
10 deletions
@@ -27,11 +27,9 @@ export default class ContentFansListCell extends Component { | @@ -27,11 +27,9 @@ export default class ContentFansListCell extends Component { | ||
27 | </TouchableOpacity> | 27 | </TouchableOpacity> |
28 | 28 | ||
29 | <View style={styles.textView}> | 29 | <View style={styles.textView}> |
30 | - <TouchableOpacity activeOpacity={1} onPress={()=> this.props.jumpToPersonalGrassPage && this.props.jumpToPersonalGrassPage(data)}> | ||
31 | - <Text> | ||
32 | - <Text style={styles.nicknameText}>{data.userName}</Text> | ||
33 | - <Text style={styles.defaultReplyText} numberOfLines={1}> 关注了你</Text> | ||
34 | - </Text> | 30 | + <TouchableOpacity style={styles.toubleView} activeOpacity={1} onPress={()=> this.props.jumpToPersonalGrassPage && this.props.jumpToPersonalGrassPage(data)}> |
31 | + <Text style={[styles.nicknameText, {maxWidth: width-220}]} numberOfLines={1}>{data.userName}</Text> | ||
32 | + <Text style={styles.defaultReplyText}>关注了你</Text> | ||
35 | </TouchableOpacity> | 33 | </TouchableOpacity> |
36 | <Text style={styles.startTimeText}>{data.createTime}</Text> | 34 | <Text style={styles.startTimeText}>{data.createTime}</Text> |
37 | </View> | 35 | </View> |
@@ -70,6 +68,12 @@ let styles = StyleSheet.create({ | @@ -70,6 +68,12 @@ let styles = StyleSheet.create({ | ||
70 | alignItems: 'flex-start', | 68 | alignItems: 'flex-start', |
71 | marginTop: 15, | 69 | marginTop: 15, |
72 | marginBottom: 20, | 70 | marginBottom: 20, |
71 | + width: width - 160, | ||
72 | + }, | ||
73 | + toubleView: { | ||
74 | + flexDirection: 'row', | ||
75 | + overflow:'hidden', | ||
76 | + width: width - 160, | ||
73 | }, | 77 | }, |
74 | startTimeText: { | 78 | startTimeText: { |
75 | fontFamily: 'PingFang-SC-Regular', | 79 | fontFamily: 'PingFang-SC-Regular', |
@@ -81,7 +85,12 @@ let styles = StyleSheet.create({ | @@ -81,7 +85,12 @@ let styles = StyleSheet.create({ | ||
81 | fontSize: 14, | 85 | fontSize: 14, |
82 | fontFamily: 'PingFang-SC-Medium', | 86 | fontFamily: 'PingFang-SC-Medium', |
83 | color: 'black', | 87 | color: 'black', |
84 | - fontWeight: 'bold' | 88 | + fontWeight: 'bold', |
89 | + }, | ||
90 | + defaultReplyText :{ | ||
91 | + fontSize: 14, | ||
92 | + fontFamily: 'PingFang-SC-Medium', | ||
93 | + color: '#b0b0b0', | ||
85 | }, | 94 | }, |
86 | fanContainer: { | 95 | fanContainer: { |
87 | position: 'absolute', | 96 | position: 'absolute', |
@@ -10,6 +10,7 @@ import LoadMoreIndicator from '../../../common/components/LoadMoreIndicator'; | @@ -10,6 +10,7 @@ import LoadMoreIndicator from '../../../common/components/LoadMoreIndicator'; | ||
10 | 10 | ||
11 | import ContentMessageTabView from "./ContentMessageTabView"; | 11 | import ContentMessageTabView from "./ContentMessageTabView"; |
12 | import ContentMessageCell from "./ContentMessageCell"; | 12 | import ContentMessageCell from "./ContentMessageCell"; |
13 | +import ContentEmptyView from './ContentEmptyView' | ||
13 | import Prompt from '../../../common/components/Prompt'; | 14 | import Prompt from '../../../common/components/Prompt'; |
14 | 15 | ||
15 | export default class ContentMessageView extends Component { | 16 | export default class ContentMessageView extends Component { |
@@ -81,10 +82,17 @@ export default class ContentMessageView extends Component { | @@ -81,10 +82,17 @@ export default class ContentMessageView extends Component { | ||
81 | } | 82 | } |
82 | 83 | ||
83 | render() { | 84 | render() { |
84 | - let commentList = this.props.commentList; | ||
85 | - let isPullToRefresh = this.props.isPullToRefresh; | 85 | + let {commentList, isPullToRefresh, shouldShowEmpty, tipMessage} = this.props; |
86 | 86 | ||
87 | - let tipMessage = this.props.tipMessage; | 87 | + if (shouldShowEmpty) { |
88 | + return ( | ||
89 | + <View style={styles.container}> | ||
90 | + <ContentEmptyView | ||
91 | + listId={4} | ||
92 | + /> | ||
93 | + </View> | ||
94 | + ); | ||
95 | + } | ||
88 | 96 | ||
89 | return ( | 97 | return ( |
90 | <View style={styles.container}> | 98 | <View style={styles.container}> |
@@ -24,6 +24,7 @@ function mapStateToProps(state) { | @@ -24,6 +24,7 @@ function mapStateToProps(state) { | ||
24 | tabButtons: state.content.contentType.get('list').toJS(), | 24 | tabButtons: state.content.contentType.get('list').toJS(), |
25 | commentList: state.content.commentList.get('list').toJS(), | 25 | commentList: state.content.commentList.get('list').toJS(), |
26 | isPullToRefresh: state.content.commentList.get('isPullToRefresh'), | 26 | isPullToRefresh: state.content.commentList.get('isPullToRefresh'), |
27 | + shouldShowEmpty: state.content.commentList.get('shouldShowEmpty'), | ||
27 | contentTipFlag: state.content.contentTipFlag, | 28 | contentTipFlag: state.content.contentTipFlag, |
28 | tipMessage: state.content.tipMessage, | 29 | tipMessage: state.content.tipMessage, |
29 | communityHost: state.app.communityHost, | 30 | communityHost: state.app.communityHost, |
@@ -170,7 +171,8 @@ class ContentMessageContainer extends Component { | @@ -170,7 +171,8 @@ class ContentMessageContainer extends Component { | ||
170 | tipMessage, | 171 | tipMessage, |
171 | tabButtons, | 172 | tabButtons, |
172 | commentList, | 173 | commentList, |
173 | - isPullToRefresh | 174 | + isPullToRefresh, |
175 | + shouldShowEmpty | ||
174 | } = this.props | 176 | } = this.props |
175 | 177 | ||
176 | return ( | 178 | return ( |
@@ -184,6 +186,7 @@ class ContentMessageContainer extends Component { | @@ -184,6 +186,7 @@ class ContentMessageContainer extends Component { | ||
184 | commentList={commentList} | 186 | commentList={commentList} |
185 | isPullToRefresh={isPullToRefresh} | 187 | isPullToRefresh={isPullToRefresh} |
186 | tipMessage={tipMessage} | 188 | tipMessage={tipMessage} |
189 | + shouldShowEmpty={shouldShowEmpty} | ||
187 | onRefresh={this._onRefresh} | 190 | onRefresh={this._onRefresh} |
188 | onEndReached={this._onEndReached} | 191 | onEndReached={this._onEndReached} |
189 | onHiddenTipMessage={this._onHiddenTipMessage} | 192 | onHiddenTipMessage={this._onHiddenTipMessage} |
-
Please register or login to post a comment