Authored by 张丽霞

四张图的情况,有title展示,没有不展示,review by redding

... ... @@ -36,18 +36,19 @@ export default class Recommend extends React.Component {
}
renderRow(rowData, sectionID, rowID, highlightRow) {
let rowContainerHeight = itemWidth + 20;
let rowContainerHeight = itemWidth;
let {resource} = this.props;
let list = resource.get('module_data').get('data').toArray();
let showTitle = false;
let bottomStyle ={};
if (rowID < list.length - 4) {
rowContainerHeight += 1;
}else {
bottomStyle ={borderBottomWidth: 0}
}
if (rowData.get('linkType') == 1 && !rowData.get('showProductInfo')) {
rowContainerHeight -= 20;
if (rowData.get('text') && rowData.get('text') != '') {
rowContainerHeight += 20;
showTitle = true;
}
return (
<TouchableOpacity activeOpacity={0.5} onPress={() => {
... ... @@ -59,7 +60,7 @@ export default class Recommend extends React.Component {
style={styles.thumbnail}
>
</Image>
{rowData.get('linkType') == 1 && rowData.get('showProductInfo')?
{showTitle?
<View style={styles.itemTitle}>
<Text style={styles.itemText} numberOfLines={1}>{rowData.get('text')}</Text>
</View>
... ...