... ... @@ -65,8 +65,7 @@ export default class BrandIntro extends Component {
</TouchableOpacity>
<View style={styles.brandIcon}>
<SlicedImage resizeMode={'stretch'} source={{uri: detail.brand_ico}} style={{width:brandIconWidth-2, height:brandIconWidth-2}}/>
<SlicedImage resizeMode={'contain'} source={{uri: detail.brand_ico}} style={{width:brandIconWidth-2, height:brandIconWidth-2, backgroundColor:'white'}}/>
</View>
<View style={styles.blackView}>
... ...
... ... @@ -25,7 +25,7 @@ export default class newArrive extends React.Component {
this.renderRow = this.renderRow.bind(this);
this.renderHeader = this.renderHeader.bind(this);
this.renderFooter = this.renderFooter.bind(this);
this.dataSource = new ListView.DataSource({
rowHasChanged: (r1, r2) => !Immutable.is(r1, r2),
});
... ... @@ -89,6 +89,51 @@ export default class newArrive extends React.Component {
);
}
renderFooter() {
return (
<View>
<View style={{
width: width,
height: 30,
backgroundColor: 'white',
}}/>
<View style={{
width: width,
height: 0.5,
backgroundColor: '#e5e5e5',
}}/>
<TouchableOpacity activeOpacity={0.5} onPress={() => {
this.props.onPressMoreProducts && this.props.onPressMoreProducts(this.props.moreProductUrl);
}}>
<View style={styles.footerContainer}>
<Text style={styles.footerText}>
更多商品
</Text>
<Image
source={require('../../images/more_arrow.png')}
style={styles.footerArrow}
resizeMode={'contain'}
/>
</View>
</TouchableOpacity>
<View style={{
width: width,
height: 0.5,
backgroundColor: '#e5e5e5',
}}/>
<View style={{
width: width,
height: 15,
backgroundColor: '#f0f0f0',
}}/>
</View>
);
}
render() {
let prodcutList = this.props.prodcutList;
if (!prodcutList || prodcutList.length == 0) {
... ... @@ -96,7 +141,7 @@ export default class newArrive extends React.Component {
}
let backgroundWidth = width;
let backgroundHeight = 64 + 20 + Math.ceil(prodcutList.length / 2) * (rowHeight + rowMarginHorizontal);
let backgroundHeight = 64 + 20 + Math.ceil(prodcutList.length / 2) * (rowHeight + rowMarginHorizontal) + 44;
return (
<View style={{
... ... @@ -109,18 +154,9 @@ export default class newArrive extends React.Component {
dataSource={this.dataSource.cloneWithRows(prodcutList)}
renderRow={this.renderRow}
renderHeader={this.renderHeader}
renderFooter={this.renderFooter}
enableEmptySections = {true}
/>
<View style={{
width: width,
height: 0.5,
backgroundColor: '#e5e5e5',
}}/>
<View style={{
width: width,
height: 15,
backgroundColor: '#f0f0f0',
}}/>
</View>
);
}
... ... @@ -166,4 +202,23 @@ const styles = StyleSheet.create({
backgroundColor: 'transparent',
justifyContent: 'center',
},
footerContainer: {
width: width,
height: 44,
flexDirection: 'row',
backgroundColor: 'white',
justifyContent: 'space-between',
},
footerText: {
fontSize: 14,
marginTop: 16,
marginLeft: 15,
},
footerArrow: {
width: 9,
height: 15,
backgroundColor:'white',
marginTop: 16,
marginRight: 15,
},
});
... ...