Authored by 于良

bug fix: http://jira.yoho.cn:8888/browse/YH-2680 , 代码优化 ,review by 盖剑秋

... ... @@ -221,23 +221,20 @@ export default class Home extends React.Component {
onPressLike={this.props.onPressLike}
/>
);
default:
return null;
}
}
_renderSectionHeader(sectionData, sectionID) {
switch (sectionID) {
case 'progressing':
case 'banner':
case 'notice':
case 'section':
return null;
case 'recommendation':
return (
<View style={styles.sectionHeader}>
<Image style={styles.sectionHeaderImg} source={require('../../images/home/hot.png')}/>
<Text style={styles.sectionHeaderText}>热门推荐</Text>
<View style={styles.sectionHeaderLine}/>
<View style={styles.sectionHeaderTopLine}/>
<View style={styles.sectionHeaderBottomLine}/>
</View>
);
... ... @@ -323,8 +320,8 @@ let styles = StyleSheet.create({
height: 32,
alignItems: 'center',
backgroundColor: 'white',
borderTopWidth: 0.5,
borderTopColor: '#e0e0e0',
// borderTopWidth: 0.5, // borderTopWidth 在iPhone 6P上显示有bug
// borderTopColor: '#e0e0e0',
},
sectionHeaderImg: {
width: 9,
... ... @@ -335,7 +332,15 @@ let styles = StyleSheet.create({
fontSize: 12,
marginLeft: 5,
},
sectionHeaderLine: {
sectionHeaderTopLine: {
position: 'absolute',
left: 0,
top: 0,
width: width,
height: 0.5,
backgroundColor: '#e0e0e0',
},
sectionHeaderBottomLine: {
position: 'absolute',
left: 17,
bottom: 0,
... ...
... ... @@ -211,6 +211,8 @@ export default class Section extends React.Component {
/>
</ScrollableTabView>
);
default:
return null;
}
}
... ...