...
|
...
|
@@ -24,12 +24,13 @@ export default class RecommendForYouCell extends Component { |
|
|
let {title, dataSource} = this.props;
|
|
|
let hideNewNum = false;
|
|
|
let footerHeight = 46;
|
|
|
let selfShowHeight = selfHeaderViewHeight + selfFooterViewHeight + TitleNumbCellHeight * Math.ceil(dataSource.length / 3);
|
|
|
if (title == '新入驻品牌') {
|
|
|
hideNewNum = true;
|
|
|
footerHeight = 30;
|
|
|
}
|
|
|
return (
|
|
|
<View style={styles.container}>
|
|
|
<View style={[styles.container,{height: selfShowHeight}]}>
|
|
|
<View style={styles.header}>
|
|
|
<Text style={styles.headerText}>{title}</Text>
|
|
|
</View>
|
...
|
...
|
@@ -37,7 +38,7 @@ export default class RecommendForYouCell extends Component { |
|
|
{dataSource.map((item, i) => {
|
|
|
return(
|
|
|
<RecForYouIconTitleNumbCell
|
|
|
key={i}
|
|
|
key={"TitleNumbCell" +i}
|
|
|
dataSource = {item}
|
|
|
hideNewNum={hideNewNum}
|
|
|
onPressShop={this.props.onPressShop}
|
...
|
...
|
@@ -54,6 +55,9 @@ export default class RecommendForYouCell extends Component { |
|
|
}
|
|
|
|
|
|
let {width, height} = Dimensions.get('window');
|
|
|
let TitleNumbCellHeight = Math.ceil((Dimensions.get('window').width - 40) / 3) + 26;
|
|
|
let selfHeaderViewHeight = 30;
|
|
|
let selfFooterViewHeight = 30;
|
|
|
|
|
|
let styles = StyleSheet.create({
|
|
|
container: {
|
...
|
...
|
@@ -63,7 +67,7 @@ let styles = StyleSheet.create({ |
|
|
header: {
|
|
|
backgroundColor: 'white',
|
|
|
width: width,
|
|
|
height: 40,
|
|
|
height: selfHeaderViewHeight,
|
|
|
alignItems: 'center',
|
|
|
flexDirection: 'row',
|
|
|
},
|
...
|
...
|
@@ -73,6 +77,7 @@ let styles = StyleSheet.create({ |
|
|
width: width,
|
|
|
textAlign: 'center',
|
|
|
backgroundColor: 'white',
|
|
|
marginTop: 12,
|
|
|
},
|
|
|
contentContainer: {
|
|
|
backgroundColor: 'white',
|
...
|
...
|
@@ -82,7 +87,7 @@ let styles = StyleSheet.create({ |
|
|
|
|
|
},
|
|
|
footer: {
|
|
|
height: 16,
|
|
|
height: selfFooterViewHeight,
|
|
|
backgroundColor: 'white',
|
|
|
},
|
|
|
cellContainer: {
|
...
|
...
|
|