...
|
...
|
@@ -21,44 +21,26 @@ export default class ContentMessageCell extends Component { |
|
|
let picItem = resource ? typeof resource.data === 'string' ? JSON.parse(resource.data) : resource.data : '';
|
|
|
|
|
|
let imageUrl = YH_Image.getSlicedUrl(picItem.src, 50 * DEVICE_HEIGHT_RATIO, 50 * DEVICE_HEIGHT_RATIO, 2);
|
|
|
let {width, height} = Dimensions.get('window');
|
|
|
|
|
|
let sliceCount = width <= 320 ? 10 : 15;
|
|
|
let userName = rowData.userName.length > sliceCount ? rowData.userName.slice(0,sliceCount)+'...' : rowData.userName;
|
|
|
let subName = '赞了你';
|
|
|
switch (rowData.businessType) {
|
|
|
case 1000:
|
|
|
subName = '赞了你';
|
|
|
break;
|
|
|
case 1001:
|
|
|
subName = '收藏了你';
|
|
|
break;
|
|
|
case 1002:
|
|
|
subName = '评论了你';
|
|
|
break;
|
|
|
case 1003:
|
|
|
subName = '回复了你';
|
|
|
break;
|
|
|
case 1004:
|
|
|
subName = '关注了你';
|
|
|
break;
|
|
|
default:
|
|
|
|
|
|
}
|
|
|
|
|
|
let subName = rowData.businessType === 1002 ? '评论了你' : '回复了你';
|
|
|
|
|
|
return (
|
|
|
<View>
|
|
|
<View style={styles.headerBackground}>
|
|
|
<TouchableOpacity activeOpacity={1} onPress={()=> this.props.jumpToPersonalGrassPage && this.props.jumpToPersonalGrassPage(rowData.optUid)}>
|
|
|
<TouchableOpacity activeOpacity={1} onPress={()=> this.props.jumpToPersonalGrassPage && this.props.jumpToPersonalGrassPage(rowData)}>
|
|
|
<YH_Image style={styles.headIcon} url={rowData.headIco} circle={true}/>
|
|
|
</TouchableOpacity>
|
|
|
|
|
|
<View style={styles.textView}>
|
|
|
<TouchableOpacity activeOpacity={1} onPress={()=> this.props.jumpToPersonalGrassPage && this.props.jumpToPersonalGrassPage(rowData.optUid)}>
|
|
|
<TouchableOpacity activeOpacity={1} onPress={()=> this.props.jumpToPersonalGrassPage && this.props.jumpToPersonalGrassPage(rowData)}>
|
|
|
<Text style={styles.nicknameText} numberOfLines={1}>{userName}</Text>
|
|
|
</TouchableOpacity>
|
|
|
<Text style={styles.subnameText}>{subName}</Text>
|
|
|
</View>
|
|
|
<TouchableOpacity activeOpacity={1} style={styles.replyContainer} onPress={()=> this.props.jumpToShowKeyboard && this.props.jumpToShowKeyboard(rowData.userName, rowData.commentId, rowData.isDelete)}>
|
|
|
<TouchableOpacity activeOpacity={1} style={styles.replyContainer} onPress={()=> this.props.jumpToShowKeyboard && this.props.jumpToShowKeyboard(rowData)}>
|
|
|
<Image style={styles.replyImage} resizeMode="contain" source={require('../../images/content_reply.png')}/>
|
|
|
</TouchableOpacity>
|
|
|
</View>
|
...
|
...
|
@@ -69,7 +51,7 @@ export default class ContentMessageCell extends Component { |
|
|
|
|
|
{ status ?
|
|
|
|
|
|
<TouchableOpacity activeOpacity={1} onPress={() => this.props.jumpToGrassDetailPage && this.props.jumpToGrassDetailPage(rowData.articleId, rowData.rootCommentId, rowData.isDelete, status)}>
|
|
|
<TouchableOpacity activeOpacity={1} onPress={() => this.props.jumpToGrassDetailPage && this.props.jumpToGrassDetailPage(rowData)}>
|
|
|
<View style={styles.ownerReplyView}>
|
|
|
<Text style={{paddingLeft: 10, paddingTop: 14, paddingRight: 1, paddingBottom: 12}} numberOfLines={3}>
|
|
|
<Text style={styles.replyText}>我的评论:</Text>
|
...
|
...
|
@@ -80,7 +62,7 @@ export default class ContentMessageCell extends Component { |
|
|
|
|
|
:
|
|
|
|
|
|
<TouchableOpacity activeOpacity={1} onPress={() => this.props.jumpToGrassDetailPage && this.props.jumpToGrassDetailPage(rowData.articleId, rowData.rootCommentId, rowData.isDelete, status)}>
|
|
|
<TouchableOpacity activeOpacity={1} onPress={() => this.props.jumpToGrassDetailPage && this.props.jumpToGrassDetailPage(rowData)}>
|
|
|
|
|
|
{ rowData.isDelete === 'N' ?
|
|
|
<View style={ styles.originContainerView} >
|
...
|
...
|
|