...
|
...
|
@@ -13,24 +13,13 @@ export default class ContentMessageCell extends Component { |
|
|
super(props);
|
|
|
}
|
|
|
|
|
|
componentDidMount() {
|
|
|
}
|
|
|
|
|
|
componentWillUnmount() {
|
|
|
}
|
|
|
|
|
|
onReplyPress(rowData) {
|
|
|
this.props.storeReplySource && this.props.storeReplySource(rowData);
|
|
|
NativeModules.YH_CommonHelper.showkeyBoardView();
|
|
|
}
|
|
|
|
|
|
render() {
|
|
|
let {rowData} = this.props;
|
|
|
let status = rowData.businessType === 1003 ? true : false;
|
|
|
|
|
|
let resource = rowData.coverImg;
|
|
|
resource = resource ? JSON.parse(resource) : '';
|
|
|
let picItem = resource.data ? JSON.parse(resource.data) : '';;
|
|
|
let picItem = resource.data ? JSON.parse(resource.data) : '';
|
|
|
|
|
|
let imageUrl = YH_Image.getSlicedUrl(picItem.src, 50 * DEVICE_HEIGHT_RATIO, 50 * DEVICE_HEIGHT_RATIO, 2);
|
|
|
|
...
|
...
|
@@ -58,12 +47,17 @@ export default class ContentMessageCell extends Component { |
|
|
return (
|
|
|
<View>
|
|
|
<View style={styles.headerBackground}>
|
|
|
<YH_Image style={styles.headIcon} url={rowData.headIco} circle={true}/>
|
|
|
<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}>
|
|
|
<Text style={styles.nicknameText}>{rowData.userName}</Text>
|
|
|
<TouchableOpacity activeOpacity={1} onPress={()=> this.props.jumpToPersonalGrassPage && this.props.jumpToPersonalGrassPage(rowData)}>
|
|
|
<Text style={styles.nicknameText}>{rowData.userName}</Text>
|
|
|
</TouchableOpacity>
|
|
|
<Text style={styles.subnameText}>{subName}</Text>
|
|
|
</View>
|
|
|
<TouchableOpacity activeOpacity={1} style={styles.replyContainer} onPress={()=> this.onReplyPress(rowData)}>
|
|
|
<TouchableOpacity activeOpacity={1} style={styles.replyContainer} onPress={()=> this.props.jumpToShowKeyboard && this.props.jumpToShowKeyboard(rowData)}>
|
|
|
<Image style={styles.replyImage} source={require('../../images/content_reply.png')}/>
|
|
|
</TouchableOpacity>
|
|
|
</View>
|
...
|
...
|
@@ -74,22 +68,24 @@ export default class ContentMessageCell extends Component { |
|
|
|
|
|
{ status ?
|
|
|
|
|
|
<View style={styles.ownerReplyView}>
|
|
|
<Text style={{paddingLeft: 10, paddingTop: 14, paddingRight: 1, paddingBottom: 12}}>
|
|
|
<Text style={styles.replyText}>我的评论:</Text>
|
|
|
<Text style={styles.defaultReplyText} numberOfLines={2}>{rowData.parentCommentContent}</Text>
|
|
|
</Text>
|
|
|
</View>
|
|
|
<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}}>
|
|
|
<Text style={styles.replyText}>我的评论:</Text>
|
|
|
<Text style={styles.defaultReplyText} numberOfLines={2}>{rowData.parentCommentContent}</Text>
|
|
|
</Text>
|
|
|
</View>
|
|
|
</TouchableOpacity>
|
|
|
|
|
|
:
|
|
|
|
|
|
<TouchableOpacity activeOpacity={1} onPress={() => {}}>
|
|
|
<TouchableOpacity activeOpacity={1} onPress={() => this.props.jumpToGrassDetailPage && this.props.jumpToGrassDetailPage(rowData)}>
|
|
|
<View style={ styles.originContainerView} >
|
|
|
<Text style={styles.copyText}>原文</Text>
|
|
|
<YH_Image url={imageUrl} style={styles.imageStyle} />
|
|
|
<Text style={styles.originText} numberOfLines={1}>{rowData.content}</Text>
|
|
|
</View>
|
|
|
</TouchableOpacity>}
|
|
|
</TouchableOpacity> }
|
|
|
|
|
|
<View style={styles.timeView}>
|
|
|
<Text style={styles.startTimeText}>{rowData.createTime}</Text>
|
...
|
...
|
|